Author |
Message
|
klabran |
Posted: Mon May 03, 2004 11:48 am Post subject: XML to MRM to XML how to? |
|
|
 Master
Joined: 19 Feb 2004 Posts: 259 Location: Flagstaff AZ
|
Until now I have only done xml in/out of MQSI without defining the xml message in a message set.
I was told that converting the XML to MRM is a better design.
So.... I have taken a simple input XML message and output XML message converted them to MRM with XML wire formats using mqsiIMPXMLSchema. The two schema's are very simple... everything optional (0-many occurances), all strings.
Simple Flow: inq->compute->outq
Inq - parser set at MRM.
Compute - add messages to input / output, copy message headers, use as message body checked, dragged input to output for mapping transformation.
I am not getting the desired results.
See http://www.mqseries.net/phpBB2/viewtopic.php?t=15087
I am using WMQI v2.1 CSD 6 and MQ 5.3 CSD 5.
Am I following the correct steps for doing this? Is this a better design?
Thanks for any assistance,
Kevin |
|
Back to top |
|
 |
klabran |
Posted: Mon May 03, 2004 1:04 pm Post subject: |
|
|
 Master
Joined: 19 Feb 2004 Posts: 259 Location: Flagstaff AZ
|
Is there something special I need to do when passing the message in using mqsiputc?
I am just passing in the XML version of the ingoing message.
Do I need to add a MQRFH2 header???? |
|
Back to top |
|
 |
klabran |
Posted: Mon May 03, 2004 1:14 pm Post subject: |
|
|
 Master
Joined: 19 Feb 2004 Posts: 259 Location: Flagstaff AZ
|
Is there a manual that covers this???
I have looked at Working with messages for WMQI 2.1 and have seen some bits on this but nothing like a sample walk through... |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon May 03, 2004 3:39 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Please post a trace of your message before your compute node and a trace of your message after your trace node. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
klabran |
Posted: Tue May 04, 2004 8:10 am Post subject: |
|
|
 Master
Joined: 19 Feb 2004 Posts: 259 Location: Flagstaff AZ
|
Before compute....
(
(0x1000000)Properties = (
(0x3000000)MessageSet = 'DVVCFP808E001'
(0x3000000)MessageType = 'INMSG'
(0x3000000)MessageFormat = 'INXML'
(0x3000000)Encoding = 273
(0x3000000)CodedCharSetId = 437
(0x3000000)Transactional = TRUE
(0x3000000)Persistence = TRUE
(0x3000000)CreationTime = GMTTIMESTAMP '2004-05-04 16:06:45.050'
(0x3000000)ExpirationTime = -1
(0x3000000)Priority = 0
(0x3000000)ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x3000000)ReplyProtocol = 'MQ'
(0x3000000)Topic = NULL
)
(0x1000000)MQMD = (
(0x3000000)SourceQueue = 'QL_TEST2'
(0x3000000)Transactional = TRUE
(0x3000000)Encoding = 273
(0x3000000)CodedCharSetId = 437
(0x3000000)Format = 'MQSTR '
(0x3000000)Version = 2
(0x3000000)Report = 0
(0x3000000)MsgType = 1
(0x3000000)Expiry = -1
(0x3000000)Feedback = 0
(0x3000000)Priority = 0
(0x3000000)Persistence = 1
(0x3000000)MsgId = X'414d5120514d5f43435f5031202020207848904020012c01'
(0x3000000)CorrelId = X'000000000000000000000000000000000000000000000000'
(0x3000000)BackoutCount = 0
(0x3000000)ReplyToQ = 'MQREPLY '
(0x3000000)ReplyToQMgr = 'MYQM '
(0x3000000)UserIdentifier = 'klabranche '
(0x3000000)AccountingToken = X'16010515000000b459d40753474578915f302f1d04000000000000000000000b'
(0x3000000)ApplIdentityData = ' '
(0x3000000)PutApplType = 11
(0x3000000)PutApplName = 'es\XML_MRM_TEST\mqsiputc.exe'
(0x3000000)PutDate = DATE '2004-05-04'
(0x3000000)PutTime = GMTTIME '16:06:45.050'
(0x3000000)ApplOriginData = ' '
(0x3000000)GroupId = X'000000000000000000000000000000000000000000000000'
(0x3000000)MsgSeqNumber = 1
(0x3000000)Offset = 0
(0x3000000)MsgFlags = 0
(0x3000000)OriginalLength = -1
)
(0x1000021)MRM = (
(0x300000B)NAME = 'TEST'
(0x300000B)VERSION = '1'
(0x1000013)COMPLEX = (
(0x300000B)TEST = 'HELLO'
)
)
) |
|
Back to top |
|
 |
