axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: Exception Handling - possible solution
Date Mon, 05 Apr 2004 22:15:29 GMT

when I invoking the "getQuote" method, I am getting following xml stream:
  <?xml version="1.0" encoding="UTF-8"?>
  <soapenv:Envelope xmlns:soapenv=""

Axis (1.2 alpha) deserialize this stream to
"com.test.InvalidTickerFaultMessage" class, but the InvalidTickerFaultMessage
attribute "tickerSymbol" is missing in this xml stream. Additionally the
generated "com.test.InvalidTickerFaultMessage" class extends
"org.apache.axis.AxisFault" - it is not correct. JAX-RPC saith that
exceptions must extends "java.rmi.RemoteException" and the webservice classes
(actions) must not know that they are used by Axis (or SOAP2.3 or ...). And
when the InvalidTickerFaultMessage class extends "java.rmi.RemoteException",
Following xml stream will generated:
  <?xml version="1.0" encoding="UTF-8"?>
  <soapenv:Envelope xmlns:soapenv=""


Many thanks for help and your time
Alexander Becker.

-----Ursprüngliche Nachricht-----
Von: Tom Jordahl [] 
Gesendet: Freitag, 2. April 2004 00:10
An: ''
Betreff: RE: Exception Handling - possible solution

You are enhancing the Axis specific Hack that send the class name of the
exception over the wire.  I invented this (and it was bad) a long time ago.

Axis now uses the <details> element in the fault to locate the correct
Exception class.  A table of QNames to Exception class names is kept and each
child element of <details> is looked up in this table until we find a match
(or don't, then we throw an AxisFault).

This functions correctly, see java/test/wsdl/faults for some test cases that
Tom Jordahl
Macromedia Server Development

-----Original Message-----
Sent: Thursday, April 01, 2004 3:24 PM
Subject: AW: Exception Handling - possible solution


I looked through the sourcecode of Axis 1.1. By a few small changes can xml
stream deserialized correctly. In the attachment of this email lie 3 classes,
which I changed. The changes, which I made are commented und can be found by
searching for "007". Can someone look through the changes and say whether it
ok is or perhaps You be able to use the changes in the next Version.

Excuse me for my englich.

Many Thanks,
Alexander Becker

-----Ursprüngliche Nachricht-----
Von: Steve Loughran [] 
Gesendet: Dienstag, 23. März 2004 11:08
Betreff: Re: Exception Handling wrote:
> Hello,
> I have " extends RemoteException" class on 
> server side. Via Java2WSDL & WSDL2Java was generated 
> " 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=""
>     xmlns:xsd=""
> xmlns:xsi="">
>    <soapenv:Body>
>     <soapenv:Fault>
>      <faultcode>soapenv:Server.userException</faultcode>
>      <faultstring></faultstring>
>      <detail>
>       < xsi:type="ns1:WSException" 
> xmlns:ns1="">
>        <message xsi:type="xsd:string" xsi:nil="true"/>
>       </>
>      </detail>
>     </soapenv:Fault>
>    </soapenv:Body>
>   </soapenv:Envelope>
> Axis deserialize this Stream to an AxisFault.
> Is there a way to deserialize this Stream to 
> " 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.

View raw message