Author |
Message
|
Robert |
Posted: Thu Aug 22, 2002 6:57 am Post subject: XML to MRM Glitch |
|
|
Apprentice
Joined: 22 Aug 2002 Posts: 46 Location: Quebec, Canada
|
Hi,
I am encountering difficulties in translating XML self-defined messages to fixed length MRM messages. I designed a very simple MQInput --> Compute --> MQOutput flow. The XML message is parsed correctly by the input node and it looks that the Compute Node creates the MRM message correctly. I added two trace nodes (one after MQInput and one after Compute) to illustrate this. I end up with a data length of 0 in the output queue. The input XML message is put through MQExplorer.
Anybody has any hints?
Thanks.
Robert.
Here is the input XML Message:
<LAB><FIRSTNAME>George</FIRSTNAME><LASTNAME>Washington</LASTNAME></LAB>
=======================================
Here is the trace produced by the trace nodes:
This is a basic trace to see if input XML has been parsed correctly.
(
(0x1000000)Properties = (
(0x3000000)MessageSet = ''
(0x3000000)MessageType = ''
(0x3000000)MessageFormat = ''
(0x3000000)Encoding = 546
(0x3000000)CodedCharSetId = 437
(0x3000000)Transactional = TRUE
(0x3000000)Persistence = FALSE
(0x3000000)CreationTime = GMTTIMESTAMP '2002-08-22 15:03:36.670'
(0x3000000)ExpirationTime = -1
(0x3000000)Priority = 0
(0x3000000)ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x3000000)ReplyProtocol = 'MQ'
(0x3000000)Topic = NULL
)
(0x1000000)MQMD = (
(0x3000000)SourceQueue = 'XML2IN'
(0x3000000)Transactional = TRUE
(0x3000000)Encoding = 546
(0x3000000)CodedCharSetId = 437
(0x3000000)Format = 'MQSTR '
(0x3000000)Version = 2
(0x3000000)Report = 0
(0x3000000)MsgType = 8
(0x3000000)Expiry = -1
(0x3000000)Feedback = 0
(0x3000000)Priority = 0
(0x3000000)Persistence = 0
(0x3000000)MsgId = X'414d512053414d5042524b2020202020e8df643d20000926'
(0x3000000)CorrelId = X'000000000000000000000000000000000000000000000000'
(0x3000000)BackoutCount = 0
(0x3000000)ReplyToQ = ' '
(0x3000000)ReplyToQMgr = 'SAMPBRK '
(0x3000000)UserIdentifier = 'rpellet '
(0x3000000)AccountingToken = X'160105150000005e41e545467e26470f5fb644e803000000000000000000000b'
(0x3000000)ApplIdentityData = ' '
(0x3000000)PutApplType = 11
(0x3000000)PutApplName = 'C:\WINNT\system32\mmc.exe '
(0x3000000)PutDate = DATE '2002-08-22'
(0x3000000)PutTime = GMTTIME '15:03:36.670'
(0x3000000)ApplOriginData = ' '
(0x3000000)GroupId = X'000000000000000000000000000000000000000000000000'
(0x3000000)MsgSeqNumber = 1
(0x3000000)Offset = 0
(0x3000000)MsgFlags = 0
(0x3000000)OriginalLength = -1
)
(0x1000010)XML = (
(0x1000000)LAB = (
(0x1000000)FIRSTNAME = (
(0x2000000) = 'George'
)
(0x1000000)LASTNAME = (
(0x2000000) = 'Washington'
)
)
)
)
Checking if the MRM fixed length message has anything:
(
(0x1000000)Properties = (
(0x3000000)MessageSet = 'DQO7T80078001'
(0x3000000)MessageType = 't_FIXEDLAB'
(0x3000000)MessageFormat = 'TDS'
(0x3000000)Encoding = 546
(0x3000000)CodedCharSetId = 437
(0x3000000)Transactional = TRUE
(0x3000000)Persistence = FALSE
(0x3000000)CreationTime = GMTTIMESTAMP '2002-08-22 15:03:36.670'
(0x3000000)ExpirationTime = -1
(0x3000000)Priority = 0
(0x3000000)ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x3000000)ReplyProtocol = 'MQ'
(0x3000000)Topic = NULL
)
(0x1000000)MQMD = (
(0x3000000)SourceQueue = 'XML2IN'
(0x3000000)Transactional = TRUE
(0x3000000)Encoding = 546
(0x3000000)CodedCharSetId = 437
(0x3000000)Format = 'MQSTR '
(0x3000000)Version = 2
(0x3000000)Report = 0
(0x3000000)MsgType = 8
(0x3000000)Expiry = -1
(0x3000000)Feedback = 0
(0x3000000)Priority = 0
(0x3000000)Persistence = 0
(0x3000000)MsgId = X'414d512053414d5042524b2020202020e8df643d20000926'
(0x3000000)CorrelId = X'000000000000000000000000000000000000000000000000'
(0x3000000)BackoutCount = 0
(0x3000000)ReplyToQ = ' '
(0x3000000)ReplyToQMgr = 'SAMPBRK '
(0x3000000)UserIdentifier = 'rpellet '
(0x3000000)AccountingToken = X'160105150000005e41e545467e26470f5fb644e803000000000000000000000b'
(0x3000000)ApplIdentityData = ' '
(0x3000000)PutApplType = 11
(0x3000000)PutApplName = 'C:\WINNT\system32\mmc.exe '
(0x3000000)PutDate = DATE '2002-08-22'
(0x3000000)PutTime = GMTTIME '15:03:36.670'
(0x3000000)ApplOriginData = ' '
(0x3000000)GroupId = X'000000000000000000000000000000000000000000000000'
(0x3000000)MsgSeqNumber = 1
(0x3000000)Offset = 0
(0x3000000)MsgFlags = 0
(0x3000000)OriginalLength = -1
)
(0x1000021)MRM = (
(0x3000000)LASTNAME = 'Washington'
(0x3000000)FIRSTNAME = 'George'
)
) |
|
Back to top |
|
 |