klabran |
Posted: Tue May 04, 2004 8:12 am Post subject: |
|
|
 Master
Joined: 19 Feb 2004 Posts: 259 Location: Flagstaff AZ
|
After compute...
(
(0x1000000)Properties = (
(0x3000000)MessageSet = 'DVVCFP808G001'
(0x3000000)MessageType = 'OUTMSG'
(0x3000000)MessageFormat = 'OUTXML'
(0x3000000)Encoding = 273
(0x3000000)CodedCharSetId = 437
(0x3000000)Transactional = TRUE
(0x3000000)Persistence = TRUE
(0x3000000)CreationTime = GMTTIMESTAMP '2004-05-04 16:06:45.050'
(0x3000000)ExpirationTime = -1
(0x3000000)Priority = 0
(0x3000000)ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x3000000)ReplyProtocol = 'MQ'
(0x3000000)Topic = NULL
)
(0x1000000)MQMD = (
(0x3000000)SourceQueue = 'QL_TEST2'
(0x3000000)Transactional = TRUE
(0x3000000)Encoding = 273
(0x3000000)CodedCharSetId = 437
(0x3000000)Format = 'MQSTR '
(0x3000000)Version = 2
(0x3000000)Report = 0
(0x3000000)MsgType = 1
(0x3000000)Expiry = -1
(0x3000000)Feedback = 0
(0x3000000)Priority = 0
(0x3000000)Persistence = 1
(0x3000000)MsgId = X'414d5120514d5f43435f5031202020207848904020012c01'
(0x3000000)CorrelId = X'000000000000000000000000000000000000000000000000'
(0x3000000)BackoutCount = 0
(0x3000000)ReplyToQ = 'MQREPLY '
(0x3000000)ReplyToQMgr = 'MYQM '
(0x3000000)UserIdentifier = 'klabranche '
(0x3000000)AccountingToken = X'16010515000000b459d40753474578915f302f1d04000000000000000000000b'
(0x3000000)ApplIdentityData = ' '
(0x3000000)PutApplType = 11
(0x3000000)PutApplName = 'es\XML_MRM_TEST\mqsiputc.exe'
(0x3000000)PutDate = DATE '2004-05-04'
(0x3000000)PutTime = GMTTIME '16:06:45.050'
(0x3000000)ApplOriginData = ' '
(0x3000000)GroupId = X'000000000000000000000000000000000000000000000000'
(0x3000000)MsgSeqNumber = 1
(0x3000000)Offset = 0
(0x3000000)MsgFlags = 0
(0x3000000)OriginalLength = -1
)
(0x1000021)MRM =
) |
|
Back to top |
|
 |
klabran |
Posted: Tue May 04, 2004 8:17 am Post subject: |
|
|
 Master
Joined: 19 Feb 2004 Posts: 259 Location: Flagstaff AZ
|
I have been messing with the flow...
My current config's are:
inq
message domain:mrm
message set = incoming message id
message type = INMSG (message in message set)
message format = INXML (XML Wire format)
compute
added inmsg to input and outmsg to output
copy message headers on
use as message body checked
dragged/dropped the fields from input to output.
Added to the ESQL OutputRoot.Properties.MessageFormat='OUTXML'
I end up with only <OUTMSG></OUTMSG>.
None of the data is transferred? |
|
Back to top |
|
 |
