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 define ESQL with CDATA and dynamic xml in it.

Post new topic  Reply to topic
 how to define ESQL with CDATA and dynamic xml in it. « View previous topic :: View next topic » 
Author Message
kathirvelt
PostPosted: Sat Mar 12, 2011 4:08 pm    Post subject: how to define ESQL with CDATA and dynamic xml in it. Reply with quote

Apprentice

Joined: 02 Oct 2010
Posts: 32

How to define ESQL with CDATA and dynamic xml in it. Please advice.

<msgPayload><![CDATA[<clm
xmlns="http://test.com/xsd/iClmV0.2"> <versionId>00301</versionId>
<name>
<nmOrg>TEST DATA
</nmOrg>
</name></clm>]]>
</msgPayload>
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Mar 13, 2011 7:57 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

not enough data to give you specific advice.
Read up on the ASBITSTREAM function and the XML.CData and XMLNSC.CData field types.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kathirvelt
PostPosted: Sun Mar 13, 2011 3:39 pm    Post subject: Reply with quote

Apprentice

Joined: 02 Oct 2010
Posts: 32

I'm using XMLNSC parser to define the xml. Can I do as mentioned below. Is this valid?


SET OutputRoot.XMLNSC.EMPRequest.msgsPayload.(XML.CDataSection) = ASBITSTREAM(OutputRoot.XMLNSC.message.empxml);

Thanks for your help.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Sun Mar 13, 2011 4:18 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You can not write any ESQL code using the XMLNSC parser when you use any constants that do not start with XMLNSC.

So, no, you can not use XML.CData. And FJ should know this very very well.

Nor can you actually use XMLNSC.CData, because that's not actually the correct name of the correct constant.
Back to top
View user's profile Send private message
kathirvelt
PostPosted: Sun Mar 13, 2011 7:01 pm    Post subject: Reply with quote

Apprentice

Joined: 02 Oct 2010
Posts: 32

Can you please let me know how should I code in ESQL to get this in output xml.
Back to top
View user's profile Send private message
kathirvelt
PostPosted: Sun Mar 13, 2011 8:27 pm    Post subject: Reply with quote

Apprentice

Joined: 02 Oct 2010
Posts: 32

I was able to generat the output with the below one, But this is not the right way of doing this. Can someone suggest a good way of doing this.

SET OutputRoot.XMLNSC.EMPRequest.msgsPayload.(XML.CDataSection) ='[<clm
xmlns="http://test.com/xsd/iClmV0.2"> <versionId>00301</versionId>
<name>
<nmOrg>TEST DATA
</nmOrg>
</name></clm>';
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Mar 13, 2011 9:48 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

@ Jeff At the time of my reply the OP had given absolutely no indication as to which parser he / she was using.
This why I said that he /she should READ up and look at BOTH the XML version and the XMLNSC version. As I instructed the OP to read up I did not think it necessary to do so myself... Note that despite your leading post and the big hint in it, the OP did not seem to be able to find the necessary reference...

@Kathirvelt:
Here is the Infocenter reference : XMLNSC: working with CData. A simple search on CData in the infocenter should have shown you this exemple.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Mon Mar 14, 2011 1:25 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

fjb_saper wrote:
he /she should READ up and look at BOTH the XML version and the XMLNSC version.



Don't use XML domain. At all. For anything.
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Mar 14, 2011 2:28 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
A simple search on CData in the infocenter should have shown you this exemple.
I agree. I thought the same about this question: http://www.mqseries.net/phpBB2/viewtopic.php?t=56892

Please get into the habit of looking in the infocenter before asking for help on this forum. Or use the search button at the top of the page to look for similar questions.
Back to top
View user's profile Send private message
kathirvelt
PostPosted: Mon Mar 14, 2011 3:17 pm    Post subject: Reply with quote

Apprentice

Joined: 02 Oct 2010
Posts: 32

Thanks for you help/suggestions. I(he) did do the search on infocenter and here. But somehow missed to put correct keyword.

I was able to resolve the issue with follwoing.

DECLARE wholeMsgBlob BLOB ASBITSTREAM(OutputRoot.XMLNSC.empclm,OutputRoot.Properties.Encoding,OutputRoot.Properties.CodedCharSetId );
DECLARE wholeMsgChar CHAR CAST(wholeMsgBlob AS CHAR CCSID OutputRoot.Properties.CodedCharSetId);
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 define ESQL with CDATA and dynamic xml in it.
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.