The Logging interceptors run at a byte stream level and only would see the 
“secured” message.   To log the unsecured message, you would need to write a 
different interceptor to handle that.  Unfortunately, its also going to be 
different for CXF 2.7.x and CXF 3.x due to changes in the security handling.

For 2.7.x, you can write an interceptor that would run after the 
WSS4JInInterceptors that would do a:

message.getContent(Document.class)

and prints the DOM.    For 3.x with the new streaming security interceptors, it 
would be way more complex.   You’d have to grab the XMLStreamReader from the 
message, wrapper it with a new stream reader that would then record the read 
events.   (the wrapped stream reader method would also work for 2.7.x, but like 
I said, a bit more complex to write)

Dan



On May 12, 2014, at 6:05 PM, Giriraj Bhojak <girira...@gmail.com> wrote:

> Hi,
> 
> I am using cxf (2.7.8 )with wss4j(1.6.13).
> For the sake of debugging I need to see the outgoing messages.
> I have added cxf:inInterceptors and cxf:outInterceptors in the spring
> config.
> This helps me see the signed and encrypted message.
> Is there a way to see the clear-text version of the message?
> I have used JAXB marshaller to print the message but I am trying to avoid
> writing any code to see the message.
> 
> Thanks,
> Giriraj.

-- 
Daniel Kulp
dk...@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to