I may be misunderstanding your question but since I can throw an AxiFault shouldn't I be able to throw a descendent of AxisFault and, assuming it is a known type, expect the serialization to occur?
Sylvain. -----Original Message----- From: Bob Cotton [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 8:41 PM To: [EMAIL PROTECTED] Subject: Re: Custom Exceptions >>>>> "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 This message may contain privileged and/or confidential information. If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you.
