Hi, My statement was incorrect, sorry for that. Logging interceptors write encrypted messages, because they use either with OutputStream or Writer content and logging only after encryption on the XML level (SOAPMessage in 2.7.X and XMLStream in 3.0.0).
Dan, thanks for providing comprehensive answer. Regards, Andrei. > -----Original Message----- > From: Daniel Kulp [mailto:[email protected]] > Sent: Dienstag, 13. Mai 2014 17:01 > To: [email protected]; Giriraj Bhojak > Subject: Re: Logging clear-text message > > > 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 <[email protected]> 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 > [email protected] - http://dankulp.com/blog Talend Community Coder - > http://coders.talend.com
