Connected Pawns

December 23, 2009

Mapping an XML data type from a SQL stored procedure to a BizTalk schema

Filed under: BizTalk — Tags: , , , , — mbrimble @ 4:55 am

If you use the the WCF adapter wizard to generate the schema from the stored procedure then the XML data type is now of string type in the result set schema. How do you convert the ‘XML string’ to XML?

This is what I did in several of my maps. Note the loop that I have highlighted. The result set is unbounded and the AnswerSet is an XML data type in the stored procedure is a string type in the generated SQL schema. The scripting functoid that populates the AnswerSet node on the other side is an Inline XSLT call template. The trick is to disable the output escaping in the XSLT.

<xsl:template name=”UTemplate”>  
<xsl:param name=”AnswerSetParam” /> 
<xsl:value-of disable-output-escaping=”yes” select=”$AnswerSetParam” /> 
</xsl:template>

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 51 other followers