You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Doolittle, Todd" <TD...@searshc.com> on 2006/10/27 19:33:19 UTC

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

RE: Axis 2 - AxisFault() ?

Posted by "Doolittle, Todd" <TD...@searshc.com>.
Oops I was mistaken again.  FaultCodes should come through SOAP1.1.  I
hit my service with a non-axis2 client and it does get the FaultCode
back.  Any ideas?

		-----Original Message-----
		From: Doolittle, Todd 
		Sent: Friday, October 27, 2006 1:39 PM
		To: Doolittle, Todd; 'axis-user@ws.apache.org'
		Subject: RE: Axis 2 - AxisFault() ?


		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: 'axis-user@ws.apache.org'
				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

RE: Axis 2 - AxisFault() ?

Posted by "Doolittle, Todd" <TD...@searshc.com>.
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: 'axis-user@ws.apache.org'
		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