You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Peter Canning (JIRA)" <ax...@ws.apache.org> on 2004/11/11 21:39:23 UTC

[jira] Updated: (AXIS-1662) Missing xsi:type when a web service throws a fault that is an extension of the declared fault

     [ http://nagoya.apache.org/jira/browse/AXIS-1662?page=history ]

Peter Canning updated AXIS-1662:
--------------------------------

    Attachment: exceptionTest.wsdl
                exceptionTestClient.java
                ExceptionTestBindingImpl.java

I've attached the WSDL file, the test client exceptionTestClient.java, and the ExceptionTestBindingImpl.java containing the implementation of the web service operations.
I generate the client and server stubs using the following commands:
WSDL2Java -v -p exceptionTest.client -o stubs exceptionTest.wsdl
WSDL2Java -v -p exceptionTest.server -o stubs --server-side --skeletonDeploy true exceptionTest.wsdl

The erroneous behavior occurs after line 43 of ExceptionTestBindingImpl.java, where the method throwException() throws derivedException.
The erroneous behavior occurs when serializing the fault in response to the method throwException() throwing derivedException at line 43 of ExceptionTestBindingImpl.java.

> Missing xsi:type when a web service  throws a fault that is an extension of the declared fault
> ----------------------------------------------------------------------------------------------
>
>          Key: AXIS-1662
>          URL: http://nagoya.apache.org/jira/browse/AXIS-1662
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2RC1
>  Environment: Linux (debian testing distribution)
> JDK 1.4.2 (blackdown 1.4.2-rc1)
> Axis 1.2RC1
>     Reporter: Peter Canning
>  Attachments: ExceptionTestBindingImpl.java, exceptionTest.wsdl, exceptionTestClient.java
>
> I started from a WSDL specification that defines a complexType BaseException which is used as the type of an element used in a message that us used for the fault of an operation.  It also defines a complex type DerivedException that is an extension of BaseException.  I generate both server and client stubs using WSDLToJava, and fill in the bodies of the methods in the ...Impl class in the server stubs.  I then write a client using client stubs to exercise the web service.
> Using SimpleAxisServer to run the web service, when the ...Impl method (which is declared to throw a BaseException) throws a DerivedException, the web service correctly serializes the additional elements in the DerivedException, but it does not serialize an xsi:type to specify that the element has type DerivedException rather than BaseException.  As a result, the Axis client fails, reporting the error:
> Exception in thread "main" AxisFault
>  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
>  faultSubcode: 
>  faultString: org.xml.sax.SAXException: Invalid element in exceptionTest.client.BaseException - size

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira