|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
converting String message to XML |
« View previous topic :: View next topic » |
Author |
Message
|
surendra |
Posted: Tue Aug 31, 2004 2:33 pm Post subject: converting String message to XML |
|
|
Newbie
Joined: 16 Jul 2004 Posts: 7
|
Hi All,
I was trying to convert a string message "23,rick,adam,23" from a queue to XML. am using WMQI 2.1 and CSD5. any thoughts on this will be greatly appreciated.
Thanks. |
|
Back to top |
|
 |
kirani |
Posted: Tue Aug 31, 2004 10:32 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
What s the format of your XML message?
You can do this in two different ways,
1) Define input message in MRM-TDS format (All Elements Delimited) and use ESQL code to transform it to desired output (XML) format.
2) Read mssage as BLOB and use SUBSTRING/POSITION functions to retrieve eah element from input data. Use ESQL code to transform these values in XML format.
I'd recommend that you use option 1. _________________ 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 |
|
 |
surendra |
Posted: Wed Sep 01, 2004 8:23 am Post subject: |
|
|
Newbie
Joined: 16 Jul 2004 Posts: 7
|
Thank you kiran, I applied option 1 and got it working , but there is a small hiccup,I need to get rid of the tags other than the one I have specified.In particular, the tag that specifies the MessageType.In my case its "<MSGID> </MSGID>".
Cheers |
|
Back to top |
|
 |
kirani |
Posted: Wed Sep 01, 2004 10:02 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
How are these tags being built? Are you doing it in your ESQL code?
You can remove the tag by setting it to NULL. For example,
SET OutputRoo.XML.MyMessage.MyTag = NULL; _________________ 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 |
|
 |
contactop |
Posted: Thu Sep 02, 2004 5:53 am Post subject: |
|
|
Acolyte
Joined: 26 Jun 2003 Posts: 50
|
Create a messageset of TDS type, and u will be able to do so. |
|
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
|
|
|
|