Re: Handling internal errors via SOAP faults

2008-03-08 Thread Glen Mazza
://www.jroller.com/gmazza/date/20080308#MTstep6 Glen -- View this message in context: http://www.nabble.com/Handling-internal-errors-via-SOAP-faults-tp15892864p15919990.html Sent from the cxf-user mailing list archive at Nabble.com.

Handling internal errors via SOAP faults

2008-03-07 Thread Glen Mazza
Hello, I have a general question for WSDL design regarding internal web service errors not the fault of the SOAP client request, such as database unavailable or system down or whatever. For example, let's say I have a simple GetCapital web service that takes a country and returns the name of its

Re: Handling internal errors via SOAP faults

2008-03-07 Thread David CastaƱeda
Glen, I have been fighting against this sort of questions from several weeks now, I start a sample project that is on Jira about correct handling, unfortunately I haven't found an answer from someone who know, neither I have found the way to produce correct code for server, client faults. Anyway

Re: Handling internal errors via SOAP faults

2008-03-07 Thread Daniel Kulp
In general, the jaxws way of doing this is to map the runtime exceptions to a very generic soap fault that is fault code SERVER and just the message (ex.getMessage()) is set into the fault message. On the client side, this ends up throwing the generic SOAPFaultException (but with the correct

Re: Handling internal errors via SOAP faults

2008-03-07 Thread Scott Anderson
I use a fault called OperationFailedFault, and set its payload to the root exception's message: try { context.commitChanges(); } catch(Exception e) { context.rollbackChanges(); throw new OperationFailedFault(e.getMessage(), Commit failed, e);

Re: Handling internal errors via SOAP faults

2008-03-07 Thread Daniel Kulp
On Friday 07 March 2008, David CastaƱeda wrote: Glen, I have been fighting against this sort of questions from several weeks now, I start a sample project that is on Jira about correct handling, unfortunately I haven't found an answer from someone who know, neither I have found the way to