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 » Represent an XML as type character

Post new topic  Reply to topic
 Represent an XML as type character « View previous topic :: View next topic » 
Author Message
wendy
PostPosted: Thu May 15, 2003 7:07 am    Post subject: Represent an XML as type character Reply with quote

Apprentice

Joined: 10 Dec 2001
Posts: 47

I have an XML input to a WMQI flow.The input node has a validation option set for a specific Message set(XSD).The incoming message is of the following XML Message.

</CrfActionGroup>
<COMMAND>
<InquiryRequest><Message> <contractNo>0015922583</contractNo>
<effectiveDate>2001-04-14</effectiveDate>
</Message>
</InquiryRequest>
</name>tdterd</name>
</COMMAND>

How do I represent InquiryRequest content i.e.
<Message> <contractNumber>0015922583</contractNumber>
<effectiveDate>2001-04-14</effectiveDate>
</Message>

as data string not an a complex XML type with elements? Is there a cancellation character or declaration that i need to make so that the WMQI flow recognise complex Type Messsage as a string instead of XML.Please help ASAP.



Wendy
Back to top
View user's profile Send private message Send e-mail
wolstek
PostPosted: Fri May 16, 2003 5:56 am    Post subject: Reply with quote

Acolyte

Joined: 25 Jun 2001
Posts: 52
Location: Bristol, UK

You might the support pac IA05 (message Tree Parser) useful

http://www-3.ibm.com/software/integration/support/supportpacs/individual/ia05.html
Back to top
View user's profile Send private message
Craig B
PostPosted: Wed Jun 18, 2003 7:40 am    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

From the description given it would seem that you want the actual text <Message><contractNumber>0015922583</contractNumber><effectiveDate>2001-04-14</effectiveDate></Message> from the XML message instead of accessing the individual fields that would have been created in the message tree when this is parsed. If this is the case and you are on WMQI V2.1 CSD03 or higher, then you can make use of the new ASBITSTREAM function. Unlike the BITSTREAM function the ASBITSTREAM function can return a BLOB of a selected Folder/field in the message tree. Once you have a BLOB of the high level folder, in this case Message, then you can use the CAST function with the CCSID and ENCODING keywords to produce you the character string you require. For example :

Code:

DECLARE myMsgBlob BLOB;
DECLARE myMsgChar CHAR;

SET myMsgBlob = ASBITSTREAM(InputRoot.XML.myRoot.Message,
                            InputRoot.MQMD.Encoding,
                            InputRoot.MQMD.CodedCharSetId,
                            '','','',
                            FolderBitStream );

SET myMsgChar = CAST( myMsgBlob AS CHAR CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding);


The following points apply :

1) If you message is MRM-XML then you need to change the following :
i) The InputRoot.XML reference and the myRoot would need to be changed appropriately.
ii) The '','','' line would need to be changed to be the messageSet, messageType and messageFormat names for the MRM messageSet being used.

2) If this is being run on unix platforms then the whole XML message would be returned. This is due to problems with FolderBitStream which is due to be fixed in CSD05.
_________________
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 » Represent an XML as type character
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.