On 19/08/13 10:57, Dennis Walter wrote:
In a SOAP over JMS setting using CXF 2.6.9, I have to copy non-standard JMS
headers from the request to the response (on the server side). Unfortunately, I
cannot find any documentation or hints on how to do that. I looked at the
implementation of JMSDestination, where it looks as if I cannot do this at all.
Ideally, I'd use an interceptor. Can anyone help?
Background: our enterprise service bus uses several connected "ESB clusters" and requires
that all responses in a web service via SOAP over JMS MUST contain a certain set of custom-made JMS
headers (e.g., "com_myenterprise_esb_state") copied 1-to-1 from the request. This
requirement is not negotiable.
We are using CXF 2.6.9, Websphere MQ 7.0.1.3, JBoss EAP 6.1.
As far as I recall, all JMS headers will be available as
Message.PROTOCOL_HEADERS map property on the inbound message, so what
you can do is to add an outbound CXF interceptor which will do
Message inMessage = outMessage.getExchange().getInMessage();
then get the in headers from it and copy the required ones to the response
What phase would I have to add this interceptor to? PRE_PROTOCOL?
I guess any phase before MARSHAL will do, as headers would typically be
written out before the marshaling is done, but I'm not sure about JMS...
Cheers, Sergey
Thank you!
HTH, Serggey
Many thanks!