This is a really good article discussing handling Exceptions from JAX-WS services over the wire:
http://io.typepad.com/eben_hewitt_on_java/2009/07/using-soap-faults-and-exceptions-in-java-jaxws-web-services.html On Fri, Jun 8, 2012 at 7:21 AM, Jim Talbut <[email protected]> wrote: > Hi, > > How can my CXF client tell what type of thing went wrong? > I want to be able to classify faults into network faults and remote server > faults, because the response to the two is very different. > If I simply call the proxy with a few different failures all I get is a > SOAPFaultException with a cause of a SoapFault exception. > I was hoping that the network fault would have a root cause of some kind > of IOException. > > This pair was caused by accessing a port that wasn't listening: > TestBrokenNetwork::test1] Exception: class > javax.xml.ws.soap.**SOAPFaultException: > Could not send Message. > TestBrokenNetwork::test1] Exception: class > org.apache.cxf.binding.soap.**SoapFault: > Could not send Message. > > This was caused by an IllegalArgumentException thrown within the server > implementation: > TestLogging::testException] Exception: class > javax.xml.ws.soap.**SOAPFaultException: > You passed in the illegal word > TestLogging::testException] Exception: class org.apache.cxf.binding.soap.* > *SoapFault: You passed in the illegal word > > This was caused by an explicit throw of a SoapFault by the server > implementation: > TestLogging::testSoapFault] Exception: class > javax.xml.ws.soap.**SOAPFaultException: > You passed in the triger word > TestLogging::testSoapFault] Exception: class org.apache.cxf.binding.soap.* > *SoapFault: You passed in the triger word > > Is there any way to get more detail for classification? > > Thanks. > > Jim > *Mark** *
