I think I figured it out. FaultCodes aren’t part of SOAP1.1 spec if I remember correctly. The WSDL I used to generate the service doesn’t specify a version, so I’m assuming it’s defaulting to 1.1?
-----Original Message-----
From: Doolittle, Todd
Sent: Friday, October 27, 2006 1:33 PM
To: '[email protected]'
Subject: Axis 2 - AxisFault() ?
For testing I wrote an Axis 2 service that just does this in the generated skeleton…
throw new AxisFault("This is a fault message", "This is the fault code");
My client code does this when it catches the fault…
System.out.println("Fault = " + f);
System.out.println("Fault Reason = " + f.getReason());
System.out.println("Fault Code = " + f.getFaultCode());
The output is this…
Fault = org.apache.axis2.AxisFault: This is a fault message
Fault Reason = null
Fault Code = null
Any idea why I’m not getting the fault code?
Thanks!
Todd
