Frank Grupe (JIRA)
2006-10-19 15:16:20 UTC
Client generation takes wrong name for faults
---------------------------------------------
Key: XFIRE-719
URL: http://jira.codehaus.org/browse/XFIRE-719
Project: XFire
Issue Type: Bug
Components: Generator
Affects Versions: 1.2.2
Reporter: Frank Grupe
Assigned To: Dan Diephouse
Hi,
I have build a WebService Operation throwing multiple faults each containing the same Data Element:
<s:element name="WebServiceFaultDetail">
<s:complexType>
<s:sequence>
<s:element maxOccurs="1" minOccurs="0" name="detailMessage" type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="code" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
...
<wsdl:message name="AuthenticationFailedFault">
<wsdl:part name="AuthenticationFailedFault" element="ns1:WebServiceFaultDetail"/>
</wsdl:message>
<wsdl:message name="ServiceNotAvailableFault">
<wsdl:part name="ServiceNotAvailableFault" element="ns1:WebServiceFaultDetail"/>
</wsdl:message>
<wsdl:message name="DeviceNotFoundFault">
<wsdl:part name="DeviceNotFoundFault" element="ns1:WebServiceFaultDetail"/>
</wsdl:message>
...
<wsdl:operation name="GetDeviceInformation">
<wsdl:input name="GetDeviceInformationRequest" message="tns:GetDeviceInformationRequest"/>
<wsdl:output name="GetDeviceInformationResponse" message="tns:GetDeviceInformationResponse"/>
<wsdl:fault name="AuthenticationFailedFault" message="tns:AuthenticationFailedFault"/>
<wsdl:fault name="DeviceNotFoundFault" message="tns:DeviceNotFoundFault"/>
<wsdl:fault name="ServiceNotAvailableFault" message="tns:ServiceNotAvailableFault"/>
</wsdl:operation>
But when generating a client from this WSDL, the generated Exception's faults are all named "WebServiceFaultDetail" instead of "AuthenticationFailedFault/DeviceNotFoundFault/ServiceNotAvailableFault":
public class AuthenticationFailedFault extends FaultInfoException
{
...
public static QName getFaultName() {
return new QName("http://www.arvato.de/telco/tass/service/web/deviceinformation/types", "WebServiceFaultDetail");
}
}
So when invoking the client, I get the following expected Exception:
java.lang.IllegalArgumentException: A fault with name [WebServiceFaultDetail] already exists in this operation
at org.codehaus.xfire.service.OperationInfo.addFault(OperationInfo.java:197)
at org.codehaus.xfire.service.binding.ObjectServiceFactory.addFault(ObjectServiceFactory.java:908)
at org.codehaus.xfire.service.binding.ObjectServiceFactory.initializeFaults(ObjectServiceFactory.java:881)
at org.codehaus.xfire.service.binding.ObjectServiceFactory.addOperation(ObjectServiceFactory.java:801)
at org.codehaus.xfire.service.binding.ObjectServiceFactory.initializeOperations(ObjectServiceFactory.java:706)
at org.codehaus.xfire.service.binding.ObjectServiceFactory.create(ObjectServiceFactory.java:410)
at org.codehaus.xfire.annotations.AnnotationServiceFactory.create(AnnotationServiceFactory.java:246)
at org.codehaus.xfire.service.binding.ObjectServiceFactory.create(ObjectServiceFactory.java:345)
at de.arvato.telco.tass.service.web.client.DeviceInformationServiceClient.create0(DeviceInformationServiceClient.java:59)
at de.arvato.telco.tass.service.web.client.DeviceInformationServiceClient.<init>(DeviceInformationServiceClient.java:26)
at de.arvato.telco.tass.service.web.client.DeviceInformationTestClient.main(DeviceInformationTestClient.java:18)
Fault names in the generated Exceptions should match the fault names in the operations and not their associated data elements, right?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------
Key: XFIRE-719
URL: http://jira.codehaus.org/browse/XFIRE-719
Project: XFire
Issue Type: Bug
Components: Generator
Affects Versions: 1.2.2
Reporter: Frank Grupe
Assigned To: Dan Diephouse
Hi,
I have build a WebService Operation throwing multiple faults each containing the same Data Element:
<s:element name="WebServiceFaultDetail">
<s:complexType>
<s:sequence>
<s:element maxOccurs="1" minOccurs="0" name="detailMessage" type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="code" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
...
<wsdl:message name="AuthenticationFailedFault">
<wsdl:part name="AuthenticationFailedFault" element="ns1:WebServiceFaultDetail"/>
</wsdl:message>
<wsdl:message name="ServiceNotAvailableFault">
<wsdl:part name="ServiceNotAvailableFault" element="ns1:WebServiceFaultDetail"/>
</wsdl:message>
<wsdl:message name="DeviceNotFoundFault">
<wsdl:part name="DeviceNotFoundFault" element="ns1:WebServiceFaultDetail"/>
</wsdl:message>
...
<wsdl:operation name="GetDeviceInformation">
<wsdl:input name="GetDeviceInformationRequest" message="tns:GetDeviceInformationRequest"/>
<wsdl:output name="GetDeviceInformationResponse" message="tns:GetDeviceInformationResponse"/>
<wsdl:fault name="AuthenticationFailedFault" message="tns:AuthenticationFailedFault"/>
<wsdl:fault name="DeviceNotFoundFault" message="tns:DeviceNotFoundFault"/>
<wsdl:fault name="ServiceNotAvailableFault" message="tns:ServiceNotAvailableFault"/>
</wsdl:operation>
But when generating a client from this WSDL, the generated Exception's faults are all named "WebServiceFaultDetail" instead of "AuthenticationFailedFault/DeviceNotFoundFault/ServiceNotAvailableFault":
public class AuthenticationFailedFault extends FaultInfoException
{
...
public static QName getFaultName() {
return new QName("http://www.arvato.de/telco/tass/service/web/deviceinformation/types", "WebServiceFaultDetail");
}
}
So when invoking the client, I get the following expected Exception:
java.lang.IllegalArgumentException: A fault with name [WebServiceFaultDetail] already exists in this operation
at org.codehaus.xfire.service.OperationInfo.addFault(OperationInfo.java:197)
at org.codehaus.xfire.service.binding.ObjectServiceFactory.addFault(ObjectServiceFactory.java:908)
at org.codehaus.xfire.service.binding.ObjectServiceFactory.initializeFaults(ObjectServiceFactory.java:881)
at org.codehaus.xfire.service.binding.ObjectServiceFactory.addOperation(ObjectServiceFactory.java:801)
at org.codehaus.xfire.service.binding.ObjectServiceFactory.initializeOperations(ObjectServiceFactory.java:706)
at org.codehaus.xfire.service.binding.ObjectServiceFactory.create(ObjectServiceFactory.java:410)
at org.codehaus.xfire.annotations.AnnotationServiceFactory.create(AnnotationServiceFactory.java:246)
at org.codehaus.xfire.service.binding.ObjectServiceFactory.create(ObjectServiceFactory.java:345)
at de.arvato.telco.tass.service.web.client.DeviceInformationServiceClient.create0(DeviceInformationServiceClient.java:59)
at de.arvato.telco.tass.service.web.client.DeviceInformationServiceClient.<init>(DeviceInformationServiceClient.java:26)
at de.arvato.telco.tass.service.web.client.DeviceInformationTestClient.main(DeviceInformationTestClient.java:18)
Fault names in the generated Exceptions should match the fault names in the operations and not their associated data elements, right?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email