|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Accessing Tags having namespaces dynamically in esql |
« View previous topic :: View next topic » |
Author |
Message
|
raghu1984 |
Posted: Sat May 01, 2010 1:47 am Post subject: Accessing Tags having namespaces dynamically in esql |
|
|
 Newbie
Joined: 10 Dec 2009 Posts: 7
|
Hi,
I am trying to access the tags dynamically in esql. The message i am trying to access is a SOAP message.
Here is my code,
Code: |
SET temp_var = 'NS1:Body.NS2:IFX';
SET Environment.Variables.BODY = OutputRoot.XMLNSC.NS1:Envelope.{temp_var};
|
Here Environment.Variables.BODY is not getting generated, that is it is not able to access the message dynamically. Also i tried declaring the namespaces NS1 and NS2 as well but still i am not able to access it.
When I give this ,
Code: |
SET Environment.Variables.BODY = OutputRoot.XMLNSC.NS1:Envelope.NS1:Body.NS2:IFX;
|
I am getting the value in 'BODY'.
I tried this way also but no result, javascript:emoticon(' ') ,
Code: |
SET temp_var = '*:Body.*:IFX';
SET Environment.Variables.BODY = OutputRoot.XMLNSC.*:Envelope.{temp_var};
|
I searched this form but i did not find any post having namespaces.
Any one knows how to resolve it, please let me know.
Thanks. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat May 01, 2010 10:08 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
This type of thing is resolved using multiple different techniques.
The most common of which is using references....
BTW you might want to attach a parser to your Environment.Variables tree otherwise you will see things being different from what you expect.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
raghu1984 |
Posted: Sun May 02, 2010 2:29 am Post subject: |
|
|
 Newbie
Joined: 10 Dec 2009 Posts: 7
|
Hi Saper,
Thanks for the reply.
But my requirement here is, that 'temp_var' can go at any level. I mean it can be '*:Body' or '*:Body.*:IFX' or '*:Body.*:IFX.*:Tag1'. And also the data inside Body may also change, that is it can be '*:Body.*:Sometag' , so i will not be knowing anything about the message. This is actually a SOAP message and inside the 'Body' I can get any kind of message, here I am working on a generic flow which caters to all types of messages.
I tried with references but couldn't able to get how references can be used in my case.
Can u please tell me how can I solve this?
Thanks. |
|
Back to top |
|
 |
mqjeff |
Posted: Sun May 02, 2010 4:50 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The {} syntax only works with one level.
Everything else is pretty basic programming.
Look at the list of functions and other operators that ESQL provides and decide which best suits your need. |
|
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
|
|
|
|