I have an Axis client stub which was generated from WSDL. *All* of the client-side user-defined exceptions extend org.apache.axis.AxisFault.

The equivalent exceptions at the server also extend org.apache.axis.AxisFault, rather than Exception.

This is a decidedly dodgy area, imo, especially when it comes to interop with non-Axis clients.


From: Jack Lund <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: RE: Problems getting user exceptions to work
Date: Wed, 29 Mar 2006 14:51:47 -0600

Nope, didn't work. Wouldn't think it would - AxisFault isn't a subclass of InvalidDateException.

-Jack

Jarmo Doc wrote:

Try doing this:

catch (AxisFault ex)
{
if (ex instanceof InvalidDateException)
{
InvalidDateException myex = (InvalidDateException)ex;
// deal with myex here
}
// deal with others here
}


From: Jack Lund <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: Problems getting user exceptions to work
Date: Wed, 29 Mar 2006 12:21:33 -0600

Hi. I'm using axis 1.2.1, and I'm trying to get the exceptions sent by my service thrown to the client. For instance, my service can throw an "InvalidDateException" exception, which is a subclass of java.lang.Exception, and I want the client code to get that exception. What little is said on the axis website about this implies that it should "just work", but it doesn't seem to - what I get on the other side is an AxisFault with the message string from my exception embedded inside.

Is there something special I have to do, on either side, to get this to work?

Thanks.

-Jack


_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/



_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

Reply via email to