FaultCode is not set in the AxisFault object
--------------------------------------------

                 Key: AXIS2-1533
                 URL: http://issues.apache.org/jira/browse/AXIS2-1533
             Project: Apache Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: client-api
    Affects Versions: 1.1
         Environment: java 1.4.2, tomcat 4, Axis 2 rc1 1.1
            Reporter: Todd Doolittle
            Priority: Blocker



I set this as a blocker because it's going to be a big problem for our 
organization.  We need to be able to see the fault codes coming back from 
existing services.  I understand if this is not considered a blocker by others.

I generated a service from WSDL using java2wsdl.  The skeleton simply does 
this...
throw new AxisFault("This is a fault message", "This is the fault code");

I then generated a client using wsdl2javva that catches the fault and does 
this...
        catch(AxisFault f)
        {
            System.out.println("Fault = " + f);
            System.out.println("Fault Reason = " + f.getReason());
            System.out.println("Fault Code = " + f.getFaultCode());
        }


The output from the client looks like this...
Fault = org.apache.axis2.AxisFault: This is a fault message
Fault Reason = null
Fault Code = null

The <faultcode> element is definately in the XML.  When I hit the service with 
a non-axis2 client I get the fault code.  But the axis 2 client 
fault.getFaultCode() always returns NULL.The XML from the service looks like 
this...

HTTP/1.1 500 Internal Server Error
Set-Cookie: JSESSIONID=1CCF3E951167E01316F12E7EC314837B; Path=/axis2
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Fri, 27 Oct 2006 18:44:06 GMT
Server: Apache-Coyote/1.1
Connection: close

f12
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope
   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
   <soapenv:Header />
   <soapenv:Body>
      <soapenv:Fault
         xmlns:axis2="http://ws.apache.org/namespaces/axis2";>
         <faultcode>axis2:This is the fault code</faultcode>
         <faultstring>This is a fault message</faultstring>
         <detail>
            <Exception>
               org.apache.axis2.AxisFault: This is a fault
               message&#xd; at
               org.tempuri.DbpocSkeleton.Dbinfo(DbpocSkeleton.java:26)&#xd;
               at
               
org.tempuri.DbpocMessageReceiverInOut.invokeBusinessLogic(DbpocMessageReceiverInOut.java:53)&#xd;
               at
               
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:39)&#xd;
               at
               
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:497)&#xd;
               at
               
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:324)&#xd;
               at
               
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:203)&#xd;
               at
               javax.servlet.http.HttpServlet.service(HttpServlet.java:716)&#xd;
               at
               javax.servlet.http.HttpServlet.service(HttpServlet.java:809)&#xd;
               at
               
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)&#xd;
               at
               
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)&#xd;
               at
               
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)&#xd;
               at
               
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)&#xd;
               at
               
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)&#xd;
               at
               
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)&#xd;
               at
               
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)&#xd;
               at
               
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)&#xd;
               at
               
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)&#xd;
               at
               
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)&#xd;
               at
               
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)&#xd;
               at
               
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)&#xd;
               at
               
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)&#xd;
               at
               
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)&#xd;
               at
               
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)&#xd;
               at
               
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)&#xd;
               at
               
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)&#xd;
               at
               
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)&#xd;
               at
               
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)&#xd;
               at
               
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)&#xd;
               at
               
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)&#xd;
               at
               
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)&#xd;
               at
               
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)&#xd;
               at
               
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)&#xd;
               at
               
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)&#xd;
               at
               
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)&#xd;
               at
               
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)&#xd;
               at
               
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)&#xd;
               at java.lang.Thread.run(Thread.java:534)&#xd;
            </Exception>
         </detail>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>
0






-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to