Rob,
 
    I am experimenting with custom error handling and interop. This is what I have to 
share - I wrote a custom class that extends java.rmi.RemoteException and implements 
Serializable (I think you are missing the implements Serializable part). It works just 
fine for me. On the .NET side I was able to catch the exception (auto generated C# 
client from the WSDL). I saw the SOAP message being exchanged and saw the details of 
the fault as I had wanted it to be. Also, here are some articles that I found which I 
think are helpful -

1.  http://www.mail-archive.com/[EMAIL PROTECTED]/msg14457.html
2.  http://www.mail-archive.com/[EMAIL PROTECTED]/msg03552.html
3.  http://www-106.ibm.com/developerworks/webservices/library/ws-fault/
4.  http://blogs.hoderi.com/acaforming/archives/000011.html


        But, in spite of different experiments that I have conducted and reading all 
the information above I have not been able to come to a decision as to what is the 
best practice for doing error handling when writing a production quality web service 
keeping different types of clients in mind. Do others have any suggestions to offer?

Thanks
Srinivas



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 17, 2003 10:20 AM
To: [EMAIL PROTECTED]
Subject: Custom Exceptions & non-axis clients


I know this has been discussed before here, but I can't seem to find a solution.  
Hoping someone can provide assistance.

I've created a custom exception class with some extra error info which I want my 
service methods to throw.  When I run wsdl2java, Axis creates the class as a subclass 
of org.apache.axis.AxisFault, which results in the serialized object belonging to the 
axis namespace and being unparsable by non-axis clients.  I've tried changing the 
generated code so that it simply extends java.rmi.RemoteException, but then the 
additional error details are not serialized and sent back to the client.  Is there an 
easy solution to this problem which would allow me to send back exceptions parsable by 
any SOAP client?

thanks.

-rob

Reply via email to