You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by David Karlsen <da...@gmail.com> on 2011/09/05 22:23:29 UTC

Message not complete in USER_STREAM phase?

I have an OutInterceptor which is in the USER_STREAM phase, e.g. I have this
in my constructor
super( USER_STREAM );

>From http://cxf.apache.org/docs/interceptors.html this is after the WRITE
phase ("Writing of the protocol message, such as the SOAP Envelope.") so I
expect the message to be a complete soapenvelope - but it's not - what am I
missing?

I pick the outgoing payload from:
CacheAndWriteOutputStream cachedOutputStream = (CacheAndWriteOutputStream)
message.getExchange().getOutMessage().getContent( OutputStream.class );

Thanks in advance for any pointers.

--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen

Re: Message not complete in USER_STREAM phase?

Posted by Daniel Kulp <dk...@apache.org>.

On Monday, September 05, 2011 10:23:29 PM David Karlsen wrote:
> I have an OutInterceptor which is in the USER_STREAM phase, e.g. I have this
> in my constructor
> super( USER_STREAM );
> 
> From http://cxf.apache.org/docs/interceptors.html this is after the WRITE
> phase ("Writing of the protocol message, such as the SOAP Envelope.") so I
> expect the message to be a complete soapenvelope - but it's not - what am I
> missing?

That page was missing a whole section of phases.  :-(

I've updated the page:

https://cwiki.apache.org/confluence/display/CXF20DOC/Interceptors


Most likely, you'll want PRE_STREAM_ENDING  or there abouts.

Dan



> 
> I pick the outgoing payload from:
> CacheAndWriteOutputStream cachedOutputStream = (CacheAndWriteOutputStream)
> message.getExchange().getOutMessage().getContent( OutputStream.class );
> 
> Thanks in advance for any pointers.
> 
> --
> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com