You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Steve Loughran <st...@iseran.com> on 2003/09/09 05:15:45 UTC

Re: Soap Fault Explanation

Glen Daniels wrote:

> Guys:
> 
> I haven't really been following this thread, but I have a question/comment.
> 
> It seems to me that whenever you create an Exception from a fault defined in a WSDL file, you KNOW that that Exception is going to be delivered as a result of a SOAP fault.  Why wouldn't you want the resultant Exception class to inherit from AxisFault, and thus provide the developer with easy access to the SOAP headers, fault code, etc....?  While it's certainly true the original developer may have started from Java classes to generate the WSDL, and the original Exception they're throwing might not extend AxisFault, the whole point of WSDL is to insulate the client from the implementation details of the service provider.  Therefore if the Exception is a SOAP fault in the WSDL, shouldn't it be an AxisFault subclass in the generated code?

I guess not deriving from AxisFault gives more cross JAX-RPC options, 
though I like the model that 'all exceptions should derive from 
RemoteException', as so many of the default signatures of the client 
stuff say 'throws RemoteException'. To handle other types will mean 
signature fixup.