|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to bypass namespace to access message body? |
« View previous topic :: View next topic » |
Author |
Message
|
pcelari |
Posted: Wed Nov 30, 2011 2:48 pm Post subject: How to bypass namespace to access message body? |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
Hello,
I setup a single request and reply queue for a set of client applications, which put XML requests and get replies to/from the two queues.
In the background, I route the requests based on the content in a field in the message header. However, although they all use exactly the same structure of the headers, different application use different namespace.
Is there a way to bypass the namespace in the routing flow?
the header field I'm referring to looks like this:
namespace ns1: com.mycompany.www.xml.myservice1
namespace ns2: com.mycompany.www.xml.myservice2
...
SET SERVICE = InputRoot.XMLNSC.ns1:MyMessage.BusObjectName;
and use the content of the variable SERVICE to decide the destination queue.
However, the generic routing application must be able to route any message of this general format regardless of what namespace the message uses, now and in the future.
How can I bypass the namespace and able to access the message header body in the incoming message?
thanks a lot for any insight!
 _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Nov 30, 2011 5:05 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Nov 30, 2011 8:44 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
To be more specific:
Code: |
SET SERVICE = InputRoot.XMLNSC.*:MyMessage.BusObjectName; |
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
pcelari |
Posted: Thu Dec 01, 2011 8:36 am Post subject: |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
Wow, it's that simple! I couldn't have anticipated.
Where is this documented?
Thank you soooo much fjb_saper and Jeff !
 _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
Vitor |
Posted: Thu Dec 01, 2011 8:50 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
pcelari wrote: |
Where is this documented? |
It's here
Quote: |
A namespace clause of * explicitly states that namespace information is to be ignored when locating Fields in a tree |
_________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|