Author |
Message
|
mqceries |
Posted: Wed Jul 18, 2012 8:41 pm Post subject: Capturing the input message to a Environment Variable |
|
|
 Acolyte
Joined: 02 Dec 2011 Posts: 70
|
Message Broker : 6.1.10
Hi all,
I am trying to capture the input message (Request) just before HTTP node into an Environmental variable. I tried the follwoing ways, but everytime it is storing a Null value. please guide where i am going wrong, if possible give a code snippet.
Quote: |
Way 1
SET Environment.Variables.RequestPacket=InputRoot.XMLNSC;
Way 2 : with root element at the end, also tried XMLNSC.*[]
SET Environment.Variables.RequestPacket1 = InputRoot.XMLNSC.arg0;
Way 3
DECLARE inputMsgBlob BLOB;
SET inputMsg = ASBITSTREAM(InputRoot.XMLNSC, InputRoot.Properties.Encoding, InputRoot.Properties.CodedCharSetId );
SET Environment.Variables.RequestPacket = inputMsg;
|
Thanks and Appreciate for looking.
Kumar. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jul 18, 2012 8:46 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
you're forgetting one thing for sure: to assign a parser to the part of the environment tree where you are going to store the message...
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqceries |
Posted: Wed Jul 18, 2012 8:55 pm Post subject: |
|
|
 Acolyte
Joined: 02 Dec 2011 Posts: 70
|
Yes i also tried that.
SET Environment.Variables.RequestPacket1.*[] , no use.
Kindly correct me if am wrong.
Thanks,. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jul 18, 2012 8:58 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mqceries wrote: |
Yes i also tried that.
SET Environment.Variables.RequestPacket1.*[] , no use.
Kindly correct me if am wrong.
Thanks,. |
This is not assigning a parser to the environment tree. Read the documentation, it is specific with exemples (IIRC)...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqceries |
Posted: Wed Jul 18, 2012 9:08 pm Post subject: |
|
|
 Acolyte
Joined: 02 Dec 2011 Posts: 70
|
Sorry my bad, i got it. Will try and let you know.Thank you very much for your advice. |
|
Back to top |
|
 |
mqceries |
Posted: Wed Jul 18, 2012 11:21 pm Post subject: |
|
|
 Acolyte
Joined: 02 Dec 2011 Posts: 70
|
Thank you very much. I did a silly mistake, done some reading and fixed it. Now its working.
Thanks fjb_saber for your advice.
the thing i used in case.
Quote: |
CREATE LASTCHILD OF Environment.Variables DOMAIN('XMLNSC') NAME 'RequestPacket';
SET Environment.Variables.RequestPacket = InputRoot.XMLNSC;
|
|
|
Back to top |
|
 |
|