I have a web service Client class that establishes a connection with the destination server using the wsdl url. This class uses JaxWsProxyFactoryBean and the WSS4JOutInterceptor to establish a secure connection. I would like to see the SOAP request generated by my code and response generated from the server.
I have tried including the following options when I run my jar from the command line
-Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true
-Dcom.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump=true
-Dcom.sun.xml.ws.transport.http.HttpAdapter.dump=true
-Dcom.sun.xml.internal.ws.transport.http.HttpAdapter.dump=true
I am using log4j for logging and all the messages get written to a custom file. How can I dump the SOAP request/responses to this same file using command line options?
Do I have to make any code changes to the Client class to achieve this?
Thanks for the help.