axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Ewins <Brian.Ew...@btinternet.com>
Subject Re: Some help with the usage and notion of FAULT messages!
Date Mon, 17 Feb 2003 17:18:03 GMT


Apostolopoulos Paris wrote:
> Thank you very much brian! 
> To tell you the truth I was thinking of changing the Style of my web
> service and move to a message driven one where there you have more
> processing power to the logic of the request.What do you think!

The answer is just 'it depends'. RPC and Messaging styles both have 
advantages in different circumstances.

> The thing I know from my short experience is that Throwing a exception
> IS Not the appropriate way to indentify an error generally, and FAULTS
> in AXIS can wrap exceptions or form itself an exception.Or am I wrong?

This is correct, if you throw an exception it will be wrapped up as an 
AxisFault for you (which becomes a SOAP Fault, eventually). The special 
thing about SoapFaultExceptions was supposed to be that you can specify 
everything you want to be in the SOAP Fault, instead of just settling 
for the defaults. This is important for interoperability if you have 
specified 'detail' sections you're going to throw in your WSDL.

As for whether to use exceptions or error codes, there's a lot of 
discussion of topics like that here, might be of interest:
http://c2.com/cgi/wiki?ExceptionPatterns

Cheers,
	Baz


Mime
View raw message