>>>>> "Sam" == Sam Kapoor <[EMAIL PROTECTED]> writes:
Sam> Hi: what I want to do is write a custom exception class and
Sam> propagate it from one of the methods on my Web-Service to the
Sam> client. So I define a Java exception class:
Sam> public class EInvalidCustomer extends Exception {
Sam> public EInvalidCustomer(String err){
Sam> super(err);
Sam> }
Sam> The method on my web-service throws this EInvalidCustomer
Sam> exception. Now I run the WSDL2Java and I get public class
Sam> EInvalidCustomer extends org.apache.axis.AxisFault
Sam> Also in my WSDL I have a <wsdl:fault
Sam> message="intf:EInvalidCustomer" name="EInvalidCustomer"/>
Sam> So in my client when I call the method I catch 2 exceptions,
Sam> 1 is the RemoteException and the other is EInvalidCustomer
Sam> excpetion. However, the catch is always going to the
Sam> RemoteException. Now if I replace EInvalidCustomer with
Sam> AxisFault then the catch will go to the AxisFault.
Sam> I cannot find any example on Axis doc's that show how to pass
Sam> a custom exception class.
Sam> Do you have any ideas????
Working through this same issue now.
Axis can describe the Exception in the WSDL (as you've discovered),
but actually SENDING the data is not implemented.
Until this happens I'm hacking something in using custom Handlers and
SOAP headers to pass the data in my exception.
Can the development guys shed some light on this? Possibly by beta3?
Thanks
- Bob
--
SynXis Corporation | [EMAIL PROTECTED] | Obstacles are those frightful
1610 Wynkoop, Suite 400 | Ph: (303)595-2511 | things you see when you take your
Denver, CO 80202 | Fax:(303)534-4257 | eyes off your goal. -Henry Ford