axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Eapen <>
Subject Fault/Exception Handling on Axis2
Date Fri, 24 Apr 2009 23:05:51 GMT
Hi ,

We are in the process of migrating from Axis1 to Axis2 and using Axis2
1.4.1. ( using adb )
I am having some trouble understanding the code generation regarding Fault
handling and mapping to Java Exceptions.

1. In Axis2, why are exceptions based of wsdl messages and not xsd elements
as was the case in axis1. ?

2. Is this an issue with wrapping/unwrapping of exceptions or something to
do with wsdl version (2.0 Vs 1.1) ?
    I know, things are proabably better with WSDL 2.0 but we are still on
wsdl 1.1, since I am not sure about wsdl 2 adoption.

3. In Axis2, how does one create a exception class hierarchy. (  fault2
extends fault1  etc etc ...) since its based on messages.

In my opinion, Axis1 was much better in this regard.

Appreciate any insight


   public  example.WithdrawResponse withdraw(example.Withdraw param0)
           throws InsufficientFundFaultMessage,

The WSDL sections are ..

<wsdl:message name="InsufficientFundFaultMessage">
        <wsdl:part element="tns:InsufficientFundFault" name="fault"/>

    <wsdl:message name="AccountNotExistFaultMessage">
        <wsdl:part element="tns:AccountNotExistFault" name="fault"/>

<element name="AccountNotExistFault">
                        <element name="account" type="xsd:string"/>

            <element name="InsufficientFundFault">
                        <element name="account" type="xsd:string"/>
                        <element name="balance" type="xsd:int"/>
                        <element name="requestedFund" type="xsd:int"/>

View raw message