Posted: Wed Dec 12, 2007 3:46 am Post subject: Adapter to SAP - MQRFH2 header problem (MQJMS1050)
Voyager
Joined: 15 Nov 2004 Posts: 88
Hi,
I am sending a message to SAP system using WBIA SAP adapter and composing the MQRFH2 header as follows:
SET OutputRoot.MQMD.Format =MQFMT_RF_HEADER_2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Version = 2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format = MQFMT_STRING;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Encoding = InputRoot.MQMD.Encoding;
SET OutputRoot.MQRFH2.(MQRFH2.Field)CodedCharSetId = InputRoot.MQMD.CodedCharSetId;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Flags = 0;
SET OutputRoot.MQRFH2.mcd.Msd = 'xml';
SET OutputRoot.MQRFH2.jms = '';
The output received in windows platform differs from Linux platform.
Output from Windows Platform is as follows:
<mcd><Msd>xml</Msd></mcd> <jms/>
Output from Linux Platform is as follows:
<mcd><Msd>xml</Msd><Set/><Type/><Fmt/></mcd> <psc><Topic/></psc><jms/>
The empty tags in Linux is causing the message to fail in WBIA adapter for SAP. The exception message is as follows:
javax.jms.MessageFormatException: MQJMS1050: The MQRFH2 header has an incorrect format.
If I manually post the message from windows then the SAP adapter is parsing the message successfully.
I tried setting the values of Set Type and Fmt to null but it did not work.
I am using WBIMB 6.0 CSD 03 in both windows as well as linux.
Basically we were using PROPAGATE to generate multiple idocs from a single input XML. The CopyMessageHeaders() function within the while loop was causing this kind of behaviour.
This problem can be resolved in two ways:
1. After the call to CopyMessageHeaders() we need to nullify the Properties tree values as follows:
SET OutputRoot.Properties.MessageSet = NULL;
SET OutputRoot.Properties.MessageType = NULL;
SET OutputRoot.Properties.MessageFormat = NULL;
2. Use CopyMessageHeaders() outside the while loop and compensate using PROPAGATE DELETE NONE. This is more strange way of doing it.
I would prefer to use the first method as PROPAGATE DELETE NONE would eat up more memory.
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
There's already a PMR open about the "strange" behaviour of CopyMessageHeaders() under some circumstances. I know, because I opened one when it bit me.
Cheers. _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
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