Re: jms header properties
Hi Dan, This worked very well! How can I do this on the client side? Thanks! Mayank On 1/28/08, Daniel Kulp [EMAIL PROTECTED] wrote: On Monday 28 January 2008, Mayank Thakore wrote: Hi Daniel, Will BindingProvider.HTTP_PROTOCOL_HEADERS work for JMS also? With 2.0.4, yes. Internally, we just have a PROTOCOL_HEADERS thing in the message that is completely protocol nuetral. The JAX-WS frontend just maps that onto the HTTP_PROTOCOL_HEADERS thing. With 1st option: At the server side, I had to add interceptor. So what I do (in the service implementation) is to put the jms property in a threadlocal variable. Then in an interceptor (invoked prior to send), I use the code mentioned by Willem to put these properties into the message. Do you think this is ok? Any better way? Yes. Inject the WebServiceContext into your service and just set them there. The key would be the class.getName() of the JMS context class. Dan Thanks! Regards Mayank -Original Message- From: Daniel Kulp [mailto:[EMAIL PROTECTED] Sent: Monday, January 28, 2008 22:03 To: cxf-user@incubator.apache.org Cc: Mayank Thakore Subject: Re: jms header properties There are two options: 1) the jms context stuff Willem mentioned. 2) The standard protocol header things from JAX-WS. In the second case, the JMS transport maps the headers onto the BindingProvider.HTTP_PROTOCOL_HEADERS map thing. Thus, the normal stuff applies. HOWEVER: that only works with 2.0.4 (to be released tomorrow) and the 2.1 snapshots.There was a bug that prevented that from working in earlier versions. Dan On Sunday 27 January 2008, Mayank Thakore wrote: Hi, How to set header/property fields in outgoing jms messages? There is lot of configuration examples to set jms destination properties. But I didn't find any for message properties. Thanks and Regards Mayank -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
Re: jms header properties
on server side i used the server response context... i noticed that it only copies the jms message properties, not the header... for the header server request context seems to work... but anyway, i needed only the message properties. how to get the context on the client side? i want to set jms properties on a per message basis. On 1/31/08, Ulhas Bhole [EMAIL PROTECTED] wrote: Which option did you use? you can use JAX-WS requstcontext and responsecontext to get the access to JMS headers at client side. Regards, Ulhas Bhole Mayank Thakore wrote: Hi Dan, This worked very well! How can I do this on the client side? Thanks! Mayank On 1/28/08, Daniel Kulp [EMAIL PROTECTED] wrote: On Monday 28 January 2008, Mayank Thakore wrote: Hi Daniel, Will BindingProvider.HTTP_PROTOCOL_HEADERS work for JMS also? With 2.0.4, yes. Internally, we just have a PROTOCOL_HEADERS thing in the message that is completely protocol nuetral. The JAX-WS frontend just maps that onto the HTTP_PROTOCOL_HEADERS thing. With 1st option: At the server side, I had to add interceptor. So what I do (in the service implementation) is to put the jms property in a threadlocal variable. Then in an interceptor (invoked prior to send), I use the code mentioned by Willem to put these properties into the message. Do you think this is ok? Any better way? Yes. Inject the WebServiceContext into your service and just set them there. The key would be the class.getName() of the JMS context class. Dan Thanks! Regards Mayank -Original Message- From: Daniel Kulp [mailto:[EMAIL PROTECTED] Sent: Monday, January 28, 2008 22:03 To: cxf-user@incubator.apache.org Cc: Mayank Thakore Subject: Re: jms header properties There are two options: 1) the jms context stuff Willem mentioned. 2) The standard protocol header things from JAX-WS. In the second case, the JMS transport maps the headers onto the BindingProvider.HTTP_PROTOCOL_HEADERS map thing. Thus, the normal stuff applies. HOWEVER: that only works with 2.0.4 (to be released tomorrow) and the 2.1 snapshots.There was a bug that prevented that from working in earlier versions. Dan On Sunday 27 January 2008, Mayank Thakore wrote: Hi, How to set header/property fields in outgoing jms messages? There is lot of configuration examples to set jms destination properties. But I didn't find any for message properties. Thanks and Regards Mayank -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
Re: jms header properties
Which option did you use? you can use JAX-WS requstcontext and responsecontext to get the access to JMS headers at client side. Regards, Ulhas Bhole Mayank Thakore wrote: Hi Dan, This worked very well! How can I do this on the client side? Thanks! Mayank On 1/28/08, Daniel Kulp [EMAIL PROTECTED] wrote: On Monday 28 January 2008, Mayank Thakore wrote: Hi Daniel, Will BindingProvider.HTTP_PROTOCOL_HEADERS work for JMS also? With 2.0.4, yes. Internally, we just have a PROTOCOL_HEADERS thing in the message that is completely protocol nuetral. The JAX-WS frontend just maps that onto the HTTP_PROTOCOL_HEADERS thing. With 1st option: At the server side, I had to add interceptor. So what I do (in the service implementation) is to put the jms property in a threadlocal variable. Then in an interceptor (invoked prior to send), I use the code mentioned by Willem to put these properties into the message. Do you think this is ok? Any better way? Yes. Inject the WebServiceContext into your service and just set them there. The key would be the class.getName() of the JMS context class. Dan Thanks! Regards Mayank -Original Message- From: Daniel Kulp [mailto:[EMAIL PROTECTED] Sent: Monday, January 28, 2008 22:03 To: cxf-user@incubator.apache.org Cc: Mayank Thakore Subject: Re: jms header properties There are two options: 1) the jms context stuff Willem mentioned. 2) The standard protocol header things from JAX-WS. In the second case, the JMS transport maps the headers onto the BindingProvider.HTTP_PROTOCOL_HEADERS map thing. Thus, the normal stuff applies. HOWEVER: that only works with 2.0.4 (to be released tomorrow) and the 2.1 snapshots.There was a bug that prevented that from working in earlier versions. Dan On Sunday 27 January 2008, Mayank Thakore wrote: Hi, How to set header/property fields in outgoing jms messages? There is lot of configuration examples to set jms destination properties. But I didn't find any for message properties. Thanks and Regards Mayank -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
Re: jms header properties
If you check the following system test it will show you how to use context. http://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java Regards, Ulhas Bhole Mayank Thakore wrote: on server side i used the server response context... i noticed that it only copies the jms message properties, not the header... for the header server request context seems to work... but anyway, i needed only the message properties. how to get the context on the client side? i want to set jms properties on a per message basis. On 1/31/08, Ulhas Bhole [EMAIL PROTECTED] wrote: Which option did you use? you can use JAX-WS requstcontext and responsecontext to get the access to JMS headers at client side. Regards, Ulhas Bhole Mayank Thakore wrote: Hi Dan, This worked very well! How can I do this on the client side? Thanks! Mayank On 1/28/08, Daniel Kulp [EMAIL PROTECTED] wrote: On Monday 28 January 2008, Mayank Thakore wrote: Hi Daniel, Will BindingProvider.HTTP_PROTOCOL_HEADERS work for JMS also? With 2.0.4, yes. Internally, we just have a PROTOCOL_HEADERS thing in the message that is completely protocol nuetral. The JAX-WS frontend just maps that onto the HTTP_PROTOCOL_HEADERS thing. With 1st option: At the server side, I had to add interceptor. So what I do (in the service implementation) is to put the jms property in a threadlocal variable. Then in an interceptor (invoked prior to send), I use the code mentioned by Willem to put these properties into the message. Do you think this is ok? Any better way? Yes. Inject the WebServiceContext into your service and just set them there. The key would be the class.getName() of the JMS context class. Dan Thanks! Regards Mayank -Original Message- From: Daniel Kulp [mailto:[EMAIL PROTECTED] Sent: Monday, January 28, 2008 22:03 To: cxf-user@incubator.apache.org Cc: Mayank Thakore Subject: Re: jms header properties There are two options: 1) the jms context stuff Willem mentioned. 2) The standard protocol header things from JAX-WS. In the second case, the JMS transport maps the headers onto the BindingProvider.HTTP_PROTOCOL_HEADERS map thing. Thus, the normal stuff applies. HOWEVER: that only works with 2.0.4 (to be released tomorrow) and the 2.1 snapshots.There was a bug that prevented that from working in earlier versions. Dan On Sunday 27 January 2008, Mayank Thakore wrote: Hi, How to set header/property fields in outgoing jms messages? There is lot of configuration examples to set jms destination properties. But I didn't find any for message properties. Thanks and Regards Mayank -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
Re: jms header properties
There are two options: 1) the jms context stuff Willem mentioned. 2) The standard protocol header things from JAX-WS. In the second case, the JMS transport maps the headers onto the BindingProvider.HTTP_PROTOCOL_HEADERS map thing. Thus, the normal stuff applies. HOWEVER: that only works with 2.0.4 (to be released tomorrow) and the 2.1 snapshots.There was a bug that prevented that from working in earlier versions. Dan On Sunday 27 January 2008, Mayank Thakore wrote: Hi, How to set header/property fields in outgoing jms messages? There is lot of configuration examples to set jms destination properties. But I didn't find any for message properties. Thanks and Regards Mayank -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
RE: jms header properties
Hi Daniel, Will BindingProvider.HTTP_PROTOCOL_HEADERS work for JMS also? With 1st option: At the server side, I had to add interceptor. So what I do (in the service implementation) is to put the jms property in a threadlocal variable. Then in an interceptor (invoked prior to send), I use the code mentioned by Willem to put these properties into the message. Do you think this is ok? Any better way? Thanks! Regards Mayank -Original Message- From: Daniel Kulp [mailto:[EMAIL PROTECTED] Sent: Monday, January 28, 2008 22:03 To: cxf-user@incubator.apache.org Cc: Mayank Thakore Subject: Re: jms header properties There are two options: 1) the jms context stuff Willem mentioned. 2) The standard protocol header things from JAX-WS. In the second case, the JMS transport maps the headers onto the BindingProvider.HTTP_PROTOCOL_HEADERS map thing. Thus, the normal stuff applies. HOWEVER: that only works with 2.0.4 (to be released tomorrow) and the 2.1 snapshots.There was a bug that prevented that from working in earlier versions. Dan On Sunday 27 January 2008, Mayank Thakore wrote: Hi, How to set header/property fields in outgoing jms messages? There is lot of configuration examples to set jms destination properties. But I didn't find any for message properties. Thanks and Regards Mayank -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
Re: jms header properties
On Monday 28 January 2008, Mayank Thakore wrote: Hi Daniel, Will BindingProvider.HTTP_PROTOCOL_HEADERS work for JMS also? With 2.0.4, yes. Internally, we just have a PROTOCOL_HEADERS thing in the message that is completely protocol nuetral. The JAX-WS frontend just maps that onto the HTTP_PROTOCOL_HEADERS thing. With 1st option: At the server side, I had to add interceptor. So what I do (in the service implementation) is to put the jms property in a threadlocal variable. Then in an interceptor (invoked prior to send), I use the code mentioned by Willem to put these properties into the message. Do you think this is ok? Any better way? Yes. Inject the WebServiceContext into your service and just set them there. The key would be the class.getName() of the JMS context class. Dan Thanks! Regards Mayank -Original Message- From: Daniel Kulp [mailto:[EMAIL PROTECTED] Sent: Monday, January 28, 2008 22:03 To: cxf-user@incubator.apache.org Cc: Mayank Thakore Subject: Re: jms header properties There are two options: 1) the jms context stuff Willem mentioned. 2) The standard protocol header things from JAX-WS. In the second case, the JMS transport maps the headers onto the BindingProvider.HTTP_PROTOCOL_HEADERS map thing. Thus, the normal stuff applies. HOWEVER: that only works with 2.0.4 (to be released tomorrow) and the 2.1 snapshots.There was a bug that prevented that from working in earlier versions. Dan On Sunday 27 January 2008, Mayank Thakore wrote: Hi, How to set header/property fields in outgoing jms messages? There is lot of configuration examples to set jms destination properties. But I didn't find any for message properties. Thanks and Regards Mayank -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
jms header properties
Hi, How to set header/property fields in outgoing jms messages? There is lot of configuration examples to set jms destination properties. But I didn't find any for message properties. Thanks and Regards Mayank
Re: jms header properties
Hi Mayank, Here is a systest [1] testContextPropogation() for setting the JMS header. [1]https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java Willem. Mayank Thakore wrote: Hi, How to set header/property fields in outgoing jms messages? There is lot of configuration examples to set jms destination properties. But I didn't find any for message properties. Thanks and Regards Mayank