I just added a simple atomically incrementing integer "ID" to the the logging 
interceptors to make this work easier without resorting to using ws-
addressing.   Also made it log the URI of the request on the incoming requests 
so you can tell which service it's intended for.

Dan


On Tue March 3 2009 4:48:00 pm [email protected] wrote:
> To All,
>
> I have enabled Log4j logging in my CXF application which works nicely. As
> you can see below the logging is working and I can see my inbound and
> outbound SOAP messages.
>
> I don't see a unique message ID in the SOAP messages that would tie the
> response to the request.
>
> Is there a unique "id" in the request message that is returned in the
> response message that I can use to tie the response to a specific request.
> Maybe I am just not showing it in my log file. I see the
> wsu:Id="UsernameToken-23612966" which might be unique for the request but
> the SOAP header is not in the response.
>
> Any thoughts are gratefully appreciated.
>
> Thanks,
>
> Jeff
>
>
> LOG SAMPLE:
>
> 13:11:36,540 INFO LoggingInInterceptor:132 - Inbound Message
> ----------------------------
> Encoding: UTF-8
> Headers:
> {content-length=[1031], connection=[keep-alive],
> cache-control=[no-cache], host=[localhost:8080],
> user-agent=[Java/1.5.0_16], SOAPAction=[""], pragma=[no-cache],
> content-type=[text/xml; charset=UTF-8], Accept=[*]}
> Messages:
> Message:
>
> Payload:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
>         <soap:Header>
>                 <wsse:Security
>                        
> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecur
>ity-secext-1.0.xsd" soap:mustUnderstand="1">
>                         <wsse:UsernameToken
>                                
> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecur
>ity-secext-1.0.xsd"
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri
>ty-utility-1.0.xsd" wsu:Id="UsernameToken-23612966">
>                                 <wsse:Username
>                                        
> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecur
>ity-secext-1.0.xsd">xxxxx</wsse:Username> <wsse:Password
>                                        
> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecur
>ity-secext-1.0.xsd"
> Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-toke
>n-profile-1.0#PasswordText">xxxxx</wsse:Password> </wsse:UsernameToken>
>                 </wsse:Security>
>         </soap:Header>
>         <soap:Body>
>                 <ns2:addCustomer
> xmlns:ns2="http://server.cxf.asi.cox.com/";> <arg0>
>                                 <name>CXF</name>
>                         </arg0>
>                 </ns2:addCustomer>
>         </soap:Body>
> </soap:Envelope>
> --------------------------------------
>
> 13:11:36,610 INFO
> LoggingOutInterceptor:131 - Outbound Message
> ---------------------------
> Encoding: UTF-8
> Headers: {}
> Messages:
> Payload:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
>         <soap:Body>
>                 <ns2:addCustomerResponse
> xmlns:ns2="http://server.cxf.asi.cox.com/";> <return>
>                                 <id>4</id>
>                                 <name>CXF</name>
>                         </return>
>                 </ns2:addCustomerResponse>
>         </soap:Body>
> </soap:Envelope>
>
>
>
> Jeffrey M. Constantin | Cox Communications Inc.
> Data Product Services (DPS) | Architecture & Systems Integration (ASI)
> Desk: 404-269-3111 | Mobile: 678.643.6528

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to