Hi,

I think you can still use CachedOutputStream which is used in LoggingInInterceptors(as you already mentioned). Not sure why you don't wanna save it into a file, but actually you can control to save it always in memory(although it's not a good idea for very large message). By default only message size bigger then 64k(DEFAULT_THRESHOLD) will save as a temp file, you can change the DEFAULT_THRESHOLD through java system property "org.apache.cxf.io. CachedOutputStream.Threshold".

Also CachedOutputStream.toString() method can help you to write the stream content into a String.

Freeman

On 2010-11-12, at 下午3:06, Oliver Wulff wrote:

Hi all



A web service provider has deployed an interceptor which should log the incoming message in a similar performant way as the logging interceptor but not into a file. Instead the incoming message is sent as part of a web service call with other monitoring related information. The message is passed as an any type.



I want to avoid that a DOM tree is created when filling the any type. I have to make a copy of the message because the message is sent in a seperated thread (scheduler) to not block processing of the incoming request.



I wanted to copy the stream into a string which can be read by the scheduler. But I haven't found a way to write the xml content of the cached string into the xml any.



Any hints are highly appreciated.



Thanks

Oli


--
Freeman Fang

------------------------

FuseSource: http://fusesource.com
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org

Reply via email to