cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eoghan Glynn <eogl...@gmail.com>
Subject Re: Convert a message from saaj to cxf?
Date Thu, 16 Apr 2009 10:23:07 GMT
Internally in the CXF stack, usually we need to convert the other way
round, i.e. to populate the SAAJ model if its required for example
when a JAX-WS SOAPHandler is installed. This conversion is the
responsibility of the SAAJ{In|Out}Interceptor[1] classes.

However in your case, rather than doing a straight conversion from
SAAJ SOAPMessage to CXF SoapMessage, I wonder could you just wrap the
former inside the latter.

By that I mean create a wrapper class that extends
org.apache.cxf.binding.soap.SoapMessage, but delegates to an embedded
SAAJ SOAPMessage instance where appropriate. So for example
SoapMessage.getHeaders() would map onto
SOAPMessage.getSOAPHeader().examineAllHeaderElements() with mediation
between the CXF SoapHeader type and the corresponding SAAJ
SOAPHeaderElement. I'm not sure if there such a direct correspondence
for everything you'll need, but it might be an idea worth exploring.

Cheers,
Eoghan

[1] http://svn.apache.org/repos/asf/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java
http://svn.apache.org/repos/asf/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJOutInterceptor.java

2009/4/16 Kid_79 <chicca79@hotmail.com>:
>
> Hi all,
> I'm trying to use cxf for my security.
>
> It's possible converts a saaj's message (javax.xml.soap.SOAPMessage) in to
> cxf's message (org.apache.cxf.binding.soap.SoapMessage)?
>
> Can you help me?
> Thanks
> --
> View this message in context: http://www.nabble.com/Convert-a-message-from-saaj-to-cxf--tp23074793p23074793.html
> Sent from the cxf-dev mailing list archive at Nabble.com.
>
>

Mime
View raw message