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 » Adding CDATA to XML Message dynamically

Post new topic  Reply to topic
 Adding CDATA to XML Message dynamically « View previous topic :: View next topic » 
Author Message
new_to_wmb8
PostPosted: Tue Nov 26, 2013 1:27 am    Post subject: Adding CDATA to XML Message dynamically Reply with quote

Centurion

Joined: 28 May 2013
Posts: 127
Location: Hyderabad, India

Hi All,

i know this thread has been posted earlier as well and i have checked them all and tried to used the same on my flow, but some how it is not working.

my flow is used to Convert Incoming MRM format to XMLNSC, in output we need to add CDATA to only one tag,
Code:

<NS1:PM_HTS xmlns:NS1="http://www.xxxx.com/PMHTS">
 <NS1:messageID>50221 LIBUF</NS1:messageID>
 <NS1:applicationName>4202.39.9000</NS1:applicationName>
 <NS1:htsStyleNo>50221 LIBUF</NS1:htsStyleNo>
 <NS1:htsSKUName>50221 LIBUF</NS1:htsSKUName>
 <NS1:htsCode>4202.39.9000</NS1:htsCode>
 <NS1:htsDestCountry>US</NS1:htsDestCountry>
 <NS1:htsCustomsDesc>WALLET, WOMENS of ALL OVER GLITTER, FAUX EXOTIC</NS1:htsCustomsDesc>
</NS1:PM_HTS>

so i need to add CDATA to only this tag,
Code:
 <htsCustomsDesc><![CDATA[WALLET, WOMENS of ALL OVER GLITTER, FAUX EXOTIC]></htsCustomsDesc>


so to do this i have used below code in ESQL that i found in infocentre,
Code:

DECLARE CustomDesBlob  BLOB ASBITSTREAM(InputRoot.DEST_CUSTOMS_DESC,InputRoot.Properties.Encoding,InputRoot.Properties.CodedCharSetId);
DECLARE CustomDesChar CHAR CAST(CustomDesBlob AS CHAR CCSID InputRoot.Properties.CodedCharSetId);
SET OutputRoot.XMLNSC.PM_HTS.(XMLNSC.CDataField)htsCustomsDesc = CustomDesChar;


no value is coming in CustomDesChar and CustomDesBlob , so at output nothing is coming in <htsCustomsDesc> tag.

Any one plz help on to get this requirement or any error in the code i have used.
TIA
Back to top
View user's profile Send private message
new_to_wmb8
PostPosted: Tue Nov 26, 2013 1:58 am    Post subject: Reply with quote

Centurion

Joined: 28 May 2013
Posts: 127
Location: Hyderabad, India

hey guys, i have resolved the issue.

i just have to use below esql code only and it is working as aspected
Code:
SET OutputRoot.XMLNSC.PM_HTS.(XMLNSC.CDataField)htsCustomsDesc = InputRoot.MRM.DEST_CUSTOMS_DESC;

[/code]
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 » Adding CDATA to XML Message dynamically
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.