Several phase should be fine, you need ensure the soapheader you need
map already in the message and before Phase.PREPARE_SEND_ENDING.
I believe Phase.PRE_STREAM is ok.
Freeman
Davide Gesino wrote:
thanks! In which phase the interceptor should intervene?
Freeman Fang wrote:
Hi Davide,
You can write an interceptor to add the fields you want in to
org.apache.cxf.message.Message.PROTOCOL_HEADERS of the outgoing message
something like
Map<String, List<String>> protHeaders = CastUtils.cast((Map<?,
?>)outMessage
.get(org.apache.cxf.message.Message.PROTOCOL_HEADERS));
protHeadser.put (the soap header whatever you want)
And the protHeaders will map to JMS header in JMS transport.
Freeman
Davide Gesino wrote:
Hi,
I have a requirement to map some fields present in one of my SOAP headers
at
transport level in a JMS header.
What is the best way to do that?
My broker is Active MQ.
Should I use something like Camel?
Davide