axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bredow, Helg H KALIDO-KRDD" <>
Subject Custom Faults
Date Thu, 29 Aug 2002 16:37:49 GMT
Does Axis support custom faults?

For example, if I have the following method in my service:

    public void throwException() throws MyException {
        throw new MyException(100);

The Java2WSDL compiler will nicely generate the following:

      <wsdl:operation name="throwException">
         <wsdl:input message="intf:throwExceptionRequest"/>
         <wsdl:output message="intf:throwExceptionResponse"/>
         <wsdl:fault message="intf:MyException" name="MyException"/>

If I run the WSDL2Java compiler it will diligently generate a similar method
on the generated proxy class. But when I invoke that method it doesn't throw
MyException, instead it throws an AxisFault that contains the stack trace.
It's just a generic SOAP Fault.

I'm using Beta 1 (because that's what Preview Release 3 of the Borland Web
Services uses). I downloaded Ant 1.5 and the latest nightly build (Aug 29)
but couldn't get it to compile.

Can anyone tell me whether support for custom exceptions has been included
in the newer builds?



View raw message