Accessing XML payload of Metro 2.0 Request/Response Web Service
I am develo开发者_如何学JAVAping a web service, using Metro 2.0 and Tomcat 6, and I have a requirement to be able to log the XML payload of the request and response of a web method for development/support reasons. The payload would only be logged when in debug mode.
The Web Service uses a servlet implementation (com.sun.xml.ws.transport.http.servlet.WSServlet and .WSServletContextListener classes), if that affects the answer.
Is this even possible?
Thanks in advance, Andy
Try setting these system properties:
-Dcom.sun.metro.soap.dump=true
-Dcom.sun.xml.ws.assembler.client=true
The SOAP messages go to system out, which I believe Tomcat logs.
精彩评论