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 » Generating CDATA in output message using mapping/compute nod

Post new topic  Reply to topic
 Generating CDATA in output message using mapping/compute nod « View previous topic :: View next topic » 
Author Message
Rahul999
PostPosted: Tue Feb 23, 2010 7:20 am    Post subject: Generating CDATA in output message using mapping/compute nod Reply with quote

Centurion

Joined: 14 Mar 2007
Posts: 134

Hello,

I have a task in which I need to generate an XML message with CDATA, the structure of the message is given here, I am using the mapping node to map the contents of source XML(which doesnt have any field which might require CDATA) to target XML(which is having a tag consistes of CDATA). The Genereated output message will have and tag which is having CDATA as the element. Now, how I generate the XML so that contents of tag (Address) is CDATA.
Quote:
<Client>
<Name>
<Type>
<MsgType>REQUEST</MsgType>
<SourceAppl>XYZ</SourceApplFunc>
<SentDate>2010-01-27T03:21:49</SentDate>

</Type>
</Name>

<Address><![CDATA[HouseNo=002|
StreetNo=90465|]]></Address>

</Client>


Thanks
_________________
"For all your days be prepared, and meet them ever alike.
When you are the anvil, bear - when you are the hammer, strike."
- Edwin Markham
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Rahul999
PostPosted: Tue Feb 23, 2010 8:53 am    Post subject: Reply with quote

Centurion

Joined: 14 Mar 2007
Posts: 134

Hi All,

Can anyone suggest anything, please. Its kinda urgent, most of the topics in the form is about reading CDATA but none is about generating it.

Thanks
_________________
"For all your days be prepared, and meet them ever alike.
When you are the anvil, bear - when you are the hammer, strike."
- Edwin Markham
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Vitor
PostPosted: Tue Feb 23, 2010 9:03 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Rahul999 wrote:
Can anyone suggest anything, please.


Not me. I know how to do this in ESQL, but I don't use the mapping node enough to really comment.

Rahul999 wrote:
Its kinda urgent, most of the topics in the form is about reading CDATA but none is about generating it.


Then you should be raising a PMR. IBM will give you urgent support as part of the license, we're just a bunch of volunteers with days jobs.

Though I accept some people's day jobs are responding to PMRs.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Feb 23, 2010 9:06 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.doc/ar25650_.htm

?
Back to top
View user's profile Send private message
Rahul999
PostPosted: Tue Feb 23, 2010 9:23 pm    Post subject: Reply with quote

Centurion

Joined: 14 Mar 2007
Posts: 134

Quote:
http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.doc/ar25650_.htm


Thanks Jeff, I managed to resolve it with the link mentioned by you.

But, now going further(while building the reply) I need to take an tag with CDATA elements and generate a XML message tags with each field in CDATA.

Something like -

Quote:
<MWMB><![CDATA[CLIENT_COUNTRY=IN
CLIENT_STATUS=0
CLIENT_TYPE=9
CLIENT_JOINING_DATE=100696
ADDRESS1=TO BE COLLECTED
ADDRESS2=BARHOUSE
ADDRESS3=
ADDRESS_CONTACT_NAME=INDIA
ADDRESS_IND=0
ADDRESS_SEQ_NUMBER=0
ATM_CLASS=0
]]></MWMB>


Now I have to take individual fields(CLIENT_COUNTR, CLIENT_STATUS,CLIENT_TYPE etc.) in the above CDATA element and generate the xml tags with them with the value added.

So my output would look like something.

Quote:


MWMB>
<CLIENT_COUNTRY>IN</CLIENT_COUNTRY>
<CLIENT_STATUS>0</CLIENT_STATUS>
<CLIENT_TYPE>9</CLIENT_TYPE>
...
...
..
and so on.


Can you please suggest how I go about it.

Thanks
_________________
"For all your days be prepared, and meet them ever alike.
When you are the anvil, bear - when you are the hammer, strike."
- Edwin Markham
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kimbert
PostPosted: Wed Feb 24, 2010 2:07 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

So you need to parse a document consisting of lines of text. Each line consists of a tag, a Tag Data Separator ( = ) and a value. Sounds like you need the MRM parser with a TDS physical format.

btw, this question is not really about CDATA. You should really have started a new thread.
Back to top
View user's profile Send private message
Rahul999
PostPosted: Wed Feb 24, 2010 4:29 pm    Post subject: Reply with quote

Centurion

Joined: 14 Mar 2007
Posts: 134

Quote:

PostPosted: Wed Feb 24, 2010 2:07 am Post subject:
So you need to parse a document consisting of lines of text. Each line consists of a tag, a Tag Data Separator ( = ) and a value. Sounds like you need the MRM parser with a TDS physical format.


Thanks Kimbert.

What I understand here is that I need to first remove the TAG and CDATA section from the below message and get the remaining part in a string, and then construct a TDS message set with delimiter as '=' so that it will parse all the individual fields?

Quote:
<MWMB><![CDATA[CLIENT_COUNTRY=IN
CLIENT_STATUS=0
CLIENT_TYPE=9
CLIENT_JOINING_DATE=100696
ADDRESS1=TO BE COLLECTED
ADDRESS2=BARHOUSE
ADDRESS3=
ADDRESS_CONTACT_NAME=INDIA
ADDRESS_IND=0
ADDRESS_SEQ_NUMBER=0
ATM_CLASS=0
]]></MWMB>

_________________
"For all your days be prepared, and meet them ever alike.
When you are the anvil, bear - when you are the hammer, strike."
- Edwin Markham
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kimbert
PostPosted: Thu Feb 25, 2010 1:00 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

No. You need to
- parse the XML document using the XMLNSC parser
- retrieve the text value of the <MWMB> tag
- pass that text value to the MRM parser. You can do that using CREATE...PARSE...DOMAIN 'MRM'. There are many examples in this forum which you can find using the search button.
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 » Generating CDATA in output message using mapping/compute nod
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.