dkulp wrote:
>
> 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 message set).
>
Thanks for the tip. I used the convenience function in our systests that
did that:
private SOAPFaultException createSOAPFaultException(String faultString) {
try {
SOAPFault fault = SOAPFactory.newInstance().createFault();
fault.setFaultString(faultString);
fault.setFaultCode(new QName("http://example.org/faultcode",
"Server"));
return new SOAPFaultException(fault);
} catch (SOAPException e) {
// do nothing
}
return null;
}
A full sample is here: http://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.