I generated a SOAP client from WSDL using wsimport
(version "2.2.9") and I'm using it in a Java 8 application.
I'd like to trace XML messages sent/received by the client but I cannot find a working solution...
I tried using this approach this way:
public class TestClass {
public static void main(String[] args) {
System.setProperty("com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump", "true");
System.setProperty("com.sun.xml.ws.transport.http.HttpAdapter.dump", "true");
System.setProperty("com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump", "true");
System.setProperty("com.sun.xml.internal.ws.transport.http.HttpAdapter.dump", "true");
WSService wsService = new WSService();
WSSoap soapService = wsService.getWSSoap();
ServiceResponse response = soapService.callServiceMethod();
}
}
The request is executed correctly, but I cannot find any XML traced on standard output. What's wrong with this code?
For debugging soap request and responses in jetty on eclipse you can do the following.
-Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true
-Dcom.sun.xml.ws.transport.http.HttpAdapter.dump=true
-Dcom.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump=true
-Dcom.sun.xml.internal.ws.transport.http.HttpAdapter.dump=true
This was tested with a dynamic web project that had a servlet which called the webservice on load of the servlet.