You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Kid_79 <ch...@hotmail.com> on 2009/06/08 15:15:22 UTC

SOAPMessage from message in WRITE phase

Hi all,
I have a my Interceptor (ResponseInterceptor) with phase = Phase.WRITE in
response.
Now in my message (handleMessage(Message message) method) how can I get the
response?

In the other word, I want convert the response in SOAPMessage (for example),
while the message contains a XMLStreamWriter object, OutputStream object.
Can I get a SOAPMessage from cxf's response message in the WRITE phase?

Thanks
-- 
View this message in context: http://www.nabble.com/SOAPMessage-from-message-in-WRITE-phase-tp23923879p23923879.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: SOAPMessage from message in WRITE phase

Posted by Daniel Kulp <dk...@apache.org>.
Well, if you turn on the schema validation, CXF will automatically validate 
the XML with the XSD.    

If you want more than that, I SUGGEST adding the SAAJInInterceptor to the 
chain and in your interceptor (which needs to run after it), do:
message.getContent(SOAPMessage.class) 
to get it and then validate against it.

Dan


On Mon June 8 2009 9:15:22 am Kid_79 wrote:
> Hi all,
> I have a my Interceptor (ResponseInterceptor) with phase = Phase.WRITE in
> response.
> Now in my message (handleMessage(Message message) method) how can I get the
> response?
>
> In the other word, I want convert the response in SOAPMessage (for
> example), while the message contains a XMLStreamWriter object, OutputStream
> object. Can I get a SOAPMessage from cxf's response message in the WRITE
> phase?
>
> Thanks

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog