cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Convert SOAPMessage from cxf to saaj
Date Mon, 09 Feb 2009 21:33:11 GMT

The easiest way is in your interceptor, do:

    private SOAPMessage getSOAPMessage(Message msg) {
        SOAPMessage doc = msg.getContent(SOAPMessage.class);
        if (doc == null) {
            new SAAJInInterceptor().handleMessage(msg);
            doc = msg.getContent(SOAPMessage.class);
        }
        return doc;
    }

Dan




On Sat February 7 2009 1:33:19 pm Kid_79 wrote:
> Hi all,
> I'm trying to use cxf and xwss for security.
> In the my example, on cliend side I'm using an interceptor to apply a
> security, but I've this problem:
>
> in my interceptor I have a handleMessage(Message message) method where
> Message is a cxf's message (org.apache.cxf.message.Message) while operating
> a security I need to SOAPMessage of saaj (javax.xml.soap.SOAPMessage).
>
> How can I convert a cxf's message in to saaj's message?
> Can you help me?
> Thanks

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

Mime
View raw message