kirani |
Posted: Thu Aug 22, 2002 7:54 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Is it possible to post your Compute node ESQL code here? _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
Robert |
Posted: Thu Aug 22, 2002 8:13 am Post subject: |
|
|
Apprentice
Joined: 22 Aug 2002 Posts: 46 Location: Quebec, Canada
|
Hi Kiran,
Here's my ESQL code as deployed.
Thanks for taking time to check on my problem.
Robert
======================
ESQL Code from Compute Node
======================
DECLARE I INTEGER;
SET I = 1;
WHILE I < CARDINALITY(InputRoot.*[]) DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I=I+1;
END WHILE;
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.
SET OutputRoot.Properties.MessageDomain = 'MRM';
SET OutputRoot.Properties.MessageSet = 'DQO7T80078001';
SET OutputRoot.Properties.MessageType = 't_FIXEDLAB';
SET OutputRoot.Properties.MessageFormat = 'TDS';
SET "OutputRoot"."MRM"."LASTNAME" = InputRoot.XML.LAB.LASTNAME;
SET "OutputRoot"."MRM"."FIRSTNAME" = InputRoot.XML.LAB.FIRSTNAME; |
|
Back to top |
|
 |
kirani |
Posted: Thu Aug 22, 2002 8:31 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Hi Robert,
What Physical format you have added to your Message Set in MRM, is it MRM-CWF or MRM-TDS? If it is MRM-CWF then your MessageFormat should be set to 'CWF' instead.
Other than this your transformation ESQL code looks OK. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
Robert |
Posted: Thu Aug 22, 2002 9:01 am Post subject: |
|
|
Apprentice
Joined: 22 Aug 2002 Posts: 46 Location: Quebec, Canada
|
Hi Kiran,
The runtime parser for my message set named 'FIXEDOUT' is 'MRM'. In addition, I created a tagged delimited physical format named 'TDFFIXED' that uses the TDS wire format identifier.
If this is correct, is there any other area such as the message, message type and value constraints that I should investigate?
Thanks again.
Robert. |
|
Back to top |
|
 |
kirani |
Posted: Thu Aug 22, 2002 9:26 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Robert,
Message Format name specified in your Compute node should be same as your TDS Wire Format Identifier. So your Compute node ESQL will change to:
SET OutputRoot.Properties.MessageFormat = 'TDFFIXED';
If this does not solve the problem then try changing TDS wire format Identifier of your message set to default value of TDS. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
Robert |
Posted: Thu Aug 22, 2002 11:06 am Post subject: |
|
|
Apprentice
Joined: 22 Aug 2002 Posts: 46 Location: Quebec, Canada
|
Hi Kiran,
I tried the SET OutputRoot.Properties.MessageFormat = 'TDFFIXED' and ended up with an invalid Wire Format message in my event log when attempting to parse output messages.
I also tried to change the TDS wire format Identifier of my message set to default value of TDS wihout adding a Tagged Delimited Physical format and this time I got a 'Parser not initialized' message in the NT event log.
I then added a physical format named TDS. Now it seems to parse correctly (according to my trace nodes) but I still end up with a Datalen of 0 if my output queue.
Any new input will be appreciated, otherwise, I'll contact IBM for tech support.
Thanks.
Robert |
|
Back to top |
|
 |
kirani |
Posted: Thu Aug 22, 2002 11:46 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Robert wrote: |
I also tried to change the TDS wire format Identifier of my message set to default value of TDS wihout adding a Tagged Delimited Physical format and this time I got a 'Parser not initialized' message in the NT event log.
|
This won't work. You have to have Physical Wire Format added to your message Set.
Robert wrote: |
I then added a physical format named TDS. Now it seems to parse correctly (according to my trace nodes) but I still end up with a Datalen of 0 if my output queue.
|
This is the correct way of doing it. Could you print your ExceptionList and we will try to debug it. I am sure there is a minor problem. BTW, what is your expected Output Format (, delimited or tagged delimited, ...) and what is the length your MRM elements?
I hope you have installed latest CSD for WMQI. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
|