I created a class that intercepts a SOAP messaging request-response loop, and I wanted to register messaging. What is the best way so that I can write a SOAP message to a log file?
I do not want it to be quite printed in my log file, but I just want to access and view the SOAP request and response envelope.
I tried with this code:
public class LogHandler{ private static final Logger _LOG; @Override protected void handleResponse(SOAPMessage message) logSOAPMessage(message); } @Override protected void handleRequest(SOAPMessage message) logSOAPMessage(message); } private void logSOAPMessage(SOAPMessage message){ _LOG.info(":: Logging SOAP Message :: " + message.toString()); } }
But does not receive the required message.
:: Logging SOAP Message :: oracle.j2ee.ws.saaj.soap.soap11.Message11@715346
Any clues?
source share