On 27/11/2015 08:07, Sergey Maslov wrote:
Hi. My application provides SOAP web services using CXF. I need to log incoming request with the corresponding response from my webservice. I've check the interceptor phases for the incoming chain but it looks like I have no information about outgoing message body. Maybe I should use some observer (like message observer for the outgoing message)? Could you help me?
I wrote an interceptor (which unfortunately I can't open source) that records every message in a database, along with a correlation ID and a value to indicate whether it is an inbound/outbound request/response (four possiblities). The code was largely based on the logging interceptor (https://github.com/apache/cxf/blob/master/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java).
There are two interceptors (in and out) both of which pass most of the work on to a common class. It also has options about where to put the result record - in live it goes to a database and in test it outputs a bit like the logging interceptor.
Jim