Set Advanced Transport Properties dynamically

Sometimes when using dynamic ports, you also need properties from the advanced transport properties tab. These are the ones I have already used:

  • BizTalkMessage(BTS.RetryCount) = 5 (Specifies how often sending on the port is retried)
  • BizTalkMessage(BTS.RetryInterval) = 5 (Specifies how many minutes to wait before the next retry)
  • BizTalkMessage(FILE.CopyMode) = 0 (Specifies the behaviour when copying files: 0 = append, 1 = create, 2 = overwrite)
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

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
«October»
SunMonTueWedThuFriSat
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910