<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Connected Pawns</title>
	<atom:link href="http://connectedpawns.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://connectedpawns.wordpress.com</link>
	<description>Mainly BizTalk &#38; Little Chess</description>
	<lastBuildDate>Wed, 23 Dec 2009 06:19:56 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='connectedpawns.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/371ed8bfb2b797f66ec4b54a29bb57c0?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Connected Pawns</title>
		<link>http://connectedpawns.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://connectedpawns.wordpress.com/osd.xml" title="Connected Pawns" />
		<item>
		<title>Mapping an XML data type from a SQL stored procedure to a BizTalk schema</title>
		<link>http://connectedpawns.wordpress.com/2009/12/23/mapping-an-xml-data-type-from-a-sql-stored-procedure-to-a-biztalk-schema/</link>
		<comments>http://connectedpawns.wordpress.com/2009/12/23/mapping-an-xml-data-type-from-a-sql-stored-procedure-to-a-biztalk-schema/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 04:55:31 +0000</pubDate>
		<dc:creator>mbrimble</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[SQL adapter]]></category>
		<category><![CDATA[XSLT]]></category>
		<category><![CDATA[escaping]]></category>
		<category><![CDATA[XML data type]]></category>

		<guid isPermaLink="false">http://connectedpawns.wordpress.com/?p=337</guid>
		<description><![CDATA[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. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedpawns.wordpress.com&blog=4949199&post=337&subd=connectedpawns&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>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 ‘<em>XML string’</em> to XML?</p>
<p>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.</p>
<p>&lt;xsl:template name=&#8221;UTemplate&#8221;&gt;  <br />
&lt;xsl:param name=&#8221;AnswerSetParam&#8221; /&gt; <br />
&lt;xsl:value-of disable-output-escaping=&#8221;yes&#8221; select=&#8221;$AnswerSetParam&#8221; /&gt; <br />
&lt;/xsl:template&gt;</p>
<p><a href="http://connectedpawns.files.wordpress.com/2009/12/sqlmap.jpg"><img class="alignleft size-full wp-image-341" title="sqlmap" src="http://connectedpawns.files.wordpress.com/2009/12/sqlmap.jpg?w=815&#038;h=603" alt="" width="815" height="603" /></a><a href="http://connectedpawns.files.wordpress.com/2009/12/sqlmap.jpg"></a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/connectedpawns.wordpress.com/337/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/connectedpawns.wordpress.com/337/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/connectedpawns.wordpress.com/337/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/connectedpawns.wordpress.com/337/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/connectedpawns.wordpress.com/337/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/connectedpawns.wordpress.com/337/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/connectedpawns.wordpress.com/337/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/connectedpawns.wordpress.com/337/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/connectedpawns.wordpress.com/337/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/connectedpawns.wordpress.com/337/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedpawns.wordpress.com&blog=4949199&post=337&subd=connectedpawns&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://connectedpawns.wordpress.com/2009/12/23/mapping-an-xml-data-type-from-a-sql-stored-procedure-to-a-biztalk-schema/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e4f8b2c42221c62a00d5ec1174eaa6c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mbrimble</media:title>
		</media:content>

		<media:content url="http://connectedpawns.files.wordpress.com/2009/12/sqlmap.jpg" medium="image">
			<media:title type="html">sqlmap</media:title>
		</media:content>
	</item>
		<item>
		<title>Copying functoids from one map to another</title>
		<link>http://connectedpawns.wordpress.com/2009/10/10/copying-functoids-from-one-map-to-another/</link>
		<comments>http://connectedpawns.wordpress.com/2009/10/10/copying-functoids-from-one-map-to-another/#comments</comments>
		<pubDate>Sat, 10 Oct 2009 19:46:08 +0000</pubDate>
		<dc:creator>mbrimble</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[BizTalk functoids]]></category>
		<category><![CDATA[BizTalk map]]></category>

		<guid isPermaLink="false">http://connectedpawns.wordpress.com/?p=316</guid>
		<description><![CDATA[Have you ever wanted to copy a complex set of logic from one map to another? One of my young colleagues, Stephen Scott showed me a quick way to do this the other day. Here it is.
I had this map with many pages.

 
 
 
 
 
 
 
 
 
 
 
I wanted to change it to a map with two inputs instead of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedpawns.wordpress.com&blog=4949199&post=316&subd=connectedpawns&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Have you ever wanted to copy a complex set of logic from one map to another? One of my young colleagues, Stephen Scott showed me a quick way to do this the other day. Here it is.</p>
<p>I had this map with many pages.</p>
<p><img class="size-full wp-image-321 alignleft" title="MapfullofFunctoids" src="http://connectedpawns.files.wordpress.com/2009/10/mapfulloffunctoids1.jpg?w=448&#038;h=335" alt="MapfullofFunctoids" width="448" height="335" /></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>I wanted to change it to a map with two inputs instead of one.</p>
<p><img class="size-full wp-image-325 alignleft" title="MultiInputmap" src="http://connectedpawns.files.wordpress.com/2009/10/multiinputmap1.jpg?w=448&#038;h=329" alt="MultiInputmap" width="448" height="329" /></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>The trick is as follows;</p>
<ol>
<li>Open the first map in a text editor. You will see something like    </li>
<p>GenerateDefaultFixedNodes=&#8221;Yes&#8221; PreserveSequenceOrder=&#8221;No&#8221; CopyPIs=&#8221;No&#8221; method=&#8221;xml&#8221; xmlVersion=&#8221;1.0&#8243; IgnoreNamespacesForLinks=&#8221;Yes&#8221;&gt;<br />
  &lt;SrcTree&gt;<br />
    &lt;Reference Location=&#8221;SubmitContactDetailsRequest&#8221; /&gt;<br />
  &lt;/SrcTree&gt;<br />
  &lt;TrgTree&gt;<br />
    &lt;Reference Location=&#8221;InternalMaintainQuoteRequest&#8221; /&gt;<br />
  &lt;/TrgTree&gt;<br />
  &lt;ScriptTypePrecedence&gt;<br />
    &lt;CSharp Enabled=&#8221;Yes&#8221; /&gt;<br />
    &lt;ExternalAssembly Enabled=&#8221;Yes&#8221; /&gt;<br />
    &lt;VbNet Enabled=&#8221;Yes&#8221; /&gt;<br />
    &lt;JScript Enabled=&#8221;Yes&#8221; /&gt;<br />
    &lt;XsltCallTemplate Enabled=&#8221;Yes&#8221; /&gt;<br />
    &lt;Xslt Enabled=&#8221;Yes&#8221; /&gt;<br />
  &lt;/ScriptTypePrecedence&gt;<br />
  &lt;TreeValues&gt;<br />
    &lt;TestValues /&gt;<br />
    &lt;ConstantValues /&gt;<br />
  &lt;/TreeValues&gt;<br />
  &lt;Pages&gt;<br />
    &lt;Page Name=&#8221;Common&#8221;&gt;<br />
      &lt;Links&gt;<br />
        &lt;Link LinkID=&#8221;1&#8243; LinkFrom=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='SubmitContact']/*[local-name()='QuoteDetails']/*[local-name()='QuoteID']&#8221; LinkTo=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='MaintainQuoteRequest']/*[local-name()='QuoteDetails']/*[local-name()='SourceQuoteID']&#8221; Label=&#8221;" /&gt;<br />
        &lt;Link LinkID=&#8221;2&#8243; LinkFrom=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='SubmitContact']/*[local-name()='QuoteDetails']/*[local-name()='Source']&#8221; LinkTo=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='MaintainQuoteRequest']/*[local-name()='QuoteDetails']/*[local-name()='SourceSystem']&#8221; Label=&#8221;" /&gt;<br />
        &lt;Link LinkID=&#8221;3&#8243; LinkFrom=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='SubmitContact']/*[local-name()='QuoteDetails']/*[local-name()='ProductType']&#8221; LinkTo=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='MaintainQuoteRequest']/*[local-name()='QuoteDetails']/*[local-name()='Product']&#8221; Label=&#8221;" /&gt;<br />
        &lt;Link LinkID=&#8221;4&#8243; LinkFrom=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='SubmitContact']/*[local-name()='QuoteDetails']/*[local-name()='Progress']&#8221; LinkTo=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='MaintainQuoteRequest']/*[local-name()='QuoteDetails']/*[local-name()='QuoteProgress']&#8221; Label=&#8221;" /&gt;<br />
        &lt;Link LinkID=&#8221;5&#8243; LinkFrom=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='SubmitContact']/*[local-name()='QuoteDetails']/*[local-name()='Status']&#8221; LinkTo=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='MaintainQuoteRequest']/*[local-name()='QuoteDetails']/*[local-name()='QuoteStatus']&#8221; Label=&#8221;" /&gt;<br />
        &lt;Link LinkID=&#8221;6&#8243; LinkFrom=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='SubmitContact']/*[local-name()='QuoteDetails']/*[local-name()='PolicyStart']&#8221; LinkTo=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='MaintainQuoteRequest']/*[local-name()='QuoteDetails']/*[local-name()='StartDate']&#8221; Label=&#8221;" /&gt;<br />
        &lt;Link LinkID=&#8221;7&#8243; LinkFrom=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='SubmitContact']/*[local-name()='QuoteDetails']/*[local-name()='PolicyEnd']&#8221; LinkTo=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='MaintainQuoteRequest']/*[local-name()='QuoteDetails']/*[local-name()='EndDate']&#8221; Label=&#8221;" /&gt;<br />
        &lt;Link LinkID=&#8221;8&#8243; LinkFrom=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='SubmitContact']/*[local-name()='QuoteDetails']/*[local-name()='OriginatingURL']&#8221; LinkTo=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='MaintainQuoteRequest']/*[local-name()='QuoteDetails']/*[local-name()='OriginatingURL']&#8221; Label=&#8221;" /&gt;<br />
        &lt;Link LinkID=&#8221;9&#8243; LinkFrom=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='SubmitContact']/*[local-name()='QuoteDetails']/*[local-name()='Link']&#8221; LinkTo=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='MaintainQuoteRequest']/*[local-name()='QuoteDetails']/*[local-name()='QuoteLink']&#8221; Label=&#8221;" /&gt;<br />
        &lt;Link LinkID=&#8221;10&#8243; LinkFrom=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='SubmitContact']/*[local-name()='QuoteDetails']/*[local-name()='Channel']&#8221; LinkTo=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='MaintainQuoteRequest']/*[local-name()='QuoteDetails']/*[local-name()='SalesChannel']&#8221; Label=&#8221;" /&gt;<br />
        &lt;Link LinkID=&#8221;11&#8243; LinkFrom=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='SubmitContact']/*[local-name()='QuoteDetails']/*[local-name()='LastModifiedDate']&#8221; LinkTo=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='MaintainQuoteRequest']/*[local-name()='QuoteDetails']/*[local-name()='LastModifiedDate']&#8221; Label=&#8221;" /&gt;<br />
        &lt;Link LinkID=&#8221;12&#8243; LinkFrom=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='SubmitContact']/*[local-name()='UserDetails']/*[local-name()='UserName']&#8221; LinkTo=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='MaintainQuoteRequest']/*[local-name()='QuoteDetails']/*[local-name()='AccountName']&#8221; Label=&#8221;" /&gt;<br />
        &lt;Link LinkID=&#8221;13&#8243; LinkFrom=&#8221;1&#8243; LinkTo=&#8221;/*[local-name()='&amp;lt;Schema&amp;gt;']/*[local-name()='MaintainQuoteRequest']/*[local-name()='QuoteDetails']/*[local-name()='SourceID']&#8221; Label=&#8221;" /&gt;<br />
      &lt;/Links&gt;<br />
      &lt;Functoids&gt;<br />
        &lt;Functoid FunctoidID=&#8221;1&#8243; X-Cell=&#8221;56&#8243; Y-Cell=&#8221;213&#8243; Functoid-FID=&#8221;107&#8243; Functoid-Name=&#8221;String Concatenate&#8221; Label=&#8221;ToBAssigned&#8221;&gt;<br />
          &lt;Input-Parameters&gt;<br />
            &lt;Parameter Type=&#8221;Constant&#8221; Value=&#8221;ToBAssigned&#8221; Guid=&#8221;{AF7EB9D5-B802-4615-A366-DAF4CD18B182}&#8221; /&gt;<br />
          &lt;/Input-Parameters&gt;<br />
        &lt;/Functoid&gt;<br />
      &lt;/Functoids&gt;<br />
    &lt;/Page&gt;<br />
    &lt;Page Name=&#8221;ContactMeRequested&#8221;&gt;<br />
      &lt;Links&gt;</p>
<p>………..more</p>
<li>Copy every thing between the Pages tag to the clipboard.</li>
<li>Open the second map in a text editor. You will something like</li>
<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-16&#8243;?&gt;<br />
&lt;!&#8211; Generated using BizTalk Mapper on Sun, Oct 11 2009 07:54:38 AM &#8211;&gt;<br />
&lt;mapsource Name=&#8221;BizTalk Map&#8221; BizTalkServerMapperTool_Version=&#8221;2.0&#8243; Version=&#8221;2&#8243; XRange=&#8221;100&#8243; YRange=&#8221;420&#8243; OmitXmlDeclaration=&#8221;Yes&#8221; TreatElementsAsRecords=&#8221;No&#8221; OptimizeValueMapping=&#8221;No&#8221; GenerateDefaultFixedNodes=&#8221;Yes&#8221; PreserveSequenceOrder=&#8221;No&#8221; CopyPIs=&#8221;No&#8221; method=&#8221;xml&#8221; xmlVersion=&#8221;1.0&#8243; IgnoreNamespacesForLinks=&#8221;Yes&#8221;&gt;<br />
  &lt;SrcTree&gt;<br />
    &lt;xs:schema xmlns:tns=&#8221;<a href="http://schemas.microsoft.com/BizTalk/2003/aggschema&quot;">http://schemas.microsoft.com/BizTalk/2003/aggschema&#8221;</a> xmlns:b=&#8221;<a href="http://schemas.microsoft.com/BizTalk/2003&quot;">http://schemas.microsoft.com/BizTalk/2003&#8243;</a> xmlns:ns1=<a href="http://SubmitContactDetails">http://SubmitContactDetails</a> xmlns:ns2=<a href="http://SubmitContactDetailsResponse">http://SubmitContactDetailsResponse</a> targetNamespace=&#8221;<a href="http://schemas.microsoft.com/BizTalk/2003/aggschema&quot;">http://schemas.microsoft.com/BizTalk/2003/aggschema&#8221;</a> xmlns:xs=&#8221;<a href="http://www.w3.org/2001/XMLSchema&quot;">http://www.w3.org/2001/XMLSchema&#8221;</a>&gt;<br />
      &lt;xs:import schemaLocation=&#8221;SubmitContactDetailsRequest&#8221; namespace=<a href="http://SubmitContactDetails">http://SubmitContactDetails</a> /&gt;<br />
      &lt;xs:import schemaLocation=&#8221;SubmitContactDetailsResponse&#8221; namespace=<a href="http://SubmitContactDetailsResponse">http://SubmitContactDetailsResponse</a> /&gt;<br />
      &lt;xs:element name=&#8221;Root&#8221;&gt;<br />
        &lt;xs:complexType&gt;<br />
          &lt;xs:sequence&gt;<br />
            &lt;xs:element name=&#8221;InputMessagePart_0&#8243;&gt;<br />
              &lt;xs:complexType&gt;<br />
                &lt;xs:sequence&gt;<br />
                  &lt;xs:element ref=&#8221;ns1:SubmitContact&#8221; /&gt;<br />
                &lt;/xs:sequence&gt;<br />
              &lt;/xs:complexType&gt;<br />
            &lt;/xs:element&gt;<br />
            &lt;xs:element name=&#8221;InputMessagePart_1&#8243;&gt;<br />
              &lt;xs:complexType&gt;<br />
                &lt;xs:sequence&gt;<br />
                  &lt;xs:element ref=&#8221;ns2:SubmitContactResponse&#8221; /&gt;<br />
                &lt;/xs:sequence&gt;<br />
              &lt;/xs:complexType&gt;<br />
            &lt;/xs:element&gt;<br />
          &lt;/xs:sequence&gt;<br />
        &lt;/xs:complexType&gt;<br />
      &lt;/xs:element&gt;<br />
    &lt;/xs:schema&gt;<br />
  &lt;/SrcTree&gt;<br />
  &lt;TrgTree&gt;<br />
    &lt;Reference Location=&#8221;Tower.CRM.InternalMaintainQuoteRequest&#8221; /&gt;<br />
  &lt;/TrgTree&gt;<br />
  &lt;ScriptTypePrecedence&gt;<br />
    &lt;CSharp Enabled=&#8221;Yes&#8221; /&gt;<br />
    &lt;ExternalAssembly Enabled=&#8221;Yes&#8221; /&gt;<br />
    &lt;VbNet Enabled=&#8221;Yes&#8221; /&gt;<br />
    &lt;JScript Enabled=&#8221;Yes&#8221; /&gt;<br />
    &lt;XsltCallTemplate Enabled=&#8221;Yes&#8221; /&gt;<br />
    &lt;Xslt Enabled=&#8221;Yes&#8221; /&gt;<br />
  &lt;/ScriptTypePrecedence&gt;<br />
  &lt;TreeValues&gt;<br />
    &lt;TestValues /&gt;<br />
    &lt;ConstantValues /&gt;<br />
  &lt;/TreeValues&gt;<br />
  &lt;Pages&gt;<br />
    &lt;Page Name=&#8221;Page 1&#8243;&gt;<br />
      &lt;Links /&gt;<br />
      &lt;Functoids /&gt;<br />
    &lt;/Page&gt;<br />
  &lt;/Pages&gt;<br />
&lt;/mapsource&gt;</p>
<li>Now paste the contents of the clipboard between the two pages tags.</li>
<li>Do a search and replace of [local-name()='SubmitContact'] with [local-name()='Root']/*[local-name()='InputMessagePart_0']/*[local-name()='SubmitContact']</li>
<li>Save the file.</li>
<li>Now open the change in your Biztalk project and you will see your all the functoids and other artifactd have  been copied to the new map.</li>
</ol>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/connectedpawns.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/connectedpawns.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/connectedpawns.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/connectedpawns.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/connectedpawns.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/connectedpawns.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/connectedpawns.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/connectedpawns.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/connectedpawns.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/connectedpawns.wordpress.com/316/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedpawns.wordpress.com&blog=4949199&post=316&subd=connectedpawns&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://connectedpawns.wordpress.com/2009/10/10/copying-functoids-from-one-map-to-another/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e4f8b2c42221c62a00d5ec1174eaa6c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mbrimble</media:title>
		</media:content>

		<media:content url="http://connectedpawns.files.wordpress.com/2009/10/mapfulloffunctoids1.jpg" medium="image">
			<media:title type="html">MapfullofFunctoids</media:title>
		</media:content>

		<media:content url="http://connectedpawns.files.wordpress.com/2009/10/multiinputmap1.jpg" medium="image">
			<media:title type="html">MultiInputmap</media:title>
		</media:content>
	</item>
		<item>
		<title>Catching a WCF fault in a BizTalk orchestration</title>
		<link>http://connectedpawns.wordpress.com/2009/09/17/catching-a-wcf-fault-in-a-biztalk-orchestration/</link>
		<comments>http://connectedpawns.wordpress.com/2009/09/17/catching-a-wcf-fault-in-a-biztalk-orchestration/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 08:59:50 +0000</pubDate>
		<dc:creator>mbrimble</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[WCF fault]]></category>

		<guid isPermaLink="false">http://connectedpawns.wordpress.com/?p=294</guid>
		<description><![CDATA[I wanted to catch a WCF fault. A quick search gave many hits about catching un-typed WCF faults for example http://geekswithblogs.net/paulp/archive/2008/06/23/123096.aspx and http://blogs.msdn.com/paolos/archive/2009/05/22/how-to-throw-typed-fault-exceptions-from-orchestrations-published-as-wcf-services.aspx. There is also an SDK example referenced in the blog by Paul Petrov. This blog describes how to catch a standard fault instead of an un-typed fault because I did not find [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedpawns.wordpress.com&blog=4949199&post=294&subd=connectedpawns&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I wanted to catch a WCF fault. A quick search gave many hits about catching un-typed WCF faults for example <a href="http://geekswithblogs.net/paulp/archive/2008/06/23/123096.aspx" target="_blank">http://geekswithblogs.net/paulp/archive/2008/06/23/123096.aspx</a> and <a title="http://blogs.msdn.com/paolos/archive/2009/05/22/how-to-throw-typed-fault-exceptions-from-orchestrations-published-as-wcf-services.aspx" href="http://blogs.msdn.com/paolos/archive/2009/05/22/how-to-throw-typed-fault-exceptions-from-orchestrations-published-as-wcf-services.aspx">http://blogs.msdn.com/paolos/archive/2009/05/22/how-to-throw-typed-fault-exceptions-from-orchestrations-published-as-wcf-services.aspx</a>. There is also an <a href="http://go.microsoft.com/fwlink/?LinkId=99650" target="_blank">SDK example</a> referenced in the blog by Paul Petrov. This blog describes how to catch a standard fault instead of an un-typed fault because I did not find any examples of this simpler case. I have recorded this here because it was not obvious to me from the examples above how to do it.</p>
<p>The web service that i was working with did not return a custom fault just a standard fault. I decided to follow the same general pattern given in the articles above but  instead of creating my own custom exception schema I referenced   <a title="http://schemas.xmlsoap.org/soap/envelope/" href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a> from the BTS system schemas (BTS.soap_envelope_1__1.Fault). Thus there is one less step than the Petrov’s pattern i.e.</p>
<ol>
<li>Create a  new multi-part message type CalculatePremium_WCFFault that has part of type BTS.soap_envelope_1__1.Fault.</li>
<li>Add to my CalculatePremiumPortType operation a new GenericWCFFault fault of type BTS.soap_envelope_1__1.Fault.</li>
<li>Add an exception handler CatchGenericWCFFault for this new fault</li>
</ol>
<p><img class="aligncenter size-full wp-image-303" title="wcffaultorch" src="http://connectedpawns.files.wordpress.com/2009/09/wcffaultorch.jpg?w=1024&#038;h=617" alt="wcffaultorch" width="1024" height="617" /></p>
<p>Now I tried following the SDK example and modified  the Inbound BizTalk message body area on the send port to my web service, doing the following:<br />
        a.    Select Path&#8211;content located by body path option.<br />
        b.    In the Body path expression field, enter /*[local-name()='Fault']/*[local-name()='Detail']/* | /*[local-name()='PremiumResponse'].<br />
        c.    From the Node encoding drop-down list, select Xml.<br />
I also made sure that the Propagate fault message option is selected in the Error handling area. This did not work and I got an error probably because I did not get the body path expression correct.</p>
<p> To my surprise when I switched back and selected the default Body  under body path option the WCF fault was caught and processed correctly. Now all is clear. I don’t have to use an XPath expression on the send port configuration because the general SOAP fault schema is known to the receive pipeline. The fault was copied in the Copy Errors and Exceptions shape using the following code</p>
<p>//Assign variables for WCF Fault where wcfFault is the exception of type PremiumCalcWebServiceLink[MyNameSpace.CalculatePremiumPortType].Operation_1.GenericWCFFault</p>
<p>wcfFaultStringXDoc = wcfFault.faultString;<br />
sErrorMsg = wcfFaultStringXDoc.OuterXml;</p>
<p>In summary I can now catch all unhandled exceptions from my external web service.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/connectedpawns.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/connectedpawns.wordpress.com/294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/connectedpawns.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/connectedpawns.wordpress.com/294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/connectedpawns.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/connectedpawns.wordpress.com/294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/connectedpawns.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/connectedpawns.wordpress.com/294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/connectedpawns.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/connectedpawns.wordpress.com/294/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedpawns.wordpress.com&blog=4949199&post=294&subd=connectedpawns&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://connectedpawns.wordpress.com/2009/09/17/catching-a-wcf-fault-in-a-biztalk-orchestration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e4f8b2c42221c62a00d5ec1174eaa6c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mbrimble</media:title>
		</media:content>

		<media:content url="http://connectedpawns.files.wordpress.com/2009/09/wcffaultorch.jpg" medium="image">
			<media:title type="html">wcffaultorch</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8220;Failed to update MessageBox server while creating BizTalk Host&#8221;</title>
		<link>http://connectedpawns.wordpress.com/2009/08/09/failed-to-update-messagebox-server-while-creating-biztalk-host/</link>
		<comments>http://connectedpawns.wordpress.com/2009/08/09/failed-to-update-messagebox-server-while-creating-biztalk-host/#comments</comments>
		<pubDate>Sun, 09 Aug 2009 05:10:40 +0000</pubDate>
		<dc:creator>mbrimble</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[BizTalk Hosts]]></category>

		<guid isPermaLink="false">http://connectedpawns.wordpress.com/?p=272</guid>
		<description><![CDATA[ I was trying to add a new host to a new BizTalk server and got this error first;
“failed to create SQL login and grant SQL privilege configurations on the Management database server “SQL07DEV” / database name “BizTalkMgmtDb” while creating BizTalkHost “test”
with the following additional information:
“This operation requires granting or revoking of SQL database level user [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedpawns.wordpress.com&blog=4949199&post=272&subd=connectedpawns&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p> I was trying to add a new host to a new BizTalk server and got this error first;</p>
<p><em>“failed to create SQL login and grant SQL privilege configurations on the Management database server “SQL07DEV” / database name “BizTalkMgmtDb” while creating BizTalkHost “test”</em></p>
<p>with the following additional information:</p>
<p><em>“This operation requires granting or revoking of SQL database level user access. Ensure that you have sufficient SQL permission to perform this operation. You must either be: 1) a member of the ‘sysadmin’ SQL fixed server role; or a member of the ‘db_owner’ or db_ddladmin’ SQL fixed database role. Contact your SQL database administrators for further assistance”</em></p>
<p>So I contacted our DBA. I was in the BizTalk Administrators group and in the SSOAdministrators group on that SQL server. He granted the BizTalkAdminstrators group db_ddladmin on the database above.</p>
<p>I tried to create a host and got a different error. This time I needed db_accessadmin to the same database. This role was granted and then I got the similar error but on the BizTalkDTAdb database.</p>
<p>After granting these roles on all the BizTalk database I got the error in the title namely;</p>
<p><em>“Failed to update MessageBox server will creating BizTalk Host. Couldn’t create SQL login or update SQL roles for BizTalk Host Windows group “HOME\BizTalk Host User Group” to access the MessageBox server “SQL07DEV\BizTalkMsgBoxDb”. The role BTS_test_USERS’ does not exist in the current database. Cannot find the user ‘BTS_test_USERS’, because it does not exist or you do not have permission….”</em></p>
<p>What now? This time there are no instructions on what to do. After looking up <a title="http://msdn.microsoft.com/en-us/library/aa559845(BTS.10).aspx" href="http://msdn.microsoft.com/en-us/library/aa559845(BTS.10).aspx">http://msdn.microsoft.com/en-us/library/aa559845(BTS.10).aspx</a> I discovered we had done all the right things namely;</p>
<li style="padding-left:30px;">User rights granted to BizTalk Server Administrators</li>
<li style="padding-left:30px;">securityadmin SQL Server role on all SQL Servers</li>
<li style="padding-left:30px;">db_securityadmin and db_accessadmin SQL Server Database roles in the BizTalk Tracking, Rule Engine, BizTalk Management, BAM Primary Import and BizTalk MessageBox databases</li>
<li style="padding-left:30px;">db_ddladmin SQL Server Database role on all BizTalk MessageBox databases</li>
<li style="padding-left:30px;">SSO Affiliate administrators</li>
<p>I have reached this stage many times with other DBA’s and at this stage they have tossed in the towel and granted my login ‘sysadmin’ rights while I created the BizTalk hosts. This DBA was different he started to dig deeper.</p>
<p>He discovered that i could not create a new role because the role cannot be owned by the group that was in. <strong>He solved the problem by adding my login a  user of the SQL server.</strong> Now when i try to create a host there a no errors and the host is created. If you now look at the roles you find that they are owned by my login. The owner was then changed to a more suitable SQL user.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/connectedpawns.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/connectedpawns.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/connectedpawns.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/connectedpawns.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/connectedpawns.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/connectedpawns.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/connectedpawns.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/connectedpawns.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/connectedpawns.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/connectedpawns.wordpress.com/272/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedpawns.wordpress.com&blog=4949199&post=272&subd=connectedpawns&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://connectedpawns.wordpress.com/2009/08/09/failed-to-update-messagebox-server-while-creating-biztalk-host/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e4f8b2c42221c62a00d5ec1174eaa6c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mbrimble</media:title>
		</media:content>
	</item>
		<item>
		<title>How to copy the entire node to element of string type in a map</title>
		<link>http://connectedpawns.wordpress.com/2009/08/01/how-to-copy-the-entire-node-to-element-of-string-type-in-a-map/</link>
		<comments>http://connectedpawns.wordpress.com/2009/08/01/how-to-copy-the-entire-node-to-element-of-string-type-in-a-map/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 21:54:54 +0000</pubDate>
		<dc:creator>mbrimble</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[BizTalk map]]></category>
		<category><![CDATA[Copy node]]></category>
		<category><![CDATA[XML document]]></category>

		<guid isPermaLink="false">http://connectedpawns.wordpress.com/?p=259</guid>
		<description><![CDATA[ 
I wanted to copy the entire Contact node in the map below to the ContactDetails element of type string.

I could have done this in an orchestration by assigning the node to an XmlDocument variable and then assigning the XmlDocument.InnerText to a distinguished field in the outbound message but I wanted to do this in map  [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedpawns.wordpress.com&blog=4949199&post=259&subd=connectedpawns&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p> </p>
<p>I wanted to copy the entire Contact node in the map below to the ContactDetails element of type string.</p>
<p><img class="aligncenter size-full wp-image-264" title="XML2Text" src="http://connectedpawns.files.wordpress.com/2009/08/xml2text.jpg?w=448&#038;h=133" alt="XML2Text" width="448" height="133" /></p>
<p><em>I could have done this in an orchestration by assigning the node to an XmlDocument variable and then as</em><em>signing the XmlDocument.InnerText to a distinguished field in the outbound message but I wanted to do this in map  because I plan to put the map on the outbound port and not in an orchestration.</em></p>
<p>My  first try almost worked. I used a scripting functoid with this Inline XSLT.</p>
<p>&lt;!&#8211;MassCopy alternative that does not copy the namespace.&#8211;&gt;</p>
<p>&lt;ns1:ContactDetails</p>
<p>&lt;xsl:copy-of select=&#8221;*[local-name()='Contact']&#8220;/&gt;</p>
<p>&lt;/ns1:ContactDetails&gt;</p>
<p>This almost works but I get this error on validation;</p>
<p align="left">The element &#8216;http://schemas.microsoft.com/Sql/2008/05/TypedProcedures/dbo:ContactDetails&#8217; cannot contain child element &#8216;http://Blah.ContactDetails:Contact&#8217; because the parent element&#8217;s content model is text only.</p>
<p>The problem here is that it&#8217;s copying the node structure to the outbound message and not mapping the node structure to a string.</p>
<p>So i have tried two solutions from posts by Greg Forsyth namely <a href="http://www.biztalkgurus.com/forums/t/12350.aspx">http://www.biztalkgurus.com/forums/t/12350.aspx</a> and <a href="http://connectedpawns.wordpress.com/2008/10/08/call-a-net-assembly-from-custom-xslt/">http://connectedpawns.wordpress.com/2008/10/08/call-a-net-assembly-from-custom-xslt/</a> ( I had to use my blog because the original link seems to be broken). I have decided to record how I did it because Greg’s instructions are very brief and it took me a while to work out what to do.</p>
<p>The first step is to create a helper class and deploy it to the GAC .</p>
<p>using System;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
using System.Xml;<br />
using System.Xml.XPath;</p>
<p>namespace CopyXML2TextNodeBTSDemo.Utility<br />
{<br />
    public class Utilities<br />
    {<br />
        public static string ConvertNodeToXmlString(XPathNodeIterator node)</p>
<p>        { return node.Current.OuterXml; }</p>
<p>    }<br />
}</p>
<p>Secondly reference this assembly in the BizTalk map project.</p>
<p>Add a scripting functoid to the map , choose external assembly as the scripting type with the values shown below and connect it to the a field in the outbound schema.</p>
<p><img class="aligncenter size-full wp-image-266" title="scriptingfunctoid" src="http://connectedpawns.files.wordpress.com/2009/08/scriptingfunctoid.jpg?w=377&#038;h=336" alt="scriptingfunctoid" width="377" height="336" /></p>
<p>Validate the map to generate a xsl file and a Custom extension XML file. The output is shown below</p>
<p> </p>
<p align="left">Invoking component.….CopyXML2TextNodeBTSDemo.Maps\SubmitContactDetails2XMLdatafieldasTEXT.btm: The compilation is using the CustomXslt and CustomExtensionXml tags to generate the output.  The map content is ignored.<br />
….CopyXML2TextNodeBTSDemo.Maps\SubmitContactDetails2XMLdatafieldasTEXT.btm: The output XSLT is stored in the following file: &lt;file:///C:\..\_MapData\SubmitContactDetails2XMLdatafieldasTEXT.xsl&gt; <br />
  ….\SubmitContactDetails2XMLdatafieldasTEXT.btm: The Extension Object XML is stored in the following file: &lt;file:///C:\..\_MapData\SubmitContactDetails2XMLdatafieldasTEXT_extxml.xml&gt;<br />
Component invocation succeeded.</p>
<p>Save both files and add them to the BizTalk map project.</p>
<p>Change the map to use a the generated xsl file as the custom XSLT and the Extension Object XML file as shown below.</p>
<p><img class="aligncenter size-full wp-image-268" title="customXSLT" src="http://connectedpawns.files.wordpress.com/2009/08/customxslt.jpg?w=448&#038;h=227" alt="customXSLT" width="448" height="227" /></p>
<p>Edit xsl file like so;</p>
<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-16&#8243;?&gt;<br />
&lt;xsl:stylesheet xmlns:xsl=&#8221;<a href="http://www.w3.org/1999/XSL/Transform&quot;">http://www.w3.org/1999/XSL/Transform&#8221;</a> xmlns:msxsl=&#8221;urn:schemas-microsoft-com:xslt&#8221; xmlns:var=&#8221;<a href="http://schemas.microsoft.com/BizTalk/2003/var&quot;">http://schemas.microsoft.com/BizTalk/2003/var&#8221;</a> exclude-result-prefixes=&#8221;msxsl var s0 ScriptNS0&#8243; version=&#8221;1.0&#8243; xmlns:ns0=&#8221;<a href="http://CopyXML2TextNodeBTSDemo.XMLdatafieldasTEXT&quot;">http://CopyXML2TextNodeBTSDemo.XMLdatafieldasTEXT&#8221;</a> xmlns:s0=&#8221;<a href="http://CopyXML2TextNodeBTSDemo.SubmitContactDetails&quot;">http://CopyXML2TextNodeBTSDemo.SubmitContactDetails&#8221;</a> xmlns:ScriptNS0=&#8221;<a href="http://schemas.microsoft.com/BizTalk/2003/ScriptNS0&quot;">http://schemas.microsoft.com/BizTalk/2003/ScriptNS0&#8243;</a>&gt;<br />
    &lt;xsl:output omit-xml-declaration=&#8221;yes&#8221; method=&#8221;xml&#8221; version=&#8221;1.0&#8243; /&gt;<br />
    &lt;xsl:template match=&#8221;/&#8221;&gt;<br />
        &lt;xsl:apply-templates select=&#8221;/s0:SubmitContactDetails&#8221; /&gt;<br />
    &lt;/xsl:template&gt;<br />
    &lt;xsl:template match=&#8221;/s0:SubmitContactDetails&#8221;&gt;<br />
        &lt;ns0:ContainsXMLfieldasText&gt;<br />
            &lt;ContactId&gt;<br />
                &lt;xsl:value-of select=&#8221;ContactId/text()&#8221; /&gt;<br />
            &lt;/ContactId&gt;<br />
            &lt;xsl:apply-templates  select=&#8221;Contact&#8221;/&gt;<br />
        &lt;/ns0:ContainsXMLfieldasText&gt;<br />
    &lt;/xsl:template&gt;<br />
    &lt;xsl:template  match=&#8221;Contact&#8221;&gt;<br />
        &lt;xsl:variable name=&#8221;var:v1&#8243; select=&#8221;ScriptNS0:ConvertNodeToXmlString(.)&#8221; /&gt;<br />
        &lt;ContactDetails&gt;<br />
            &lt;xsl:value-of select=&#8221;$var:v1&#8243; /&gt;<br />
        &lt;/ContactDetails&gt;<br />
    &lt;/xsl:template&gt;<br />
&lt;/xsl:stylesheet&gt;</p>
<p>Now if you test the map you get the desired output. Whew!!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/connectedpawns.wordpress.com/259/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/connectedpawns.wordpress.com/259/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/connectedpawns.wordpress.com/259/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/connectedpawns.wordpress.com/259/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/connectedpawns.wordpress.com/259/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/connectedpawns.wordpress.com/259/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/connectedpawns.wordpress.com/259/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/connectedpawns.wordpress.com/259/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/connectedpawns.wordpress.com/259/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/connectedpawns.wordpress.com/259/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedpawns.wordpress.com&blog=4949199&post=259&subd=connectedpawns&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://connectedpawns.wordpress.com/2009/08/01/how-to-copy-the-entire-node-to-element-of-string-type-in-a-map/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e4f8b2c42221c62a00d5ec1174eaa6c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mbrimble</media:title>
		</media:content>

		<media:content url="http://connectedpawns.files.wordpress.com/2009/08/xml2text.jpg" medium="image">
			<media:title type="html">XML2Text</media:title>
		</media:content>

		<media:content url="http://connectedpawns.files.wordpress.com/2009/08/scriptingfunctoid.jpg" medium="image">
			<media:title type="html">scriptingfunctoid</media:title>
		</media:content>

		<media:content url="http://connectedpawns.files.wordpress.com/2009/08/customxslt.jpg" medium="image">
			<media:title type="html">customXSLT</media:title>
		</media:content>
	</item>
		<item>
		<title>Using LoadGen to test Wcf-NetTCP binding</title>
		<link>http://connectedpawns.wordpress.com/2009/07/31/using-loadgen-to-test-wcf-nettcp-binding/</link>
		<comments>http://connectedpawns.wordpress.com/2009/07/31/using-loadgen-to-test-wcf-nettcp-binding/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 08:02:57 +0000</pubDate>
		<dc:creator>mbrimble</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[LoadGen]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://connectedpawns.wordpress.com/2009/07/31/using-loadgen-to-test-wcf-nettcp-binding/</guid>
		<description><![CDATA[&#160;
I have just returned from holiday and have had to do a lot of performance monitoring on WCF adapters. It took me a while to work out the settings in the LoadGenConsole.exe to test a WCF-NetTCP binding so i thought I would reproduce it here. ( See http://connectedthoughts.wordpress.com/2007/11/05/loadgen-2007-and-a-simple-biztalk-wcf-test/ for good guide on how to use [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedpawns.wordpress.com&blog=4949199&post=258&subd=connectedpawns&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>&#160;</p>
<p>I have just returned from holiday and have had to do a lot of performance monitoring on WCF adapters. It took me a while to work out the settings in the LoadGenConsole.exe to test a WCF-NetTCP binding so i thought I would reproduce it here. ( See <a href="http://connectedthoughts.wordpress.com/2007/11/05/loadgen-2007-and-a-simple-biztalk-wcf-test/" target="_blank">http://connectedthoughts.wordpress.com/2007/11/05/loadgen-2007-and-a-simple-biztalk-wcf-test/</a> for good guide on how to use LoadGen to&#160; test WCF adapters ).</p>
<p>&lt;?xml version=&quot;1.0&quot; ?&gt;   <br />&lt;configuration&gt;    <br />&#160; &lt;system.serviceModel&gt; </p>
<p>&#160;&#160;&#160; &lt;client&gt; </p>
<p>&#160;&#160;&#160;&#160;&#160; &lt;endpoint name=&quot;WcfgetPremiumEndPoint&quot; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; address=&quot;<a href="http://localhost/BizTalkWcfgetPremiumService/WcfgetPremiumService.svc&quot;">http://localhost/BizTalkWcfgetPremiumService/WcfgetPremiumService.svc&quot;</a></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; binding=&quot;basicHttpBinding&quot; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; bindingConfiguration=&quot;WcfgetPremiumEndBinding&quot; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; contract=&quot;WcfTransport.IChannelAsyncNonTransactional&quot;/&gt;   <br />&#160;&#160;&#160;&#160;&#160; &lt;endpoint name=&quot;WcfnetTCPgetPremiumEndPoint&quot; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; address=&quot;net.tcp://localhost/WCFgetPremium.NetTCP&quot; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; binding=&quot;netTcpBinding&quot; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; bindingConfiguration=&quot;WcfnetTCPgetPremiumEndBinding&quot; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; contract=&quot;WcfTransport.IChannelAsyncNonTransactional&quot;/&gt; </p>
<p>&#160;&#160;&#160; &lt;/client&gt; </p>
<p>&#160;&#160;&#160; &lt;bindings&gt; </p>
<p>&#160;&#160;&#160;&#160;&#160; &lt;basicHttpBinding&gt; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;binding name=&quot;WcfgetPremiumEndBinding&quot; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; openTimeout=&quot;23:59:59&quot; receiveTimeout=&quot;23:59:59&quot; closeTimeout=&quot;23:59:59&quot; sendTimeout=&quot;23:59:59&quot;&gt; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;security mode=&quot;None&quot;&gt; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/security&gt; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/binding&gt; </p>
<p>&#160;&#160;&#160;&#160;&#160; &lt;/basicHttpBinding&gt; </p>
<p>&#160;&#160;&#160;&#160;&#160; &lt;netTcpBinding&gt; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;binding name=&quot;WcfnetTCPgetPremiumEndBinding&quot; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; openTimeout=&quot;23:59:59&quot; receiveTimeout=&quot;23:59:59&quot; closeTimeout=&quot;23:59:59&quot; sendTimeout=&quot;23:59:59&quot;&gt; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;security mode=&quot;Transport&quot;&gt; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/security&gt; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/binding&gt; </p>
<p>&#160;&#160;&#160;&#160;&#160; &lt;/netTcpBinding&gt; </p>
<p>&#160;&#160;&#160; &lt;/bindings&gt; </p>
<p>&#160; &lt;/system.serviceModel&gt;   <br />&#160;&#160;&#160; &lt;system.net&gt;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;defaultProxy&gt;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;proxy autoDetect=&quot;false&quot;/&gt;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/defaultProxy&gt; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;connectionManagement&gt;   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;add address = &quot;*&quot; maxconnection = &quot;400&quot; /&gt;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/connectionManagement&gt;    <br />&#160;&#160;&#160; &lt;/system.net&gt; </p>
<p>&#160;&#160;&#160; &lt;!&#8211;&lt;system.diagnostics&gt;   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;trace autoflush=&quot;true&quot; indentsize=&quot;4&quot;&gt;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;listeners&gt;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;add name=&quot;LogConsoleListener&quot; type=&quot;System.Diagnostics.ConsoleTraceListener&quot;/&gt;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/listeners&gt;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/trace&gt;    <br />&#160;&#160;&#160; &lt;/system.diagnostics&gt;&#8211;&gt; </p>
<p>&lt;/configuration&gt;</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/connectedpawns.wordpress.com/258/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/connectedpawns.wordpress.com/258/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/connectedpawns.wordpress.com/258/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/connectedpawns.wordpress.com/258/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/connectedpawns.wordpress.com/258/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/connectedpawns.wordpress.com/258/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/connectedpawns.wordpress.com/258/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/connectedpawns.wordpress.com/258/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/connectedpawns.wordpress.com/258/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/connectedpawns.wordpress.com/258/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedpawns.wordpress.com&blog=4949199&post=258&subd=connectedpawns&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://connectedpawns.wordpress.com/2009/07/31/using-loadgen-to-test-wcf-nettcp-binding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e4f8b2c42221c62a00d5ec1174eaa6c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mbrimble</media:title>
		</media:content>
	</item>
		<item>
		<title>Performance of the WCF-Basic HTTP Adapter</title>
		<link>http://connectedpawns.wordpress.com/2009/06/23/performance-of-the-wcf-basic-http-adapter/</link>
		<comments>http://connectedpawns.wordpress.com/2009/06/23/performance-of-the-wcf-basic-http-adapter/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 08:27:34 +0000</pubDate>
		<dc:creator>mbrimble</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://connectedpawns.wordpress.com/?p=246</guid>
		<description><![CDATA[Zeeshan recently wrote about performance problems using the SOAP adapter( http://zeetalks.wordpress.com/2009/04/29/biztalk-performance-problems-using-the-soap-adapter/ ). In that article one of the solutions he suggested to the problem was to use one of the WCF adapters. Here I describe performance measure measurements using the WCF-Basic HTTP adapter.
I used Thiago’s Load Gen 2007 test to measure request-response message latency that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedpawns.wordpress.com&blog=4949199&post=246&subd=connectedpawns&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Zeeshan recently wrote about performance problems using the SOAP adapter( <a href="http://zeetalks.wordpress.com/2009/04/29/biztalk-performance-problems-using-the-soap-adapter/" target="_blank">http://zeetalks.wordpress.com/2009/04/29/biztalk-performance-problems-using-the-soap-adapter/</a> ). In that article one of the solutions he suggested to the problem was to use one of the WCF adapters. Here I describe performance measure measurements using the WCF-Basic HTTP adapter.</p>
<p>I used Thiago’s Load Gen 2007 test to measure request-response message latency that he has described previously ( <a title="http://connectedthoughts.wordpress.com/2007/11/05/loadgen-2007-and-a-simple-biztalk-wcf-test/" href="http://connectedthoughts.wordpress.com/2007/11/05/loadgen-2007-and-a-simple-biztalk-wcf-test/">http://connectedthoughts.wordpress.com/2007/11/05/loadgen-2007-and-a-simple-biztalk-wcf-test/</a>). It is easy to measure the request-response latency if you use a dedicated isolated host for your receive adapter.</p>
<p><img class="aligncenter size-full wp-image-253" title="New Picture" src="http://connectedpawns.files.wordpress.com/2009/06/new-picture.jpg?w=448&#038;h=318" alt="New Picture" width="448" height="318" /></p>
<p>The first orchestration test contained a WCF-Basic HTTP receive adapter exposed by BizTalk as shown below. The average message latency was about 0.8-1.0 seconds.</p>
<p><img class="aligncenter size-full wp-image-250" title="1stest" src="http://connectedpawns.files.wordpress.com/2009/06/1stest.jpg?w=448&#038;h=233" alt="1stest" width="448" height="233" /></p>
<p>The second orchestration test contained the same WCF-Basic HTTP receive adapter exposed by BizTalk  but also sent the message on after some mapping to an external WCF web service as shown below. The average message latency was now about 10-11 seconds.</p>
<p><img class="aligncenter size-full wp-image-252" title="2ndTest" src="http://connectedpawns.files.wordpress.com/2009/06/2ndtest.jpg?w=448&#038;h=224" alt="2ndTest" width="448" height="224" /></p>
<p>In order to identify where the bottleneck was the external web service was replace by a simple web service returning just a stubbed out response. In this case the average message latency dropped to about 1.6-1.8 seconds. This is about what I would have expected form the addition of some extra persistence points in the orchestration.</p>
<p>Finally the after the external web service had been tuned a message latency of about 2-2.2 seconds was achieved.</p>
<p style="text-align:left;">This example suggests that lower message latency can be achieved between BizTalk and web services if the WCF adapters are used instead of the traditional SOAP adapters. We expect that we can achieve even lower message latency if we tune BizTalk for low latency as suggested by Thiago in comments to Zeeshan’s article.</p>
<table style="text-align:left;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="text-align:left;" width="123" valign="top">Receive port</td>
<td width="123" valign="top">Send Port</td>
<td width="123" valign="top">Loadgen testmessages/sec</td>
<td width="123" valign="top">Average Request- Response Latency (seconds)</td>
</tr>
<tr>
<td width="123" valign="top">WCF-Basic HTTP Request-Response</td>
<td width="123" valign="top">File Adapter</td>
<td width="123" valign="top">10</td>
<td width="123" valign="top">0.8-1.0</td>
</tr>
<tr>
<td width="123" valign="top">WCF-Basic HTTP Request-Response</td>
<td width="123" valign="top">File Adapter with outbound maps</td>
<td width="123" valign="top">10</td>
<td width="123" valign="top">0.8-1.0</td>
</tr>
<tr>
<td width="123" valign="top">WCF-Basic HTTP Request-Response</td>
<td width="123" valign="top">WCF-Basic HTTP Request-Response with outbound and inbound maps to external web service</td>
<td width="123" valign="top">10</td>
<td width="123" valign="top">10-11</td>
</tr>
<tr>
<td width="123" valign="top">WCF-Basic HTTP Request-Response</td>
<td width="123" valign="top">WCF-Basic HTTP Request-Response with outbound and inbound maps to external web service returning a stubbed out response</td>
<td width="123" valign="top">10</td>
<td width="123" valign="top">1.6-1.8</td>
</tr>
<tr>
<td width="123" valign="top">MOSS WCF-Basic HTTP Request-Response</td>
<td width="123" valign="top">WCF-Basic HTTP Request-Response with outbound and inbound maps to tuned external web service</td>
<td width="123" valign="top">10</td>
<td width="123" valign="top">2.0-2.2</td>
</tr>
</tbody>
</table>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/connectedpawns.wordpress.com/246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/connectedpawns.wordpress.com/246/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/connectedpawns.wordpress.com/246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/connectedpawns.wordpress.com/246/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/connectedpawns.wordpress.com/246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/connectedpawns.wordpress.com/246/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/connectedpawns.wordpress.com/246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/connectedpawns.wordpress.com/246/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/connectedpawns.wordpress.com/246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/connectedpawns.wordpress.com/246/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedpawns.wordpress.com&blog=4949199&post=246&subd=connectedpawns&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://connectedpawns.wordpress.com/2009/06/23/performance-of-the-wcf-basic-http-adapter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e4f8b2c42221c62a00d5ec1174eaa6c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mbrimble</media:title>
		</media:content>

		<media:content url="http://connectedpawns.files.wordpress.com/2009/06/new-picture.jpg" medium="image">
			<media:title type="html">New Picture</media:title>
		</media:content>

		<media:content url="http://connectedpawns.files.wordpress.com/2009/06/1stest.jpg" medium="image">
			<media:title type="html">1stest</media:title>
		</media:content>

		<media:content url="http://connectedpawns.files.wordpress.com/2009/06/2ndtest.jpg" medium="image">
			<media:title type="html">2ndTest</media:title>
		</media:content>
	</item>
		<item>
		<title>The SQL Adapter and Apostrophes</title>
		<link>http://connectedpawns.wordpress.com/2009/05/05/the-sql-adapter-and-apostrophes/</link>
		<comments>http://connectedpawns.wordpress.com/2009/05/05/the-sql-adapter-and-apostrophes/#comments</comments>
		<pubDate>Tue, 05 May 2009 01:10:52 +0000</pubDate>
		<dc:creator>mbrimble</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[SQL adapter]]></category>

		<guid isPermaLink="false">http://connectedpawns.wordpress.com/?p=239</guid>
		<description><![CDATA[I got an amusing call from a DBA the other day saying that the BizTalk SQL adapter was failing whenever he sent through a message that had an apostrophe in it. The message being sent to the SQL adapter contained;
Mum&#8217;s Apple Pie
The message had suspended in Biztalk with a failure to due a failed MSDTC transaction on the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedpawns.wordpress.com&blog=4949199&post=239&subd=connectedpawns&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I got an amusing call from a DBA the other day saying that the BizTalk SQL adapter was failing whenever he sent through a message that had an apostrophe in it. The message being sent to the SQL adapter contained;</p>
<p style="text-align:center;">Mum&#8217;s Apple Pie</p>
<p>The message had suspended in Biztalk with a failure to due a failed MSDTC transaction on the SQL port. The DBA had opened the message in the BizTalk Adminstrators Console Group Hub and then copied the message into his SQL analyzer to test the SQL query. He had noticed that the apostrophe was not escaped and rightly deduced that the SQL query would fail if it was not escaped. See <a href="http://www.kamath.com/codelibrary/cl003_apostrophe.asp">http://www.kamath.com/codelibrary/cl003_apostrophe.asp</a> for example.</p>
<p>I told him to calm down because this was not the source of his problem. I got him to start SQL profile and set up a filter to  trace the SQL query coming from the faulting SQL adapter. Sure enough the trace showed that when BizTalk sends the same message to a SQL adapter it magically escapes the apostrophe and the SQL request now contains;</p>
<p style="text-align:center;">Mum&#8217;&#8217;s Apple Pie</p>
<p style="text-align:left;">The point here is that if you are troubleshooting a SQL adapter failure sometimes the suspended message does contain the exact SQL request that was submitted. I think that you need to trace the SQL transaction to see what is really being submitted.</p>
<p style="text-align:left;">Once he submitted the SQL from the trace to his stored procedure he could see that the error was due to a change he had made and it was not the fault of the BizTalk server solution. To finish with I can&#8217;t resist giving this link to an amusing cartoon about misuse of the apostrophe ( <a title="http://www.angryflower.com/bobsqu.gif" href="http://www.angryflower.com/bobsqu.gif" target="_blank">http://www.angryflower.com/bobsqu.gif</a> ). Maybe we need a cartoon about misuse of the apostrophe in SQL queries.  <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/connectedpawns.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/connectedpawns.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/connectedpawns.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/connectedpawns.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/connectedpawns.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/connectedpawns.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/connectedpawns.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/connectedpawns.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/connectedpawns.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/connectedpawns.wordpress.com/239/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedpawns.wordpress.com&blog=4949199&post=239&subd=connectedpawns&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://connectedpawns.wordpress.com/2009/05/05/the-sql-adapter-and-apostrophes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e4f8b2c42221c62a00d5ec1174eaa6c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mbrimble</media:title>
		</media:content>
	</item>
		<item>
		<title>Custom Party Resolution BizTalk Server 2006: Resolve party by POP3.From and square brackets</title>
		<link>http://connectedpawns.wordpress.com/2009/03/28/custom-party-resolution-biztalk-server-2006-resolve-party-by-pop3from-and-square-brackets/</link>
		<comments>http://connectedpawns.wordpress.com/2009/03/28/custom-party-resolution-biztalk-server-2006-resolve-party-by-pop3from-and-square-brackets/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 21:58:27 +0000</pubDate>
		<dc:creator>mbrimble</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[Parties]]></category>

		<guid isPermaLink="false">http://connectedpawns.wordpress.com/?p=223</guid>
		<description><![CDATA[Recently I wrote a BizTalk Server 2006 custom pipeline component to resolve a custom party on the POP3.From context value when an email was received. I was surprised to find some unusual behaviour if the POP3.From context value contained square brackets like &#8220;HEWHOCARES [WORLD]&#8221; &#60; HEWHOCARES@world.com &#62;. I describe the behaviour and why it occurs [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedpawns.wordpress.com&blog=4949199&post=223&subd=connectedpawns&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Recently I wrote a BizTalk Server 2006 custom pipeline component to resolve a custom party on the POP3.From context value when an email was received. I was surprised to find some unusual behaviour if the POP3.From context value contained square brackets like &#8220;HEWHOCARES [WORLD]&#8221; <a href="mailto:HEWHOCARES@world.com">&lt; HEWHOCARES@world.com </a>&gt;. I describe the behaviour and why it occurs below because it took me by surprise.</p>
<p>The base example for the custom pipeline component is based on <a href="http://msdn.microsoft.com/en-us/library/aa559134.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/aa559134.aspx</a> . The code fragment below shows the important changes;</p>
<p><span style="font-size:xx-small;">/// This function gets called after the entire stream of the message has been read, guaranteeing that all promoted properties<br />
        /// from the message have been populated to the message context.<br />
        /// &lt;/summary&gt;<br />
        internal void EndOfStream()<br />
        {<br />
            string FromEmail = null;<br />
            BizTalkParty party; </span></p>
<p><span style="font-size:xx-small;">            //obtain the FromEmail string from the message<br />
            FromEmail = (string)mBaseMessage.Context.Read(&#8220;From&#8221;, &#8220;</span><a href="http://schemas.microsoft.com/BizTalk/2003/pop3-properties&quot;);"><span style="font-size:xx-small;">http://schemas.microsoft.com/BizTalk/2003/pop3-properties&#8221;);</span></a></p>
<p><span style="font-size:xx-small;">            if (FromEmail != null)<br />
            {<br />
                PartyResolver pr = new PartyResolver();<br />
                party = pr.GetPartyFromAlias(&#8220;FromEmail&#8221;, &#8220;FromEmailName&#8221;, FromEmail); </span></p>
<p><span style="font-size:xx-small;">                mBaseMessage.Context.Promote(&#8220;SourcePartyID&#8221;, &#8220;</span><a href="http://schemas.microsoft.com/BizTalk/2003/system-properties&quot;"><span style="font-size:xx-small;">http://schemas.microsoft.com/BizTalk/2003/system-properties&#8221;</span></a><span style="font-size:xx-small;">, party.SID);<br />
                mBaseMessage.Context.Promote(&#8220;PartyName&#8221;, &#8220;</span><a href="http://schemas.microsoft.com/BizTalk/2003/messagetracking-properties&quot;"><span style="font-size:xx-small;">http://schemas.microsoft.com/BizTalk/2003/messagetracking-properties&#8221;</span></a><span style="font-size:xx-small;">, party.Name);<br />
            }<br />
        }</span></p>
<p>I set up my party like; <img class="aligncenter size-full wp-image-233" title="parties" src="http://connectedpawns.files.wordpress.com/2009/03/parties.jpg?w=628&#038;h=259" alt="parties" width="628" height="259" /></p>
<p>On testing this pipeline component with an email from &#8220;HEWHOCARES&#8221; <a href="mailto:HEWHOCARES@world.com">&lt; HEWHOCARES@world.com </a>&gt;   it resolves the party to ThePeopleWhoCare. Now if I change the party value to &#8220;HEWHOCARES [WORLD]&#8221; <a href="mailto:HEWHOCARES@world.com">&lt; HEWHOCARES@world.com </a>&gt; and send an email from the same email address then it resolves to Guest not ThePeopleWhocare. What is going on? If you dig a bit further you find that to resolve the party this stored procedure is used;</p>
<p><span style="font-size:xx-small;">USE [BizTalkMgmtDb]<br />
GO<br />
/****** Object:  StoredProcedure [dbo].[admsvr_GetPartyByAliasNameValue]    Script Date: 03/24/2009 21:16:03 ******/<br />
SET ANSI_NULLS ON<br />
GO<br />
SET QUOTED_IDENTIFIER ON<br />
GO<br />
ALTER PROCEDURE [dbo].[admsvr_GetPartyByAliasNameValue]<br />
@nvcAliasName nvarchar(256),<br />
@nvcAliasQualifier nvarchar(64),<br />
@nvcAliasValue nvarchar(256),<br />
@nvcSID nvarchar(256) OUTPUT,<br />
@nvcName nvarchar(256) OUTPUT<br />
AS<br />
SELECT      @nvcSID = bts_party.nvcSID,<br />
            @nvcName = bts_party.nvcName<br />
FROM bts_party, bts_party_alias<br />
WHERE       UPPER(bts_party_alias.nvcName) = UPPER(@nvcAliasName) AND<br />
            UPPER(bts_party_alias.nvcQualifier) = UPPER(@nvcAliasQualifier) AND<br />
           bts_party_alias.nvcValue LIKE @nvcAliasValue  AND<br />
           bts_party_alias.nPartyID = bts_party.nID </span></p>
<p>The WHERE clause uses a LIKE statement for the criteria based on the passed POP3.FROM context value.  [] in a like statement is evaluated as any single character within the specified range. Thus in our case we try find a party with an FromEmail value of &#8220;HEWHOCARES W&#8221; <a href="mailto:HEWHOCARES@world.com">&lt; HEWHOCARES@world.com </a>&gt; (or where W&#8221; is O&#8221;, R&#8221;, L&#8221; or D&#8221;). Indeed if I now change the party value to &#8220;HEWHOCARES W&#8221; <a href="mailto:HEWHOCARES@world.com">&lt; HEWHOCARES@world.com </a>&gt; then &#8220;HEWHOCARES [WORLD]&#8221; <a href="mailto:HEWHOCARES@world.com">&lt; HEWHOCARES@world.com </a>&gt; resolves to ThePeopleWhoCare once again.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/connectedpawns.wordpress.com/223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/connectedpawns.wordpress.com/223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/connectedpawns.wordpress.com/223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/connectedpawns.wordpress.com/223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/connectedpawns.wordpress.com/223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/connectedpawns.wordpress.com/223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/connectedpawns.wordpress.com/223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/connectedpawns.wordpress.com/223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/connectedpawns.wordpress.com/223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/connectedpawns.wordpress.com/223/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedpawns.wordpress.com&blog=4949199&post=223&subd=connectedpawns&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://connectedpawns.wordpress.com/2009/03/28/custom-party-resolution-biztalk-server-2006-resolve-party-by-pop3from-and-square-brackets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e4f8b2c42221c62a00d5ec1174eaa6c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mbrimble</media:title>
		</media:content>

		<media:content url="http://connectedpawns.files.wordpress.com/2009/03/parties.jpg" medium="image">
			<media:title type="html">parties</media:title>
		</media:content>
	</item>
		<item>
		<title>Many-to-one mappings using the Table Looping Functoid</title>
		<link>http://connectedpawns.wordpress.com/2009/03/08/many-to-one-mappings-using-the-table-looping-functoid/</link>
		<comments>http://connectedpawns.wordpress.com/2009/03/08/many-to-one-mappings-using-the-table-looping-functoid/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 03:13:30 +0000</pubDate>
		<dc:creator>mbrimble</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[BizTalk map]]></category>
		<category><![CDATA[Table Looping functoid]]></category>

		<guid isPermaLink="false">http://connectedpawns.wordpress.com/?p=157</guid>
		<description><![CDATA[I have found another solution to the scenario 2 that I blogged about a couple of weeks ago (&#8220;The values in the output message are an aggregation of the two input messages with one value coming from only one input message&#8220;). This solution does not use custom XSLT just the BizTalk mapper.

I found if I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedpawns.wordpress.com&blog=4949199&post=157&subd=connectedpawns&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have found another solution to the scenario 2 that I blogged about a couple of weeks ago (&#8220;<a href="http://connectedpawns.wordpress.com/2009/02/03/many-to-one-mappings/" target="_blank">The values in the output message are an aggregation of the two input messages with one value coming from only one input message</a>&#8220;). This solution does not use custom XSLT just the BizTalk mapper.</p>
<p><img class="aligncenter size-full wp-image-160" title="tablelooping" src="http://connectedpawns.files.wordpress.com/2009/03/tablelooping.jpg?w=1024&#038;h=302" alt="tablelooping" width="1024" height="302" /></p>
<p>I found if I used the <a href="http://hestia.typepad.com/flatlander/2007/01/mapping_fixed_e.html" target="_blank">Table looping functoid</a> instead of the looping functoid I could get the correct transformed message as well.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/connectedpawns.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/connectedpawns.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/connectedpawns.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/connectedpawns.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/connectedpawns.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/connectedpawns.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/connectedpawns.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/connectedpawns.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/connectedpawns.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/connectedpawns.wordpress.com/157/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=connectedpawns.wordpress.com&blog=4949199&post=157&subd=connectedpawns&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://connectedpawns.wordpress.com/2009/03/08/many-to-one-mappings-using-the-table-looping-functoid/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e4f8b2c42221c62a00d5ec1174eaa6c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mbrimble</media:title>
		</media:content>

		<media:content url="http://connectedpawns.files.wordpress.com/2009/03/tablelooping.jpg" medium="image">
			<media:title type="html">tablelooping</media:title>
		</media:content>
	</item>
	</channel>
</rss>