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 al...@eiskonzept.com on 2004/03/23 10:34:20 UTC
Exception Handling
Hello,
I have "de.eis.ws.axis.WSException extends RemoteException" class on server
side.
Via Java2WSDL & WSDL2Java was generated "de.eis.ws.axis.WSException extends
AxisFault" for a client side.
When the Exception is triggered on the server side, a client receives the
following XML stream:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>de.eis.ws.axis.WSException</faultstring>
<detail>
<de.eis.ws.axis.WSException xsi:type="ns1:WSException"
xmlns:ns1="http://axis.ws.eis.de">
<message xsi:type="xsd:string" xsi:nil="true"/>
</de.eis.ws.axis.WSException>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Axis deserialize this Stream to an AxisFault.
Is there a way to deserialize this Stream to "de.eis.ws.axis.WSException
extends AxisFault" class,
which was generated via WSDL2Java?
Thanks in advance,
Alex.
Re: Exception Handling
Posted by Steve Loughran <st...@iseran.com>.
alexander@eiskonzept.com wrote:
> Hello,
>
> I have "de.eis.ws.axis.WSException extends RemoteException" class on server
> side.
> Via Java2WSDL & WSDL2Java was generated "de.eis.ws.axis.WSException extends
> AxisFault" for a client side.
> When the Exception is triggered on the server side, a client receives the
> following XML stream:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
>
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body>
> <soapenv:Fault>
> <faultcode>soapenv:Server.userException</faultcode>
> <faultstring>de.eis.ws.axis.WSException</faultstring>
> <detail>
> <de.eis.ws.axis.WSException xsi:type="ns1:WSException"
> xmlns:ns1="http://axis.ws.eis.de">
> <message xsi:type="xsd:string" xsi:nil="true"/>
> </de.eis.ws.axis.WSException>
> </detail>
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
>
> Axis deserialize this Stream to an AxisFault.
> Is there a way to deserialize this Stream to "de.eis.ws.axis.WSException
> extends AxisFault" class,
> which was generated via WSDL2Java?
In theory, Axis should follow the exception marshalling behaviour of
JAX-RPC. If this is not happening, then we have a bug.