Author |
Message
|
sivaguru |
Posted: Thu Sep 04, 2008 1:18 am Post subject: Extracting the MsgId from HTTPInput file |
|
|
Apprentice
Joined: 18 Jun 2008 Posts: 40
|
Hi ,
Iam using broker V6.1 and my flow looks like
HTTPInput --> Compute ---> HTTPRequest --> HTTPReply
HTTPInput --> Compute --->MQOutput
Note: The Compute node decides to which node to propagate.
I have small clarification on how to fetch the MsgId from an HTTPInput file .
I have one more clari on this, whether the Request identifier is the one to be considered as Msgid in HTTP file .
 |
|
Back to top |
|
 |
Gaya3 |
Posted: Thu Sep 04, 2008 1:55 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
MsgId is a part of MQMD,
so you have to prepare HTTP to MQ message at first, there you will get the MsgID. _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
sivaguru |
Posted: Thu Sep 04, 2008 3:40 am Post subject: |
|
|
Apprentice
Joined: 18 Jun 2008 Posts: 40
|
Hi ,
Thanks for your reply. My understanding from your reply is that for generating MQ-Output, I may have to first create a MQMD header since the Input is of type HTTP.
Can you please update me whether there will be any separate value named "MsgId" in the Header of Input HTTP file or will the RequestIdentifier acts like a MsgId as similar to MQMD.
My qry is how to fetch the MsgId ( Unique Identifier ) from the Input file of type HTTP. Since I can assign the Input unique Identifier to the Correlation Id to the MQ Output
Please correct me if Iam worng.
 |
|
Back to top |
|
 |
Gaya3 |
Posted: Thu Sep 04, 2008 3:55 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
Root:=(
(0x01000000):Properties = (
(0x03000000):MessageSet = 'ESKEPE8002001'
(0x03000000):MessageType = 'Envelope'
(0x03000000):MessageFormat = 'XML1'
(0x03000000):Encoding = 273
(0x03000000):CodedCharSetId = 1208
(0x03000000):Transactional = TRUE
(0x03000000):Persistence = TRUE
(0x03000000):CreationTime = GMTTIMESTAMP '2008-09-03 06:35:07.370'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 4
(0x03000000):ReplyIdentifier = X'414d512042524b514d202020202020209366bb482031bf0b'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
(0x03000000):ContentType = 'text/xml'
)
(0x01000000):HTTPInputHeader = (
(0x03000000):Host = ''
(0x03000000):Content-Length = '-1'
(0x03000000):Content-Type = 'text/xml'
(0x03000000):SOAPAction = 'http://www.gayathri.com/gay3'
this is what i did, where i am getting a reply, so here the reply identifier is same as that of MsgId
for you, it might be Request identifier, please post it here, for clarification _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
sivaguru |
Posted: Thu Sep 04, 2008 4:09 am Post subject: |
|
|
Apprentice
Joined: 18 Jun 2008 Posts: 40
|
Thanks for your immediate response .
Below is the code that i have written in my Compute node and propagated that to the MQ Output.
SET Environment.Variables.HTTPContextText = CAST(InputLocalEnvironment.Destination.HTTP.RequestIdentifier AS CHARACTER);
OutputRoot.MQMD.CorrelId = CAST(Environment.Variables.HTTPContextText AS BLOB);
Will this assign the Input file's Unique Identifier to the Correl Id of the MQ Output message. Is my approach is correct ?
 |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Sep 04, 2008 3:46 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Why oh why deal with char? why not just go from BLOB to BLOB?? _________________ MQ & Broker admin |
|
Back to top |
|
 |
sridhsri |
Posted: Thu Sep 04, 2008 9:06 pm Post subject: |
|
|
Master
Joined: 19 Jun 2008 Posts: 297
|
I observed something possibly missing in one of your flows. The second flow only contains a HTTPInput node. Every HTTPinput node must have a HTTPReply node (in the same flow or the same EG). I guess you have the HTTPReply in another flow ? |
|
Back to top |
|
 |
sivaguru |
Posted: Fri Sep 05, 2008 1:03 am Post subject: |
|
|
Apprentice
Joined: 18 Jun 2008 Posts: 40
|
Thank you everybody for your replies . |
|
Back to top |
|
 |
mgk |
Posted: Fri Sep 05, 2008 1:25 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Quote: |
Every HTTPinput node must have a HTTPReply node (in the same flow or the same EG). |
This is correct for SOAP nodes but not for HTTP. For HTTP nodes, the scope is the broker level, so you can have an HTTPInput node in one EG, and the HTTPReply node in the same or different EG in the same broker, as long as you can supply the correct RequestIdentifier.
Regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
|