wooda |
Posted: Tue May 04, 2004 8:42 am Post subject: |
|
|
 Master
Joined: 21 Nov 2003 Posts: 265 Location: UK
|
Please post the entire contents of the compute node ESQL window. |
|
Back to top |
|
 |
klabran |
Posted: Tue May 04, 2004 9:48 am Post subject: |
|
|
 Master
Joined: 19 Feb 2004 Posts: 259 Location: Flagstaff AZ
|
DECLARE I INTEGER;
SET I = 1;
WHILE I < CARDINALITY(InputRoot.*[]) DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I=I+1;
END WHILE;
SET "OutputRoot"."MRM"."OUTMSG_ANON^NAME" = "InputBody"."INMSG_ANON^NAME";
SET "OutputRoot"."MRM"."OUTMSG_ANON^VERSION" = "InputBody"."INMSG_ANON^VERSION";
SET "OutputRoot"."MRM"."OUTMSG_ANON^COMPLEX"[] = "InputBody"."INMSG_ANON^COMPLEX"[];
SET OutputRoot.Properties.MessageSet = 'DVVCFP808G001';
SET OutputRoot.Properties.MessageType = 'OUTMSG';
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.
SET OutputRoot.Properties.MessageFormat='OUTXML';
--SET OutputRoot.Properties.MessageFormat = 'XML'; |
|
Back to top |
|
 |
Missam |
Posted: Tue May 04, 2004 10:55 am Post subject: |
|
|
Chevalier
Joined: 16 Oct 2003 Posts: 424
|
Hi klabran
I guess there is no need to set OutputRoot.Properties..... when you use mapping pane to map input and output elements.
and whats the use of ^ in element names does it have any special meaning.because in trace before compute node the MRM element Names are different from the elements in compute node.
did u see any errors in the system log.?
try user trace debug the flow. |
|
Back to top |
|
 |
klabran |
Posted: Tue May 04, 2004 11:52 am Post subject: |
|
|
 Master
Joined: 19 Feb 2004 Posts: 259 Location: Flagstaff AZ
|
that's just the way they were named for the mrm. The xml wire format has the correct names (like <version>). I imported them using mqsiimpXMLschema and took it's defaults.... |
|
Back to top |
|
 |
fschofer |
Posted: Tue May 04, 2004 2:34 pm Post subject: |
|
|
 Knight
Joined: 02 Jul 2001 Posts: 524 Location: Mainz, Germany
|
Hi, please try:
DECLARE I INTEGER;
SET I = 1;
WHILE I < CARDINALITY(InputRoot.*[]) DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I=I+1;
END WHILE;
SET OutputRoot.Properties.MessageSet = 'DVVCFP808G001';
SET OutputRoot.Properties.MessageType = 'OUTMSG';
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.
SET OutputRoot.Properties.MessageFormat='OUTXML';
--SET OutputRoot.Properties.MessageFormat = 'XML';
SET "OutputRoot"."MRM"."NAME" = "InputBody"."NAME";
SET "OutputRoot"."MRM"."VERSION" = "InputBody"."VERSION";
SET "OutputRoot"."MRM"."COMPLEX" = "InputBody"."COMPLEX";
I do not why the output / input Messages are added to your created code
but according to your traces the code above should work. |
|
Back to top |
|
 |
klabran |
Posted: Tue May 04, 2004 2:50 pm Post subject: |
|
|
 Master
Joined: 19 Feb 2004 Posts: 259 Location: Flagstaff AZ
|
that worked but...... WHY????
And doing it this way doesn't allow the drag and drop functionality which is the major reason for converting XML to MRM....????
Is there extra work to do once I import the XML into MRM using mqsiimpxmlschema or am I not understanding how the XML to MRM and back to XML is suppose to work??? |
|
Back to top |
|
 |
|