axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cory Wilkerson" <>
Subject exception handling
Date Tue, 26 Aug 2003 22:34:20 GMT

I noticed in the jax-rpc specification that in order to succesfully throw exceptions to the
client, there are some pretty strict rules regarding devloping your own exception types:

1. Each parameter supplied to the constructor must have a corresponding accessor.
2. Each accessor must have corresponding parameter in constructor.
3. The parameter type of each arg. in constructor must match the treturn type of accessor.
4. Must be only one accessor with a given return type. 

My question is -- do we need to conform to the above rules in order for Axis to appropriately
serialize exceptions?  I've noticed that if I simply provide a beanMapping for my exception
class and provide the appropriate wsdl message definition, operation (included wsdl:fault),
and soap binding for my fault -- exceptions seem to serialize just I would expect (in the
detail element of the soap fault).  That said, my exception does conform to all but one of
the rules, I have two ints in my exception class.

Additionally, when it comes time to ship this down to the user, how can I get ahold of the
faultCode element and set it to client || server?


View raw message