I have a spring boot application,
- Packaged as war file
- Deployed in a tomcat 9.x
- The web app is calling third-party web-services using SOAP.
My problem was how to show the SOAP logs specifically in Tomcat container, because I can show the logs in Spring boot using the following code in Application's main method
System.setProperty("com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump", "true");
System.setProperty("com.sun.xml.internal.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.HttpAdapter.dump", "true");
System.setProperty("com.sun.xml.internal.ws.transport.http.HttpAdapter.dump", "true");
System.setProperty("com.sun.xml.internal.ws.transport.http.HttpAdapter.dumpTreshold", "999999");
But this didn't work in tomcat server. I have found the below post to build a Soap Handler to log requests:
https://stackoverflow.com/a/27468517/716865
What happened is the third-part responded with invalid name space error