ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Mapping an Input.MRM into an XML tag

Post new topic  Reply to topic
 Mapping an Input.MRM into an XML tag « View previous topic :: View next topic » 
Author Message
wendy
PostPosted: Mon Aug 18, 2003 11:41 pm    Post subject: Mapping an Input.MRM into an XML tag Reply with quote

Apprentice

Joined: 10 Dec 2001
Posts: 47

Im having a problem I need to map an InputRoot.MRM into a single XML tag.

The statement

Set Output.XML.Message.Temp = InputRoot.MRM.*;

only allocates the first element.Im actually doing error handling and the number of element on Input.MRM is unknown.

Please help.Its urgent.
Back to top
View user's profile Send private message Send e-mail
Craig B
PostPosted: Tue Aug 19, 2003 12:57 am    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

Hi,

By using * in InputRoot.MRM.* you are asking for the first child of the MRM folder regardless of Name. If you change this SET statement to Set Output.XML.Message.Temp = InputRoot.MRM; then this should perform a whole tree copy which includes all the children of the MRM folder.
_________________
Regards
Craig
Back to top
View user's profile Send private message
Craig B
PostPosted: Tue Aug 19, 2003 1:07 am    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

Having read your update again, you mention that you want the contents of the MRM tree to be written into a single XML tag. If you use the SET statement I specified in my last update then this will create multiple children in the XML tree. When this OutputRoot.XML tree is written to a message, then this will result in all the MRM fieldnames and values being written out as children of the Tag 'Temp'. This may not be what you want. If you just want the one XML 'Temp' tag written out which contains the values of the all MRM fields, then you really want the bitstream of the MRM tree inserted into the XML tag. To do this you can either use the

Code:

SET OutputRoot.XML.MessageTemp = CAST(BITSTREAM(InputRoot.MRM) AS CHAR CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding);


Or if the MRM tree has changed through the flows then :

Code:

SET OutputRoot.XML.MessageTemp = CAST(ASBITSTREAM(InputRoot.MRM, InputRoot.MQMD.Encoding, InputRoot.MQMD.CodedCharSetId, 'MRMSetName','MRMMessageName','MRMFormatName',RootBitStream) AS CHAR CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding);


But if you are trying to insert the MRM bitstream into the XML message, then you have to be careful that this does not contain characters that would be invalid in the XML domain such as X'00'.

This is a more general answer with alternatives ..... if you clarify exactly what you want to see in the XML message, then I can guide you more specifically.
_________________
Regards
Craig
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Mapping an Input.MRM into an XML tag
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.