I'm using Axis2-1.6.2 in a highly modified Tomcat6 environment hosting a web service and need to log every incoming Axis2 web service request.
This is for a production environment and I want all requests (SOAP messages) to be logged into a log file.
For valid requests (valid request structure conform with the WSDL), this works fine, because I can log the request body after it has been parsed by Axis2. The problem is with malformed requests, which are declined by Axis2 and don't come through to my code.
I've tried a lot so far to log these wrong requests as well, but none of the proposed (easy) solutions worked. I basically just want to set a logback appender (SLF4J) or add some -Dparameter to the Java process to motivate Axis2 to log every incoming message into a file and couldn't believe that apparently there is no easy way to do that.
- I can't really use some proxy like Fiddler to do the logging either (environment restrictions).
<handler type="java:org.apache.axis.handlers.LogHandler"/>
didn't work either, because it's not Axis1.- The Dparameter described here didn't do anything either.
It seems to me that the only solution is to write a custom handler, which does the logging. However, this seems to be too much effort and customization for an established technology and an obvious use case. I do have guides how to do that like axis2 Log Response with Request and Java Example - Loghandler.java.
Isn't there an easier (more native) way?