cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eoghan Glynn <>
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.



2009/4/16 Kid_79 <>:
> 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:
> Sent from the cxf-dev mailing list archive at

View raw message