cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Maslov <therealma...@gmail.com>
Subject Re: Log incoming message with the corresponding response
Date Fri, 27 Nov 2015 19:21:29 GMT
Jim,
thank you for the answer, but that doesn't help me all.
I've checked , that in the BackChannelConduit class message is filled by
response with
 message.put(HTTP_RESPONSE, response) so later this could be read at the
post-invoke phase.
I believe, this could help for the case I have message body. But according
to the contract, I need to send empty messages with different HTTP status
(for example, "202 - Accepted" as the response for some service methods.
How could I get and log this status? There is no information on that kind
in the message, as far as I investigated.
So my question is still actual.

Sergey Maslov

On Fri, Nov 27, 2015 at 4:47 PM, Jim Talbut <jtalbut@spudsoft.co.uk> wrote:

>
>
> 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
>



-- 
*Sergey Maslov*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message