I am using CXF on a command-line java application client to call a commercial 
.NET web service (Great Plains Web Service).   Under some circumstances 
(probably triggered by a technical issue or by data I feed it) the service 
throws an exception, but all I receive in the client side is 
"org.apache.cxf.binding.soap.SoapFault: The application encountered an 
unhandled system exception.  Contact your system administrator for details."

Clearly that doesn't tell me anything useful, so I wanted to see the SOAP 
request/response to see if there is more detail about the problem.

Following the documentation I could find I did the following:

1.- Added "-Dorg.apache.cxf.Logger=org.apache.cxf.common.logging.Log4jLogger" 
to the Eclipse run configuration program arguments for the app, so that logging 
will go to the Log4jLogger that the application uses.

2.- Added the LoggingFeature to my <jaxws:client> tag as follows:

  <jaxws:client id="gpClient" 
address="http://myGPServer/DynamicsGPWebServices/DynamicsGPService.asmx";
                
serviceClass="com.microsoft.schemas.dynamics.gp._2006._01.DynamicsX0020GPSoap" >
    <jaxws:features>
      <bean class="org.apache.cxf.feature.LoggingFeature" />
    </jaxws:features>
  </jaxws:client>

3.- Added the block to enable logging to the context file:
  <cxf:bus>
    <cxf:features>
      <cxf:logging/>
    </cxf:features>
  </cxf:bus>

And frustratingly... the SOAP message request/response does not go to the 
console nor log4j.

Where did I go wrong?


Reply via email to