I am having the next problem:
I want to log the SOAP requests/responses that land on my web service (server side). Trying to configure my web service in the wsdd file. I am always landing on pages like the next one:
How to use the org.apache.axis.handlers.LogHandler
Which recommends to configure the Apeche Axis LogHandler to log the request/response. That is not valid for me, since a)there is no way to link the log4j there, and b)I just am not able to make it work.
Does anyone know a way to make my log4j to log the request/responses?
So after hours or Googling out there in the web, I decided to get adventurous and program my own handler. Is much easier than expected.
I made a class that extends the abstract class BasicHandler (org.apache.axis.handlers.BasicHandler), and implements the invoke method loging the request or the response. Here is my class, which I have baptized as SOAPLogHandler :
The idea is, to log first the request, and when processed, log the response. So, in the server-config.wsdd (or the wsdd file from your client if you are in the client side), we have to add a handler pointing to that class, and configure it to uses in the request/response chain:
1st add the handler
2nd add the use of that handler to the request/response from the http transport (focus on the log handler)
With that, the magic should be done, and you should receive a pretty log from the request/responses!
Disclaimer: I am not really sure from what will happend if you use some kind of SOAP multipart thing.