Dan,
What you say is precisely what I was expecting, but I wasn't seeing it.
And that's because I had a proxy that was mangling the exception as seen
at the client end.
Doh! Doh! Doh!
Sorry for wasting everyones' time.
Jim
On 08/06/2012 20:10, Daniel Kulp wrote:
On Friday, June 08, 2012 08:05:23 PM Jim Talbut wrote:
Thanks, it is a good article, but I've already got that aspect working.
If I throw a SOAP fault (whether declared in the WSDL or not) everything
behaves as I want it to.
The problem is that the CXF client is converting an IOException into a
SoapFault and losing the IOException.
It does log when it does this, but I want the information available to
my client.
Any original exception from the client side should be available in the
"cause" of any exception we through. You may want to check those.
Dan
Jim
On 08/06/2012 19:20, Mark Streit wrote:
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**