If I have a Java interface that I am going to be turning into
a web service (with AXIS and the Java2WSDL and WSDL2Java tools).

Should I define a hierarchy of exception classes that could be
thrown from the server. e.g.

Exception <--- MyServiceException
MyServiceException <---- InvalidOperationException
InvalidOperationException <---- LogonFailure
MyServiceException <---- InvalidKeyException

So I end up with a complex hierarchy of exceptions. But then AXIS
will have to transport and de-derialize across the wire with all
the complexities involved.

Or should I just have a single exception class (MyServiceException)
containing error code information?
This second approach sounds easier for AXIS.

Thanks for any advise,
Stuart.



Reply via email to