Hi,

I think you can take a look at the cxf LoggingOutInterceptor, that could be very similar with your requirement, the only difference is it dump the message to console, you can dump the message to your database. Basically it register a callback and when close outputsteam, the callback is invoked to dump the message.

Freeman
On 2011-4-22, at 下午4:08, MARTELLI Julien wrote:

Hi all,

I am wondering how can I retrieve the content (ex : a stream) of the generated SOAP request on my CXF client. The idea is that our consumer needs to persist the generated SOAP request in database for tracing purpose.

I am thinking of developping an interceptor binded to the proper phase to solve this.
I have several questions regarding this :

- Do you think this is a good idea ? Is there a better way to achieve this (maybe a CXF build-in functionnality ?) ?

- Thinking of developping an interceptor I am wondering how to achieve this ?

o The message seems to be completely written after the StaxOutEndingInterceptor execution

o If I bind my interceptor just after this StaxOutEndingInterceptor will it be easy to get the message content ?

Any help will be appreciated !

Thanks

---------------------------------------------
Freeman Fang

FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
Connect at CamelOne May 24-26
The Open Source Integration Conference








Reply via email to