|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
RFH2 header problems with mcd folder |
« View previous topic :: View next topic » |
Author |
Message
|
JacobSteenDue |
Posted: Tue Mar 22, 2005 11:36 pm Post subject: RFH2 header problems with mcd folder |
|
|
Novice
Joined: 22 Mar 2005 Posts: 13
|
Hi All,
I'm having some strange problems with adding RFH2 headers to messages. What I'm testing is the following
Flow 1
MQInput (XML domain) -> Compute -> MQOutput
The compute node copies the message and adds MQRFH2 information using the following ESQL:
SET OutputRoot.MQRFH2.usr.ContractId = 'Test Contract ID';
Only the 'usr' folder is added.
Flow 2:
MQInput (MRM domain) -> Mapping -> MQOutput
The flow reads from the Flow 1 output queue.
But this does not work - apparently because the output message from Flow 1 adds the 'mcd' folder claiming the message format is 'xml', and then the Flow 2 input node cheerfully ignores that it is supposed to be using a MRM domain parser. As a consequence the mapping node thinks that the message is empty. I know this because if I intercept the message between the two flows and alter it to omit the mcd folder then everything works just fine.
I've tried to remove the 'mcd' folder using a compute node in either of the two flows but to no avail. So how do I get Flow 1 to stop putting the mcd folder in the message ?
Oh - and by the way. If Flow 1 uses a BLOB domain input node then there is no problem. But that is not an option in my case (what I really want to do is use a HTTPInput node, annotate the message contents using the MQRFH2 header and pass the result to a queue).
/Jacob |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Mar 23, 2005 5:56 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The values specified on the MQInput node are defaults. They are only used, as you have found, if the input message DOESN'T include MCD information.
You could always override the contents of the MCD. Or set them to null.
Or use an RCD in flow 2 to enforce the MRM conversion. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
JacobSteenDue |
Posted: Mon Mar 28, 2005 10:56 pm Post subject: |
|
|
Novice
Joined: 22 Mar 2005 Posts: 13
|
Well - how do I prevent the first flow from writing the MCD header ? What I want is for flow 2 to be unaware if flow 1 is used as input or if a message with the correct RFH2 usr information is sent. And I can add all the computenodes I want to flow 1 with code like
SET OutputRoot.MQRFH2.mcd = NULL;
without any effect - the output message still contains the mcd folder, and still with the Mcd set to 'xml'.
Furthermore the problems seems to be that I *cannot* use a compute node in flow 2 to remove/overwrite the MCD header. Appart from the fact that the order of things is very important (copy inputRoot.XML to OutputRoot.MRM before deleting the mcd folder) my mapping node in flow 2 still does not work - it seems it believes the message is empty which it is not (I've checked using the debugger).
A follow up question (though this will probably make me sound really stupid and make me loose all credibility for a long time) what's a RCD ? |
|
Back to top |
|
 |
javaforvivek |
Posted: Tue Mar 29, 2005 3:05 am Post subject: |
|
|
 Master
Joined: 14 Jun 2002 Posts: 282 Location: Pune,India
|
Hi,
I tried your problem. What I did is :
1. I have a trial msg set (which is used for all sorts of R&D work in our dev environment..!!)
2.created a msg flow:
MQInput (Domain = XML, MsgSet = TrialMsgSet,MsgType = File, MsgFormat = XML1) ->
Compute
Code: |
SET OutputRoot = InputRoot;
SET OutputRoot.MQRFH2.usr.ContractId = 'Test Contract ID';
DECLARE mqrfh2Ref REFERENCE TO OutputRoot.MQRFH2;
DETACH mqrfh2Ref;
ATTACH mqrfh2Ref TO OutputRoot.[2] AS NEXTSIBLING;
/*
The last three lines move the newly created RFH2 header to its proper position in msg tree. You can see it in Flow Debug perspective.
*/
|
->
RCD (Reset Content Descriptor Node) ( (Domain = MRM, MsgSet = TrialMsgSet,MsgType = File, MsgFormat = XML1) ->
MQOutput
3.
Quote: |
A follow up question (though this will probably make me sound really stupid and make me loose all credibility for a long time) what's a RCD ?
|
Now you know what is RCD - Reset Content Descriptor Node - It is the node which changes msg domain,MsgSet and evrything else which you have set in Default properties of MQInput node. See help for more info.
I got output msg with RFH header as :
mcd folder contains the same properties as were set by the RCD node.
Hope this helps you..[/code] _________________ Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth. |
|
Back to top |
|
 |
JacobSteenDue |
Posted: Tue Mar 29, 2005 4:06 am Post subject: |
|
|
Novice
Joined: 22 Mar 2005 Posts: 13
|
Thank you very much - the RCD was just the thing I was looking for. And now I have one more TLA to brag about  |
|
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
|
|
|
|