I have a w Spring MVC REST service that uses an XStream to convert messages to and from XML.
Is it possible to somehow print xml (i.e. body) from a request and response to a regular log4j logger?
Inside the controller it will not work, in addition, XStream will redirect the request and has not yet canceled the response.
The filter in the servlet is not very pleasant, because it will consume the body while reading it.
And this is where the ideas end. So-so? Any takers? :)
source share