ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Best way of adding an MQMD and MQRFH2 header to a message?

Post new topic  Reply to topic
 Best way of adding an MQMD and MQRFH2 header to a message? « View previous topic :: View next topic » 
Author Message
matoh
PostPosted: Thu Oct 19, 2006 6:16 am    Post subject: Best way of adding an MQMD and MQRFH2 header to a message? Reply with quote

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
View user's profile Send private message Send e-mail
GYR
PostPosted: Fri Oct 20, 2006 4:09 am    Post subject: Reply with quote

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
View user's profile Send private message
matoh
PostPosted: Fri Oct 20, 2006 4:33 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
GYR
PostPosted: Mon Oct 23, 2006 1:58 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Oct 23, 2006 2:54 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
matoh
PostPosted: Mon Oct 23, 2006 3:28 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Best way of adding an MQMD and MQRFH2 header to a message?
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.