Thanks. Shouldn't the StaxInInterceptor copy the InputStream and process that and leave the original stream as is? Or is that too inefficient?
Thanks Manav Kher On Oct 1, 2010, at 3:50 PM, Daniel Kulp wrote: > On Friday 01 October 2010 3:48:24 pm M Kher wrote: >> We are using CXF 2.2.10 and it seems that placing a Custom Interceptor >> AFTER StaxInInterceptor does not get the complete incoming XML message. So >> doing this >> >> message.getContent(InputStream.class); >> >> in the custom Interceptor handleMessage(Message) method will give you the >> complete incoming message when the Interceptor is processed BEFORE the >> StaxInInterceptor. But placing this interceptor after the >> StaxInInterceptor (in the POST_STREAM phase) will only get the partial >> message (basically a good chunk of the beginning of the SOAP message is >> missing). >> >> Are all interceptors that come after the StaxInInterceptor supposed to use >> the XMLReader object in the message? > > Pretty much yes. The XMLStreamReader generally buffers things as it reads. > It reads a chunk, does some parsing, reads another chunk, etc... Thus, the > underlying input stream is generally positioned in an unpredictable location. > > > -- > Daniel Kulp > [email protected] > http://dankulp.com/blog
