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

Posted: December 23, 2009  |  Categories: BizTalk Uncategorized

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” /> 


Back to Top