CData Sections in BizTalk Orchestration

Recently I worked for the first time with CData sections in XML messages. A CData section in an XML Document starts with <![CDATA[ and ends with ]]> and everything between is ignored by the XML parser.

In my scenario I got xml (with some CData sections) from a WebService, transformed it with a map (and did some other things in an orchestration) and sent it to another WebService. The first WS gave me xml with CData but the second WS received none.

After some debugging I found out that the xml arrived in the orchestration in the correct format (with CData sections). The place where the CData got lost was the map. The CData brackets where simply omitted during transformation. I found that there is a property called "CDATA Section Elements" at the map. (you get it in your property window if you click on the space in the middle in Biztalk mapper where you drop functoids) There I entered a xml node and after the transformation this node contained a CData Section. I was especially happy because this node was part of an any element in my xml message. Although the mapper does not know the schema of my whole message he inserted the CData section in the subnode.
The last question was how to specify more than one node to be CData nodes. I tried with comma and semicolon but only got errors when testing the map. After investigating the depths of BizTalk documentation I found the section where the "CDATA Section Elements" property is described and found the required information in the last sentence. :-)

"If you provide multiple values for this property, separate them with spaces."

Now I was able to finish the application correctly. The only interesting question left (but had no time to test it) is if there is a way to automatically recognize CData sections in an inbound document of a map and dynamically create the CData sections in the outbound document. (perhaps with a custom functoid) But that would be a seperate post in the future, since the current solution is sufficient for me.
 

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
posted @ Saturday, October 06, 2007 2:02 AM
Print

Comments on this entry:

# re: CData Sections in BizTalk Orchestration

Left by Salman Zulfiqar at 4/1/2010 10:38 PM
Gravatar
Information provided is good but its missing one important thing that is example to understand properly.
Node name / element used for this purpose in the target schema should be specified with namespace prefix.

e.g: ns0:FirstName

In the above mentioned example ns0:FirstName is the complete solution. ns0 is the default namespace prefix that BizTalk uses for the target schema and FirstName is the element in the target schema of the biztalk map.

Now, i think its complete.

# re: CData Sections in BizTalk Orchestration

Left by herve leger bandage dress at 6/4/2010 9:36 AM
Gravatar
Nice post.Thank you for taking the time to publish this information very useful!
I’m still waiting for some interesting thoughts from your side in your next post thanks

# re: CData Sections in BizTalk Orchestration

Left by free email spam filter at 6/4/2010 9:38 AM
Gravatar
hey buddy,this is one of the best posts that I’ve ever seen; you may include some more ideas in the

same theme. I’m still waiting for some interesting thoughts from your side in your next post.

# re: CData Sections in BizTalk Orchestration

Left by Races at 10/2/2010 1:43 PM
Gravatar
Longevity Racing is a source providing information on car racing, drag, formula-1, dirt track and all other racing news. It is serving the most comprehensive and up to date sports car racing news in America. The category includes car racing, bike racing, drag racing, jet racing and ford racing.

# re: CData Sections in BizTalk Orchestration

Left by Airsoft at 10/2/2010 1:44 PM
Gravatar
Monster Airsoft USA is one of the finest resources for providing a unique facility services either in military form or in "civilian" semi-automatic only form. It also offers you high end premium Airsoft Guns and also provide high quality at affordable prices. The category including AEGs, AK47 AEG Models, Cyma Airsoft, Airsoft Guns and M16 Airsoft.

# re: CData Sections in BizTalk Orchestration

Left by gucci bags at 10/13/2010 1:30 AM
Gravatar
I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success.

# re: CData Sections in BizTalk Orchestration

Left by cheap electronics at 1/12/2011 9:19 PM
Gravatar
happy new year!!!!

# re: CData Sections in BizTalk Orchestration

Left by Frisco Plumber at 1/15/2011 5:11 PM
Gravatar
Great information. I got lucky and found your site from a random Google search. Fortunately for me, this topic just happens to be something that I've been trying to find more info on for research purpose. Keep us the great and thanks a lot.

# re: CData Sections in BizTalk Orchestration

Left by Twin Cities Plastic Surgery at 1/28/2011 4:38 PM
Gravatar
Great information you've provided us with here. Thanks so much for sharing. Nice site too

Have a great one

# re: CData Sections in BizTalk Orchestration

Left by mothers day flowers delivery Ukr at 2/23/2011 11:05 PM
Gravatar
You are best i really like your post keep it up

# re: CData Sections in BizTalk Orchestration

Left by Iowa City Locksmith at 2/27/2011 4:17 PM
Gravatar
Great site you have here. I really enjoyed all of the insightful information you've provided us with and look forward to read more on this site in the future.

Great job

Your comment:



(not displayed)


 
 
 
 
 

Live Comment Preview:

 
«February»
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910