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 » How to Convert xml tree to String

Post new topic  Reply to topic
 How to Convert xml tree to String « View previous topic :: View next topic » 
Author Message
dsmq
PostPosted: Fri Jun 20, 2003 7:28 am    Post subject: How to Convert xml tree to String Reply with quote

Acolyte

Joined: 20 Jun 2002
Posts: 59

Hi

I am running into following Problem.

I am bulding XML message for my Auditing. In that one of my XML tag should be in coming XML message.

Ex Audting XML message

<Audit>
<Source>aa</Source>
<TransName>mm</TransName>
<Data> InputRoot.XML </Data>
</Audit>

Now the Problem is How do i put my InputRoot.XML into the Data Tag as String

I am using

OutputRoot.XML.Audit.Data = CAST(CAST(InputRoot.XML AS BLOB CCSID 819) AS CHAR CCSID 819)

But it is not working.

Thanks
Back to top
View user's profile Send private message
Craig B
PostPosted: Fri Jun 20, 2003 7:32 am    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

The CAST function can only take a scalar value as it parameter and therefore when you pass a field reference it only takes the value of that field, and not the subtree it may represent. Therefore when you specify InputRoot.XML, it takes the value of that specific field and not all the children of InputRoot.XML.

Please see the latest response in the following location for details on how to do what you require :

http://www.mqseries.net/phpBB2/viewtopic.php?t=8958
_________________
Regards
Craig
Back to top
View user's profile Send private message
Craig B
PostPosted: Fri Jun 20, 2003 7:34 am    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

I should have also commented in the last update that if you want to take the whole of your input XML message then you need to use the constant RootBitStream instead of FolderBitStream in the example. Or you can just not specify the final parameter on ASBITSTREAM.
_________________
Regards
Craig
Back to top
View user's profile Send private message
dsmq
PostPosted: Fri Jun 20, 2003 7:51 am    Post subject: How to Convert xml tree to String Reply with quote

Acolyte

Joined: 20 Jun 2002
Posts: 59

BITSTREAM Worked

Thank You
Back to top
View user's profile Send private message
Craig B
PostPosted: Fri Jun 20, 2003 8:00 am    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

If you are working with a message tree that was created by the parser at input time then the BITSTREAM function will perform the same job you require as you point out. However it should be noted for future reference that the BITSTREAM function has two limitations such that :

1) It can only produce a BLOB for a message tree if this was created by a parser at input time. Ie, the input message bitstream that was associated with a parser. It cannot produce a bitstream of a newly created message tree, because this does not have a bitstream associated with it.

2) It can only produce a BLOB for the whole of a parser message tree folder. ie it cannot produce a BLOB for specific fields and folders within the message body say.

The ASBITSTREAM function does not have these limitations.
_________________
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 » How to Convert xml tree to String
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.