Hi,
Eamonn Dwyer wrote:
Hi
I would like to write an interceptor to capture all the JMS header data. Would the following work?
for an inbound interceptor at the server side
...
String buffer = new StringBuffer();
JMSMessageHeadersType jmsMessageHeadersType =
(JMSMessageHeadersType)message.get("org.apache.cxf.jms.server.request.headers");
buffer.append("JMSCorrelationID" + "=" + jmsMessageHeadersType.getJMSCorrelationID()+
" ");
buffer.append("JMSMessageID" + "=" + jmsMessageHeadersType.getJMSMessageID()+ "
");
and so on for all the attributes in JMSMessageHeadersType.
It is OK for the inbound interceptor. The JMS transport first get the
values of JMS header data and store them in the "
org.apache.cxf.jms.server.request.headers". So the interceptor can get these
data.
For the outbound interceptor at the server side the type would be got from
JMSMessageHeadersType jmsMessageHeadersType =
(JMSMessageHeadersType)message.get("org.apache.cxf.jms.server.reply.headers");
It is not right for the outbound interceptor. Because when the
interceptor uses the value of "org.apache.cxf.jms.server.reply.headers"
before the implementation generates it.
and then on the client side use "org.apache.cxf.jms.client.repsonse.headers" and
"org.apache.cxf.jms.client.reply.headers"
Thanks for any help/suggestions,
Eamonn
_________________________________________________________________
Get 30 Free Emoticons for your Windows Live Messenger
http://www.livemessenger-emoticons.com/funfamily/en-ie/