Author |
Message
|
John |
Posted: Fri Oct 04, 2002 8:14 am Post subject: XML |
|
|
Novice
Joined: 21 Apr 2002 Posts: 23
|
Hi experts,
I need help with the following:
Input:
Field Name
FirstName fixed length 12
LastName fixed length 10
Input Message
Bart Simpson
Output as follows using MQSI:
<?xml version="1.0" ?>
<Name>
<FirstName>Bart</FirstName>
<LastName>Simpson</LastName>
</Name>
Any suggestions on how to accomplish this? Thanks. |
|
Back to top |
|
 |
kirani |
Posted: Fri Oct 04, 2002 9:08 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
John,
You will have to first define MRM-CWF message using Control Center with two elements. You will then configure your MQInput node to parse input message using this MRM message defn.
In a compute node, you will have to write some ESQL code to map input MRM message to output XML message, For example,
Code: |
SET OutputRoot.XML.(XML.XmlDecl) = '';
SET OutputRoot.XML.(XML.XmlDecl).(XML.Version) = '1.0';
SET OutputRoot.XML.Name.FirstName = InputRoot.MRM.FirstName;
SET OutputRoot.XML.Name.FirstName = InputRoot.MRM.LastName;
|
_________________ 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 |
|
 |
John |
Posted: Fri Oct 04, 2002 2:45 pm Post subject: |
|
|
Novice
Joined: 21 Apr 2002 Posts: 23
|
Thanks a lot for your reply Kiran.
I tried but the message was sent to the failure queue of the compute node due to parsing error have occurred (message definition not found in dictionary) Should a XML message set be created? I am using version 2.0.1.
Thanks again. |
|
Back to top |
|
 |
kirani |
Posted: Fri Oct 04, 2002 4:12 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
You don't need to create XML msgset. You will have to assign your MRM msgset to the broker and then do a broker level deploy. This will create Runtime Dictionary (RTD) for your message set, which is referred at runtime. _________________ 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 |
|
 |
John |
Posted: Fri Oct 04, 2002 6:12 pm Post subject: |
|
|
Novice
Joined: 21 Apr 2002 Posts: 23
|
Thanks Kiran, you are great! |
|
Back to top |
|
 |
lung |
Posted: Sun Oct 06, 2002 5:23 pm Post subject: |
|
|
 Master
Joined: 27 Aug 2002 Posts: 291 Location: Malaysia
|
Kiran,
What are these two lines for... ?
Code: |
SET OutputRoot.XML.(XML.XmlDecl) = '';
SET OutputRoot.XML.(XML.XmlDecl).(XML.Version) = '1.0'; |
Sorry, I'm still a bit new to XML  _________________ lung |
|
Back to top |
|
 |
kirani |
Posted: Sun Oct 06, 2002 6:45 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Lung,
That piece of ESQL code will generate XML header.
<?xml version="1.0" ?> _________________ 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 |
|
 |
|