Hi Jeff,

If you enable WS-Addressing (see the samples/ws_addressing demo for guidance) 
then you'll see <wsa:MessageId> headers in the outgoing requests and 
<wsa:RelatesTo> headers in the corresponding responses. 

These headers should enable you to correlate responses with requests. 

In fact, these headers are used internally by CXF to do the correlation in the 
decoupled case (i.e. where a separate server->client connection is used to 
carry the response back to the client).

Cheers,
Eoghan

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Tue 03/03/2009 21:48
To: [email protected]
Subject: Logging/Debugging Question
 
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-wssecurity-secext-1.0.xsd";
                        soap:mustUnderstand="1">
                        <wsse:UsernameToken
                                
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
                                
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
                                wsu:Id="UsernameToken-23612966">
                                <wsse:Username
                                        
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";>xxxxx</wsse:Username>
                                <wsse:Password
                                        
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
                                        
Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-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





Reply via email to