Author |
Message
|
matoh |
Posted: Thu Oct 19, 2006 6:16 am Post subject: Best way of adding an MQMD and MQRFH2 header to a message? |
|
|
Apprentice
Joined: 04 Mar 2005 Posts: 26
|
We are using a version 5 broker.
I recieve a message from a HTTPInput node, with Message Domain='XMLNS'.
I'm supposed to deliver that to a Websphere Application Server application. That application requires:
1) A valid MQMD header
2) A valid MQRFH2 header
3) Some specific values set in MQRFH2.usr
4) A body in the MRM domain.
It's easy to do 3) in a Compute node and 4) in a Reset Content Descriptor node, but how do I do 1) and 2) in the easiest and best way, as there is neither MQMD or MQRFH2 in the message when it arrives from the HTTPInput node (only Properties, HTTPInputHeader and the body)?
Anybody got any good examples to take a peek at? |
|
Back to top |
|
 |
GYR |
Posted: Fri Oct 20, 2006 4:09 am Post subject: |
|
|
Acolyte
Joined: 23 Jan 2002 Posts: 72
|
here is an example of a way of building the MQMD header in a compute node:-
Declare output_cursor reference to OutputRoot;
Create Nextsibling of output_cursor.Properties domain 'MQMD';
Set output_cursor.Properties.ReplyIdentifier = X'000000000000000000000000000000000000000000000000';
Set output_cursor.MQMD.StrucId = MQMD_STRUC_ID;
Set output_cursor.MQMD.Version = MQMD_CURRENT_VERSION;
--Set OutputRoot.MQMD.MsgId = UUIDASBLOB;
Set output_cursor.MQMD.MsgId = (UUIDASBLOB||x'0000000000000000');
Set output_cursor.MQMD.CorrelId = X'000000000000000000000000000000000000000000000000';
Set output_cursor.MQMD.Format = MQFMT_STRING;
Set output_cursor.MQMD.Persistence = MQPER_PERSISTENT;
Set output_cursor.MQMD.ReplyToQ = ' ';
Set output_cursor.MQMD.ApplIdentityData = ' ';
Set output_cursor.MQMD.Persistence = MQMD_CURRENT_VERSION;
To build the MQRFH2 you can check the IBM manuals for the format and required / optional fields for the RFH2 and also point the MQMD to that fact that an MQRFH2 header exists. |
|
Back to top |
|
 |
matoh |
Posted: Fri Oct 20, 2006 4:33 am Post subject: |
|
|
Apprentice
Joined: 04 Mar 2005 Posts: 26
|
Quote: |
Create Nextsibling of output_cursor.Properties domain 'MQMD';
|
Ok, I just need to set the domain, I don't need to name that node? |
|
Back to top |
|
 |
GYR |
Posted: Mon Oct 23, 2006 1:58 am Post subject: |
|
|
Acolyte
Joined: 23 Jan 2002 Posts: 72
|
matoh
I am not sure i understand your reply. The nextsibling creation creates the domain under the meassge properties and then you have the children of that domain which creates a WebsphereMQ header. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Oct 23, 2006 2:54 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
matoh wrote: |
Quote: |
Create Nextsibling of output_cursor.Properties domain 'MQMD';
|
Ok, I just need to set the domain, I don't need to name that node? |
use
Code: |
Create Nextsibling of output_cursor.Properties domain 'MQMD' name 'MQMD'; |
Check out the manual for the right order as the code is from memory....
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
matoh |
Posted: Mon Oct 23, 2006 3:28 am Post subject: |
|
|
Apprentice
Joined: 04 Mar 2005 Posts: 26
|
GYR wrote: |
matoh
I am not sure i understand your reply. The nextsibling creation creates the domain under the meassge properties and then you have the children of that domain which creates a WebsphereMQ header. |
Reading the help texts gave me the impression that just giving DOMAIN and not NAME would create an anonyous node that was parsed with a given parser, and then the subsequent "SET OutputRoot.MQMD.xxx" statements would create their own node, as I took the lvalue path in SET as a series of names.  |
|
Back to top |
|
 |
|