<?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>Bram Veldhoen&#039;s Weblog</title>
	<atom:link href="http://bveldhoen.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://bveldhoen.wordpress.com</link>
	<description></description>
	<lastBuildDate>Mon, 28 Nov 2011 07:01:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='bveldhoen.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Bram Veldhoen&#039;s Weblog</title>
		<link>http://bveldhoen.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://bveldhoen.wordpress.com/osd.xml" title="Bram Veldhoen&#039;s Weblog" />
	<atom:link rel='hub' href='http://bveldhoen.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Introducing RockBus: Durable Content Based Routing in WCF</title>
		<link>http://bveldhoen.wordpress.com/2011/03/31/introducing-rockbus-durable-content-based-routing-in-wcf/</link>
		<comments>http://bveldhoen.wordpress.com/2011/03/31/introducing-rockbus-durable-content-based-routing-in-wcf/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 17:55:28 +0000</pubDate>
		<dc:creator>Bram Veldhoen</dc:creator>
				<category><![CDATA[Wcf]]></category>

		<guid isPermaLink="false">http://bveldhoen.wordpress.com/?p=218</guid>
		<description><![CDATA[Recently, I published a new project on codeplex called RockBus. It&#8217;s a .NET based publish/subscribe and/or content based routing framework that allows for the following functionalities: * Full support for WCF and it&#8217;s protocols, extensibility, etc. * Durable message delivery using &#8230; <a href="http://bveldhoen.wordpress.com/2011/03/31/introducing-rockbus-durable-content-based-routing-in-wcf/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bveldhoen.wordpress.com&amp;blog=11293792&amp;post=218&amp;subd=bveldhoen&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently, I published a new project on codeplex called RockBus. It&#8217;s a .NET based publish/subscribe and/or content based routing framework that allows for the following functionalities:</p>
<p>* Full support for WCF and it&#8217;s protocols, extensibility, etc.</p>
<p>* Durable message delivery using MSMQ and/or SQL Server Service Broker (message persistence in a database is on the todo-list)</p>
<p>* Static subscription configuration via database or web/app configuration files.</p>
<p>* Dynamic (@run-time) subscription configuration via a WCF service interface.</p>
<p>* Transactional delivery to one or multiple subscribers.</p>
<p>* <del>Support for itineraries (complex message flows)</del></p>
<p>The full list of goodies is documented on the codeplex page: <a title="RockBus" href="http://rockbus.codeplex.com" target="_blank">rockbus.codeplex.com</a>.</p>
<p>RockBus can be interesting if you&#8217;re looking for a way to decouple your wcf clients and services. For instance, by using publish/subscribe, you can have multiple subscribers (wcf services) receive the same message, while the publisher (wcf client) only has to send the message once, and doesn&#8217;t have to know which subscribers actually receive the message(s).</p>
<p>If you want to selectively send messages to subscribers, you can use XPath expressions to filter out the messages. The XPath expressions are part of the subscription information, sent to RockBus by the subscribers.</p>
<p>There are a couple of samples, provided with the RockBus solution:</p>
<p>* 0. No Dependencies: Shows how RockBus can be used to perform in-memory (non-store-and-forward) routing of messages to subscribers. This sample has no dependencies on for instance MSMQ or SSB.</p>
<p>* 1. Durable Cbr: Shows how RockBus can be used to perform content-based routing, while storing the messages in a durable backing store (MSMQ) before delivering them to the subscribers.</p>
<p>* 2. Transactional Delivery: Shows how RockBus can be configured to transactionally deliver one message to two subscribers (one message copy to each subscriber), within 1 transaction. If one subscriber&#8217;s transaction rolls back, the other subscriber&#8217;s transaction will, too. The transactions are propagated using wcf WsHttp and NetNamedPipe bindings.</p>
<p>* 3. Dynamic Publish/Subscribe: Shows how RockBus can be used to receive subscription information at run-time, store that subscription information into a subscription database, and perform content-based routing on any published messages using that subscription information.</p>
<p>* 4. File Transport: Shows how the RockBus framework can be extended with custom implementation of a transport by implementing the ITransport and IMessagePublisher interfaces. (The File transport is (to be) used for demonstration purposes only).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bveldhoen.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bveldhoen.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bveldhoen.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bveldhoen.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bveldhoen.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bveldhoen.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bveldhoen.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bveldhoen.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bveldhoen.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bveldhoen.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bveldhoen.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bveldhoen.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bveldhoen.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bveldhoen.wordpress.com/218/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bveldhoen.wordpress.com&amp;blog=11293792&amp;post=218&amp;subd=bveldhoen&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bveldhoen.wordpress.com/2011/03/31/introducing-rockbus-durable-content-based-routing-in-wcf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f352a7a81e78c1dff1275698642d6ff6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bveldhoen</media:title>
		</media:content>
	</item>
		<item>
		<title>Generic Message Contract and Transaction Flow in WCF</title>
		<link>http://bveldhoen.wordpress.com/2011/02/15/generic-message-contract-and-transaction-flow-in-wcf/</link>
		<comments>http://bveldhoen.wordpress.com/2011/02/15/generic-message-contract-and-transaction-flow-in-wcf/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 22:12:16 +0000</pubDate>
		<dc:creator>Bram Veldhoen</dc:creator>
				<category><![CDATA[Wcf]]></category>

		<guid isPermaLink="false">https://bveldhoen.wordpress.com/2011/02/15/generic-message-contract-and-transaction-flow-in-wcf/</guid>
		<description><![CDATA[OK, this one had me fistpumping (in the air!) for quite some time. Short introduction. For my upcoming session at the Sela Developer Practice, I&#8217;m developing a demo that involves durable content based routing with MSMQ and WCF. I was &#8230; <a href="http://bveldhoen.wordpress.com/2011/02/15/generic-message-contract-and-transaction-flow-in-wcf/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bveldhoen.wordpress.com&amp;blog=11293792&amp;post=215&amp;subd=bveldhoen&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>OK, this one had me fistpumping (in the air!) for quite some time.</p>
<p>Short introduction. For my upcoming session at the <a href="http://www.sela.co.il/s/SDP/_New/Presentations2.html#Durable" target="_blank">Sela Developer Practice</a>, I&#8217;m developing a demo that involves durable content based routing with MSMQ and WCF. I was using a generic message contract:</p>
<pre class="code">[<span style="color:#2b91af;">ServiceContract</span>(Namespace = ”SomeNamespace”, SessionMode = <span style="color:#2b91af;">SessionMode</span>.Allowed)]
<span style="color:blue;">public interface </span><span style="color:#2b91af;">ITwoWay
</span>{
    [<span style="color:#2b91af;">TransactionFlow</span>(<span style="color:#2b91af;">TransactionFlowOption</span>.Allowed)]
    [<span style="color:#2b91af;">OperationContract</span>(AsyncPattern = <span style="color:blue;">true</span>, IsOneWay = <span style="color:blue;">false</span>, Action = <span style="color:#a31515;">"*"</span>, ReplyAction = <span style="color:#a31515;">"*"</span>)]
    <span style="color:#2b91af;">IAsyncResult </span>BeginProcessRequest(<span style="color:#2b91af;">Message </span>message, <span style="color:#2b91af;">AsyncCallback </span>callback, <span style="color:blue;">object </span>state);
    <span style="color:#2b91af;">Message </span>EndProcessRequest(<span style="color:#2b91af;">IAsyncResult </span>result);
}
</pre>
<p>N.B. Apart from the name and namespace, this is identical to the WCF 4.0 RoutingService IRequestReplyRouter interface.</p>
<p>Furthermore I was using:</p>
<ul>
<li>WsHttp binding with transactionFlow=&#8221;true&#8221;,
<li>[OperationBehavior(TransactionFlowOption.Allowed)] on both the client generic message contract and the typed service contract,
<li>[OperationBehavior(TransactionScopeRequired = true)] on the service method,
<li>and a TransactionScope in the client to make sure the WCF call was performed from within an ambient transaction.</li>
</ul>
<p>I was experiencing a strange issue with flowing the transaction from the client to the service. The transaction SOAP header was not added, even though I was following all the rules to enable transaction flow described above.</p>
<p>It turns out there&#8217;s a known issue (<a href="http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/cedc947f-101f-4a20-83e5-b591ecc9bd5b" target="_blank">described here</a>) with flowing transactions when using a generic message contract. After a lot of research, I found that this is because of the fact that a generic message contract uses wildcard specifications for the Action and/or ReplyAction. Then I wondered how the .NET 4.0 RoutingService would deal with this issue, so I reviewed the code of the .NET 4.0 RoutingService and found this:</p>
<pre class="code"><span style="color:blue;">private static void </span>ConfigureTransactionFlow(<span style="color:#2b91af;">ServiceEndpoint </span>endpoint)
{
    <span style="color:#2b91af;">CustomBinding </span>binding = endpoint.Binding <span style="color:blue;">as </span><span style="color:#2b91af;">CustomBinding</span>;
    <span style="color:blue;">if </span>(binding == <span style="color:blue;">null</span>)
    {
        binding = <span style="color:blue;">new </span><span style="color:#2b91af;">CustomBinding</span>(endpoint.Binding);
    }

    <span style="color:#2b91af;">TransactionFlowBindingElement </span>element = binding.Elements.Find&lt;<span style="color:#2b91af;">TransactionFlowBindingElement</span>&gt;();
    <span style="color:blue;">if </span>(element != <span style="color:blue;">null</span>)
    {
        element.AllowWildcardAction = <span style="color:blue;">true</span>;
        endpoint.Binding = binding;
    }
}
</pre>
<p>Applying this change to the binding configuration fixes the transaction flow when using a generic message contract.</p>
<p>There’s one more gotcha though; if you apply this to the endpoint of the channel (or any class derived from ClientBase&lt;T&gt;), it still doesn’t work, because the channel has already been initialized internally before you get to change the binding configuration. You need to apply this to the endpoint of the ChannelFactory, BEFORE you create the channel. (I use a customized base class (other than ClientBase&lt;T&gt;) for WCF proxies where I arrange for a timely initialization of the binding configuration).</p>
<p><a href="http://www.sela.co.il/s/SDP/_New/Presentations2.html"><img title="Sela" border="0" alt="Sela" src="http://blogs.microsoft.co.il/blogs/zurdoil/Sela_33DCC9C7.png" width="504" height="144"></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bveldhoen.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bveldhoen.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bveldhoen.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bveldhoen.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bveldhoen.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bveldhoen.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bveldhoen.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bveldhoen.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bveldhoen.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bveldhoen.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bveldhoen.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bveldhoen.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bveldhoen.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bveldhoen.wordpress.com/215/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bveldhoen.wordpress.com&amp;blog=11293792&amp;post=215&amp;subd=bveldhoen&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bveldhoen.wordpress.com/2011/02/15/generic-message-contract-and-transaction-flow-in-wcf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f352a7a81e78c1dff1275698642d6ff6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bveldhoen</media:title>
		</media:content>

		<media:content url="http://blogs.microsoft.co.il/blogs/zurdoil/Sela_33DCC9C7.png" medium="image">
			<media:title type="html">Sela</media:title>
		</media:content>
	</item>
		<item>
		<title>WcfTestClient: The namespace &#8221; already contains a definition for &#8216;&#8230;&#8217;</title>
		<link>http://bveldhoen.wordpress.com/2011/02/11/wcftestclient-the-namespace-already-contains-a-definition-for/</link>
		<comments>http://bveldhoen.wordpress.com/2011/02/11/wcftestclient-the-namespace-already-contains-a-definition-for/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 20:37:17 +0000</pubDate>
		<dc:creator>Bram Veldhoen</dc:creator>
				<category><![CDATA[Wcf]]></category>

		<guid isPermaLink="false">http://bveldhoen.wordpress.com/?p=208</guid>
		<description><![CDATA[While using the WcfTestClient, I received the error message displayed in the title. It turned out that in my case, I was using colons in the namespaces of my wcf service, like so: [ServiceContract(Namespace="urn:SomeName::SomeMoreNames")] public interface IXxx [OperationContract(Action = "urn:SomeName::SomeMoreNames")] &#8230; <a href="http://bveldhoen.wordpress.com/2011/02/11/wcftestclient-the-namespace-already-contains-a-definition-for/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bveldhoen.wordpress.com&amp;blog=11293792&amp;post=208&amp;subd=bveldhoen&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While using the WcfTestClient, I received the error message displayed in the title. It turned out that in my case, I was using colons in the namespaces of my wcf service, like so:</p>
<div>[<span style="font-family:Consolas;color:#2b91af;">ServiceContract</span><span style="font-family:Consolas;">(Namespace=</span><span style="font-family:Consolas;color:#a31515;">"urn:SomeName::SomeMoreNames"</span><span style="font-family:Consolas;">)]</span></div>
<div><span style="font-family:Consolas;color:#0000ff;">public interface </span><span style="font-family:Consolas;color:#2b91af;">IXxx</span></div>
<div>
<p>[<span style="font-family:Consolas;color:#2b91af;">OperationContract</span><span style="font-family:Consolas;">(Action = </span><span style="font-family:Consolas;color:#a31515;">"urn:SomeName::SomeMoreNames"</span><span style="font-family:Consolas;">)]</span></p>
<div><span style="font-family:Consolas;">{</span></div>
<div><span style="font-family:Consolas;color:#0000ff;">void </span><span style="font-family:Consolas;">MetodName();</span></div>
<div><span style="font-family:Consolas;">}</span></div>
<p>I managed to fix the error by changing the namespaces into something like &#8220;http://SomeName.SomeMoreNames&#8221;. Hope this helps anyone.</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bveldhoen.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bveldhoen.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bveldhoen.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bveldhoen.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bveldhoen.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bveldhoen.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bveldhoen.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bveldhoen.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bveldhoen.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bveldhoen.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bveldhoen.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bveldhoen.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bveldhoen.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bveldhoen.wordpress.com/208/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bveldhoen.wordpress.com&amp;blog=11293792&amp;post=208&amp;subd=bveldhoen&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bveldhoen.wordpress.com/2011/02/11/wcftestclient-the-namespace-already-contains-a-definition-for/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f352a7a81e78c1dff1275698642d6ff6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bveldhoen</media:title>
		</media:content>
	</item>
		<item>
		<title>Asynchronous transactions and propagation in WCF</title>
		<link>http://bveldhoen.wordpress.com/2011/02/07/asynchronous-transactions-and-propagation-in-wcf/</link>
		<comments>http://bveldhoen.wordpress.com/2011/02/07/asynchronous-transactions-and-propagation-in-wcf/#comments</comments>
		<pubDate>Mon, 07 Feb 2011 16:19:32 +0000</pubDate>
		<dc:creator>Bram Veldhoen</dc:creator>
				<category><![CDATA[Wcf]]></category>

		<guid isPermaLink="false">https://bveldhoen.wordpress.com/2011/02/07/asynchronous-transactions-and-propagation-in-wcf/</guid>
		<description><![CDATA[I was recently looking into implementing a transactional WCF service asynchronously, and ran into the fact that asynchrony and transactions don’t mix … easily. I also found that there weren’t that many samples of asynchronously implemented transactional WCF services out &#8230; <a href="http://bveldhoen.wordpress.com/2011/02/07/asynchronous-transactions-and-propagation-in-wcf/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bveldhoen.wordpress.com&amp;blog=11293792&amp;post=207&amp;subd=bveldhoen&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was recently looking into implementing a transactional WCF service asynchronously, and ran into the fact that asynchrony and transactions don’t mix … easily. I also found that there weren’t that many samples of asynchronously implemented transactional WCF services out there that could help to understand the implementation details and play around with, so i decided to write a sample.</p>
<p>The sample contains two WCF services: StorageService and StorageServiceTransactional. As the names suggest, the first doesn’t use transactions, the latter does. The sample uses wsHttpBinding and netMsmqBinding. Below a picture of a call sequence that could be performed with the sample:</p>
<p><a href="http://bveldhoen.files.wordpress.com/2011/02/asynctrans.jpg"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="AsyncTrans" border="0" alt="AsyncTrans" src="http://bveldhoen.files.wordpress.com/2011/02/asynctrans_thumb.jpg?w=644&#038;h=290" width="644" height="290"></a> </p>
<p>The sample allows to easily (by (un)commenting only a couple of lines) change the sequence of calls. For instance, you could make the non-transactional StorageService (instead of the transactional StorageServiceTransactional) pick up the message from the MSMQ queue, and see what happens to the transactions and the propagation. The number of possible combinations grows quickly; that’s exactly why this sample can come in handy.</p>
<p>The sample writes the TransactionInformation to the console at several steps during the execution of the call sequences. This allows you to inspect the transaction identifiers, and the transaction propagation. Below a screenshot of the console output, with highlights to the transaction identifiers:</p>
<p><a href="http://bveldhoen.files.wordpress.com/2011/02/asynctrans-consoleoutput.jpg"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="AsyncTrans.ConsoleOutput" border="0" alt="AsyncTrans.ConsoleOutput" src="http://bveldhoen.files.wordpress.com/2011/02/asynctrans-consoleoutput_thumb.jpg?w=539&#038;h=484" width="539" height="484"></a> </p>
</p>
<p>In the picture above, you can see that the client and the host used different transactions (different local and distributed identifiers). However, the message exchange between the two services within the host was done within one and the same transaction (same identifiers). The fact that the message exchange was executed ‘within one executable’ doesn’t make too much difference; if you would run two instances of the host executable (and make the appropriate changes regarding the listen urls), the message exchange would still be performed in one transaction. The LocalIdentifier would be different (LocalIdentifier corresponds to AppDomain), but the DistributedIdentifier would be the same.</p>
<p>If you’re wondering about the contents of the SOAP header; below the fragment of the SOAP header (taken with Fiddler2), containing the WS-* header describing the transaction context. You can see that the LocalTransactionIds match the DistributedIdentifiers displayed above:</p>
<p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:8da06a4a-76c5-45ff-bb54-0cf78ffd1959" class="wlWriterEditableSmartContent">
<pre style="background-color:#FFFFFF;overflow:auto;"><span style="color:#0000FF;">&lt;</span><span style="color:#800000;">CoordinationContext </span><span style="color:#FF0000;">s:mustUnderstand</span><span style="color:#0000FF;">="1"</span><span style="color:#FF0000;"> xmlns</span><span style="color:#0000FF;">="http://schemas.xmlsoap.org/ws/2004/10/wscoor"</span><span style="color:#FF0000;"> xmlns:mstx</span><span style="color:#0000FF;">="http://schemas.microsoft.com/ws/2006/02/transactions"</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">
  </span><span style="color:#0000FF;">&lt;</span><span style="color:#800000;">wscoor:Identifier </span><span style="color:#FF0000;">xmlns:wscoor</span><span style="color:#0000FF;">="http://schemas.xmlsoap.org/ws/2004/10/wscoor"</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">urn:uuid:e49c680d-ebd5-449a-b2a5-36e01b16ac0f</span><span style="color:#0000FF;">&lt;/</span><span style="color:#800000;">wscoor:Identifier</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">
  </span><span style="color:#0000FF;">&lt;</span><span style="color:#800000;">Expires</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">59904</span><span style="color:#0000FF;">&lt;/</span><span style="color:#800000;">Expires</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">
  </span><span style="color:#0000FF;">&lt;</span><span style="color:#800000;">CoordinationType</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">http://schemas.xmlsoap.org/ws/2004/10/wsat</span><span style="color:#0000FF;">&lt;/</span><span style="color:#800000;">CoordinationType</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">
  </span><span style="color:#0000FF;">&lt;</span><span style="color:#800000;">RegistrationService</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">
    </span><span style="color:#0000FF;">&lt;</span><span style="color:#800000;">Address </span><span style="color:#FF0000;">xmlns</span><span style="color:#0000FF;">="http://schemas.xmlsoap.org/ws/2004/08/addressing"</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">https://bram08r2/WsatService/Registration/Coordinator/Disabled/</span><span style="color:#0000FF;">&lt;/</span><span style="color:#800000;">Address</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">
    </span><span style="color:#0000FF;">&lt;</span><span style="color:#800000;">ReferenceParameters </span><span style="color:#FF0000;">xmlns</span><span style="color:#0000FF;">="http://schemas.xmlsoap.org/ws/2004/08/addressing"</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">
      </span><span style="color:#0000FF;">&lt;</span><span style="color:#800000;">mstx:RegisterInfo</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">
        </span><span style="color:#0000FF;">&lt;</span><span style="color:#800000;">mstx:LocalTransactionId</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">e49c680d-ebd5-449a-b2a5-36e01b16ac0f</span><span style="color:#0000FF;">&lt;/</span><span style="color:#800000;">mstx:LocalTransactionId</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">
      </span><span style="color:#0000FF;">&lt;/</span><span style="color:#800000;">mstx:RegisterInfo</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">
    </span><span style="color:#0000FF;">&lt;/</span><span style="color:#800000;">ReferenceParameters</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">
  </span><span style="color:#0000FF;">&lt;/</span><span style="color:#800000;">RegistrationService</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">
  </span><span style="color:#0000FF;">&lt;</span><span style="color:#800000;">mstx:IsolationLevel</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">0</span><span style="color:#0000FF;">&lt;/</span><span style="color:#800000;">mstx:IsolationLevel</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">
  </span><span style="color:#0000FF;">&lt;</span><span style="color:#800000;">mstx:LocalTransactionId</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">e49c680d-ebd5-449a-b2a5-36e01b16ac0f</span><span style="color:#0000FF;">&lt;/</span><span style="color:#800000;">mstx:LocalTransactionId</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">
  </span><span style="color:#0000FF;">&lt;</span><span style="color:#800000;">PropagationToken </span><span style="color:#FF0000;">xmlns</span><span style="color:#0000FF;">="http://schemas.microsoft.com/ws/2006/02/tx/oletx"</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">AQAAAAM...snipped for brevity...AAAA==</span><span style="color:#0000FF;">&lt;/</span><span style="color:#800000;">PropagationToken</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">
</span><span style="color:#0000FF;">&lt;/</span><span style="color:#800000;">CoordinationContext</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">
</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
</p>
<p><strong>Regarding the asynchronous implementation</strong></p>
<p>The WCF services were implemented with the Task Parallel Library, but you could easily swap that out for ‘old-school’ APM style BeginXxx etc. What’s more important is the way the transaction completion is implemented. Asynchronously completing transactions is more complicated, because there are multiple threads involved in the completion process, and you just can’t rely on <strong>using (TransactionScope ts = new TransactionScope) { … }</strong>. The sample was implemented using the Transaction.Clone() method, which returns a DependentTransaction. This DependentTransaction is used to block the completion process, and it is passed as the asynchronous state, to be completed when the asynchronous call completes (the EndXxx method);</p>
<p>If you find anything wrong with this sample, pls. let me know! Other suggestions are welcome too. You can <a href="http://cid-2842888be528bd06.office.live.com/self.aspx/.Public/AsyncTrans.zip">download it from here</a>.</p>
<p>Hope this helps anyone!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bveldhoen.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bveldhoen.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bveldhoen.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bveldhoen.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bveldhoen.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bveldhoen.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bveldhoen.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bveldhoen.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bveldhoen.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bveldhoen.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bveldhoen.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bveldhoen.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bveldhoen.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bveldhoen.wordpress.com/207/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bveldhoen.wordpress.com&amp;blog=11293792&amp;post=207&amp;subd=bveldhoen&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bveldhoen.wordpress.com/2011/02/07/asynchronous-transactions-and-propagation-in-wcf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f352a7a81e78c1dff1275698642d6ff6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bveldhoen</media:title>
		</media:content>

		<media:content url="http://bveldhoen.files.wordpress.com/2011/02/asynctrans_thumb.jpg" medium="image">
			<media:title type="html">AsyncTrans</media:title>
		</media:content>

		<media:content url="http://bveldhoen.files.wordpress.com/2011/02/asynctrans-consoleoutput_thumb.jpg" medium="image">
			<media:title type="html">AsyncTrans.ConsoleOutput</media:title>
		</media:content>
	</item>
		<item>
		<title>Map Request to Response in BizTalk Server</title>
		<link>http://bveldhoen.wordpress.com/2011/01/12/map-request-to-response-in-biztalk-server/</link>
		<comments>http://bveldhoen.wordpress.com/2011/01/12/map-request-to-response-in-biztalk-server/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 09:19:39 +0000</pubDate>
		<dc:creator>Bram Veldhoen</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[Manipulate Context Properties]]></category>
		<category><![CDATA[Messaging]]></category>
		<category><![CDATA[Pipeline]]></category>
		<category><![CDATA[Pipeline Component]]></category>
		<category><![CDATA[Promoted Property]]></category>

		<guid isPermaLink="false">http://bveldhoen.wordpress.com/?p=190</guid>
		<description><![CDATA[Consider the following scenario: You need to receive a message into BizTalk Server, and send an acknowledgement back to the sender (probably using a Request-Response port). The response is trivial, it&#8217;s similar to a void response in WCF, or containing &#8230; <a href="http://bveldhoen.wordpress.com/2011/01/12/map-request-to-response-in-biztalk-server/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bveldhoen.wordpress.com&amp;blog=11293792&amp;post=190&amp;subd=bveldhoen&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div>Consider the following scenario:</div>
<ul>
<li>You need to receive a message into BizTalk Server, and send an acknowledgement back to the sender (probably using a Request-Response port).</li>
<li>The response is trivial, it&#8217;s similar to a void response in WCF, or containing only information that can be obtained from the request message (such as an ID or something).</li>
</ul>
<div>The figure below displays this scenario graphically:</div>
<div><a href="http://bveldhoen.files.wordpress.com/2011/01/maprequesttoresponse.jpg"><img class="aligncenter size-full wp-image-194" title="MapRequestToResponse" src="http://bveldhoen.files.wordpress.com/2011/01/maprequesttoresponse.jpg?w=640" alt=""   /></a></div>
<div>BizTalk Server doesn&#8217;t allow that easily out of the box, because there&#8217;s no standard way to create a response and correlate it to the request without involving an orchestration or a solicit-response port.</div>
<div>In comes the context property <strong>RouteDirectToTP</strong>. If you set this property on the inbound request with value <strong>true</strong>, the BizTalk Messaging Engine will route the request immediately back to the receive port (actually, it routes it back to any instance subscription with the matching EpmRRCorrelationToken. <a href="http://blogs.msdn.com/b/paolos/archive/2008/07/21/msdn-blogs.aspx">This post explains why</a>. In the above scenario, the receive port has such an instance subscription). Since the receive port has an outbound map, that transforms the request to response, the sender will receive the response message.</div>
<div>In the above sample, the context property is set using a <strong>ContextManipulator</strong> pipeline component, which can manipulate context properties based on xml configuration. This xml configuration looks like this:</div>
<div id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:15280364-7b5f-4b0b-b8c5-0272660f774c" class="wlWriterEditableSmartContent" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:#ffffff;overflow:auto;"><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">cmc </span><span style="color:#ff0000;">xmlns:xsi</span><span style="color:#0000ff;">="http://www.w3.org/2001/XMLSchema-instance"</span><span style="color:#ff0000;"> xmlns:xsd</span><span style="color:#0000ff;">="http://www.w3.org/2001/XMLSchema"</span><span style="color:#0000ff;">&gt;</span><span style="color:#000000;">
  </span><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">cm </span><span style="color:#ff0000;">xsi:type</span><span style="color:#0000ff;">="add"</span><span style="color:#0000ff;">&gt;</span><span style="color:#000000;">
    </span><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">cpi</span><span style="color:#0000ff;">&gt;</span><span style="color:#000000;">
      </span><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">name</span><span style="color:#0000ff;">&gt;</span><span style="color:#000000;">RouteDirectToTP</span><span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">name</span><span style="color:#0000ff;">&gt;</span><span style="color:#000000;">
      </span><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">namespace</span><span style="color:#0000ff;">&gt;</span><span style="color:#000000;">http://schemas.microsoft.com/BizTalk/2003/system-properties</span><span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">namespace</span><span style="color:#0000ff;">&gt;</span><span style="color:#000000;">
      </span><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">value</span><span style="color:#0000ff;">&gt;</span><span style="color:#000000;">True</span><span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">value</span><span style="color:#0000ff;">&gt;</span><span style="color:#000000;">
      </span><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">type</span><span style="color:#0000ff;">&gt;</span><span style="color:#000000;">Boolean</span><span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">type</span><span style="color:#0000ff;">&gt;</span><span style="color:#000000;">
      </span><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">promoted</span><span style="color:#0000ff;">&gt;</span><span style="color:#000000;">true</span><span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">promoted</span><span style="color:#0000ff;">&gt;</span><span style="color:#000000;">
    </span><span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">cpi</span><span style="color:#0000ff;">&gt;</span><span style="color:#000000;">
  </span><span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">cm</span><span style="color:#0000ff;">&gt;</span><span style="color:#000000;">
</span><span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">cmc</span><span style="color:#0000ff;">&gt;</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></p>
</div>
<p>The ContextManipulator pipeline component allows to add, remove, map, change, promote and demote context properties.</p>
<p>Below a screenshot of using the WCF Test Client to receive a response using the above sample:</p>
<p><a href="http://bveldhoen.files.wordpress.com/2011/01/wcftestclient.jpg"><img style="display:inline;border-width:0;" title="WCFTestClient" src="http://bveldhoen.files.wordpress.com/2011/01/wcftestclient_thumb.jpg?w=752&#038;h=421" border="0" alt="WCFTestClient" width="752" height="421" /></a></p>
<p>You can <a href="http://cid-2842888be528bd06.office.live.com/browse.aspx/.Public?uc=1">download the sample from my skydrive</a>. It includes the sources for the ContextManipulator pipeline component.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bveldhoen.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bveldhoen.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bveldhoen.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bveldhoen.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bveldhoen.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bveldhoen.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bveldhoen.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bveldhoen.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bveldhoen.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bveldhoen.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bveldhoen.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bveldhoen.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bveldhoen.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bveldhoen.wordpress.com/190/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bveldhoen.wordpress.com&amp;blog=11293792&amp;post=190&amp;subd=bveldhoen&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bveldhoen.wordpress.com/2011/01/12/map-request-to-response-in-biztalk-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f352a7a81e78c1dff1275698642d6ff6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bveldhoen</media:title>
		</media:content>

		<media:content url="http://bveldhoen.files.wordpress.com/2011/01/maprequesttoresponse.jpg" medium="image">
			<media:title type="html">MapRequestToResponse</media:title>
		</media:content>

		<media:content url="http://bveldhoen.files.wordpress.com/2011/01/wcftestclient_thumb.jpg" medium="image">
			<media:title type="html">WCFTestClient</media:title>
		</media:content>
	</item>
		<item>
		<title>Sela Developer Practice samples</title>
		<link>http://bveldhoen.wordpress.com/2010/09/05/sela-developer-practice-samples/</link>
		<comments>http://bveldhoen.wordpress.com/2010/09/05/sela-developer-practice-samples/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 19:03:09 +0000</pubDate>
		<dc:creator>Bram Veldhoen</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Duplex]]></category>
		<category><![CDATA[NetEventRelayBinding]]></category>
		<category><![CDATA[Sela]]></category>
		<category><![CDATA[Yahoo finance service]]></category>

		<guid isPermaLink="false">http://bveldhoen.wordpress.com/?p=47</guid>
		<description><![CDATA[Yesterday 29-12-2009 we presented at the Sela Developer Practice in a session on the BizTalk ESB Toolkit 2.0 and the Windows Azure platform AppFabric .NET ServiceBus. We demonstrated some samples, which are available in this post. The first sample involves &#8230; <a href="http://bveldhoen.wordpress.com/2010/09/05/sela-developer-practice-samples/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bveldhoen.wordpress.com&amp;blog=11293792&amp;post=47&amp;subd=bveldhoen&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Yesterday 29-12-2009 we presented at the <a href="http://www.sela.co.il/">Sela Developer Practice</a> in a session on the BizTalk ESB Toolkit 2.0 and the Windows Azure platform AppFabric .NET ServiceBus. We demonstrated some samples, which are available in this post.</p>
<p><a href="http://cid-2842888be528bd06.skydrive.live.com/self.aspx/.Public/Sela.SDP09.BizTalk.ESB.zip">The first sample</a> involves using BizTalk to publish messages on the .NET ServiceBus using the NetEventRelayBinding. The information, published by BizTalk, is retrieved from the yahoo finance website. This part of the demo was inspired by <a href="http://kentweare.blogspot.com/2009/06/adventures-with-http-adapter-and-yahoo.html">Kent Weare&#8217;s blog</a> on consuming the Yahoo finance webservice from BizTalk. After transforming the csv file format, provided by the yahoo finance webservice, it&#8217;s published on the .NET ServiceBus and consumed by a console application client.</p>
<p><a href="http://cid-2842888be528bd06.skydrive.live.com/self.aspx/.Public/Sela%20Duplex%20Sample.zip">The second sample</a> involves duplex communication using the NetTcpRelayBinding. It&#8217;s amazing to see that sessionful duplex can be performed accross the .NET ServiceBus. Hope you enjoy!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bveldhoen.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bveldhoen.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bveldhoen.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bveldhoen.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bveldhoen.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bveldhoen.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bveldhoen.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bveldhoen.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bveldhoen.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bveldhoen.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bveldhoen.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bveldhoen.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bveldhoen.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bveldhoen.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bveldhoen.wordpress.com&amp;blog=11293792&amp;post=47&amp;subd=bveldhoen&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bveldhoen.wordpress.com/2010/09/05/sela-developer-practice-samples/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f352a7a81e78c1dff1275698642d6ff6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bveldhoen</media:title>
		</media:content>
	</item>
		<item>
		<title>Debatching, aggregation and resequencing using the BizTalk ESB Toolkit 2.0 and ESB.Extensions</title>
		<link>http://bveldhoen.wordpress.com/2010/09/05/debatching-aggregation-and-resequencing-using-the-biztalk-esb-toolkit-2-0-and-esb-extensions/</link>
		<comments>http://bveldhoen.wordpress.com/2010/09/05/debatching-aggregation-and-resequencing-using-the-biztalk-esb-toolkit-2-0-and-esb-extensions/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 19:02:08 +0000</pubDate>
		<dc:creator>Bram Veldhoen</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[Aggregation]]></category>
		<category><![CDATA[Aggregator]]></category>
		<category><![CDATA[Debatcher]]></category>
		<category><![CDATA[Debatching]]></category>
		<category><![CDATA[ESB Toolkit]]></category>
		<category><![CDATA[Resequencer]]></category>
		<category><![CDATA[Resequencing]]></category>

		<guid isPermaLink="false">http://bveldhoen.wordpress.com/?p=45</guid>
		<description><![CDATA[The ESB.Extensions framework is out!! You can download it here. The ESB.Extensions builds on top of the ESB Toolkit 2.0, and thus requires BizTalk Server 2009. The ESB.Extensions contains a number of services, that are itinerary-aware: ReceivePipelineService, SendPipelineService, ResequencerService and ResequencerGoService. &#8230; <a href="http://bveldhoen.wordpress.com/2010/09/05/debatching-aggregation-and-resequencing-using-the-biztalk-esb-toolkit-2-0-and-esb-extensions/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bveldhoen.wordpress.com&amp;blog=11293792&amp;post=45&amp;subd=bveldhoen&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The ESB.Extensions framework is out!! You can <a href="http://esbextensions.codeplex.com/">download it here</a>.</p>
<p>The ESB.Extensions builds on top of the ESB Toolkit 2.0, and thus requires BizTalk Server 2009. The ESB.Extensions contains a number of services, that are itinerary-aware: ReceivePipelineService, SendPipelineService, ResequencerService and ResequencerGoService. Let&#8217;s look at them more closely.</p>
<p><strong>The ReceivePipelineService</strong></p>
<p>When the ReceivePipelineService executes, the following steps are performed:</p>
<ol>
<li>Receives a message.</li>
<li>Uses the resolution framework to resolve the receive pipeline type.</li>
<li>Executes the receive pipeline.</li>
<li>[Optional] If the pipeline didn&#8217;t set these properties, assigns BatchId and SequenceId promoted properties to the pipeline output message(s).</li>
<li>[Optional] If the resolution (resolutionDictionary) included a new itinerary for the pipeline output message, this new itinerary is applied to the pipeline output message(s), and the original itinerary is reserved for further processing of the original (inbound) message. If no itinerary was specified during the resolution, it is assumed that the pipeline output message(s) should continue the itinerary of the original message, and processing of the original message is discontinued.</li>
<li>Publishes the pipeline output messages.</li>
<li>[Optional] If a new itinerary was specified for the pipeline output message(s) during resolution, advances the itinerary of the original message and publishes the original inbound message (if it had outstanding itinerary steps).</li>
</ol>
<p>The following drawing depicts an itinerary, which I have titled &#8220;OneWay-Debatch-MessageSendPort&#8221; (ODM) that uses the ReceivePipelineService:</p>
<div id="attachment_107" class="wp-caption aligncenter" style="width: 155px"><a href="http://bveldhoen.files.wordpress.com/2010/09/odm1.jpg"><img class="size-full wp-image-107" title="ODM" src="http://bveldhoen.files.wordpress.com/2010/09/odm1.jpg?w=640" alt=""   /></a><p class="wp-caption-text">OnRamp, Debatch, MessageSendPort</p></div>
<p> </p>
<p>Fairly simple scenario, you send an order batch through an itinerary onramp to BizTalk, where the ReceivePipelineService orchestration will pick it up, debatch it using the receive pipeline, and forwards the order items to the Message SendPort. (i.e. bound to a FILE location).</p>
<p>Debatching is one obvious application for the ReceivePipelineService, but you can specify any receive pipeline type in the resolver, so it can also be a 1:1 scenario where the pipeline has only 1 output message. I&#8217;m fairly certain that it will not work with FFDisAsm pipelines, though!</p>
<p><strong>The SendPipelineService</strong></p>
<p>When the SendPipelineService executes, the following steps are performed:</p>
<ol>
<li>Receives the 1<sup>st</sup> message within the batch of messages to be executed by the send pipeline. After receipt of this 1st message, a convoy subscription is created based on the Itinerary (should point to SendPipelineService) and the BatchId.</li>
<li>Resolves the SendPipelineServiceResolution object, necessary to perform the execution of the send pipeline. This resolution object contains the following parameters:
<ul>
<li>Send pipeline type: the type of the send pipeline to execute.</li>
<li>XLANGMessageComparer type: The SendPipelineService uses a serializable list to collect the messages to be aggregated. You can specify the comparer type to control how the messages are sorted. This happens in memory, but does not add much overhead compared to the use of Microsoft.XLANGs.Pipeline.SendPipelineInputMessages. I used an XLANGMessage comparer that compares the messages&#8217;s SequenceId promoted property values.</li>
<li>Batch Timeout: The timeout to apply to the entire batch. When this timeout expires, all the collected messages up to that point in time will be aggregated and the service completes.</li>
<li>Message Timeout: The timeout to apply to each message. When this timeout expires, all the collected messages up to that point in time will be aggregated and the service completes.</li>
</ul>
</li>
<li>[Optional] If a new itinerary was specified during resolution, the new itinerary will be applied to the pipeline output message, and the original inbound message will continue it&#8217;s own itinerary. If no new itinerary was specified, it is assumed that the original inbound message&#8217;s itinerary should be applied to the aggregated message. So, if a new itinerary was specified, the original message&#8217;s itinerary is advanced and applied to the original message, and the original message is republished for further processing.</li>
<li>The inbound message is added to a list of pipeline input messages.</li>
<li>The receive loop (batch convoy) starts.</li>
<li>The next message within the batch is received and added to the list of pipeline input messages.</li>
<li>[Optional] Like in step 3, if necessary, the original message&#8217;s itinerary is advanced and the message republished.</li>
<li>When all messages have been received (or when a Batch or Message Timeout has occurred), the receive loop (and the corresponding batch convoy) is ended.</li>
<li>The pipeline input messages are sorted using the XLANGMessageComparer type, specified in the resolver.</li>
<li>The itinerary (new or original advanced) is applied to the pipeline output message, and the message is published.</li>
</ol>
<p>Below a scenario that uses both the ReceivePipelineService and the SendPipelineService:</p>
<div id="attachment_108" class="wp-caption aligncenter" style="width: 155px"><a href="http://bveldhoen.files.wordpress.com/2010/09/odam1.jpg"><img class="size-full wp-image-108" title="ODAM" src="http://bveldhoen.files.wordpress.com/2010/09/odam1.jpg?w=640" alt=""   /></a><p class="wp-caption-text">OnRamp, Debatch, Aggregate, MessageSendPort</p></div>
<p>An orderbatch gets sent through an itinerary onramp, gets debatched by the ReceivePipelineService. The resolver does not specify a new itinerary, so the original message&#8217;s itinerary is used for the debatched messages. The debatched messages all have the same BatchId, and have a current itinerary step that points to the SendPipelineService, so they get picked up by the SendPipelineService. The SendPipelineService sorts and aggregates the messages, and publishes one output message, which is sent to the offramp.</p>
<p><strong>The Resequencer and ResequencerGo services</strong></p>
<p>The idea for these services actually came from a TechEd (2006?) session, where Lee Graber detailed the use of the (what he called) Go-pattern to implement a resequencer. The Resequencer and ResequencerGo services work together to resequence any given sequence of messages. The ResequencerService blocks processing of a certain message until it receives the corresponding Go message (by using a parallel convoy). The ResequencerGoService&#8217;s responsibility is to work out which message within the sequence is up next and publishes the corresponding Go message.</p>
<p>The ESB.Extension implementation let&#8217;s the resolver decide which message is up next, so the resolver (i.e. BRE) could access a database or any other (in-memory?) representation of the message sequence (or batch) to determine who&#8217;s next. In my BizUnit tests I have used the simplest possible scenario, where the maximum number of messages is always 5 and the next SequenceId is simple determined by incrementing by 1.</p>
<p>Below a scenario that uses the debatcher, aggregator and resequencer services:</p>
<div id="attachment_109" class="wp-caption aligncenter" style="width: 409px"><a href="http://bveldhoen.files.wordpress.com/2010/09/odram1.jpg"><img class="size-full wp-image-109" title="ODRAM" src="http://bveldhoen.files.wordpress.com/2010/09/odram1.jpg?w=640" alt=""   /></a><p class="wp-caption-text">OnRamp, Debatch, Resequence, Aggregate, MessageSendPort</p></div>
<p> </p>
<p>In this scenario, the orderbatch gets debatched, every order item gets picked up by a seperate Sequencer instance. The 1st Go message, corresponding to the 1st message (SequenceId == 0) is sent to BizTalk, triggering the 1st Resequencer to release the 1st message. That message gets picked up by the SendPipelineService, and the SendPipelineService stores the pipeline input message, then itinerary-advances and republishes the original message, which triggers the ResequencerGoService to increment to the next SequenceId and publish the corresponding Go message. This process repeates until all messages have been processed (the ResequencerGo&#8217;s resolution works out when it is the last message and does not publish a new Go message when it is the last). The SendPipelineService aggregates the message, applies the itinerary and ships it off to the offramp.</p>
<p><strong>Conclusion</strong></p>
<p>A select number of scenarios has been described here, and these are also the scenarios that have been tested. But there can be many many other scenarios, ranging from likely to not-in-a-million-years, that could be implemented with these services:</p>
<ul>
<li>Receiving incoming messages for a certain interval (24 hours?), then sort and aggregate them and sending them off.</li>
<li>Debatching, sending the seperate items to web services, aggregating the responses, sending them back to the caller. (Doesn&#8217;t work yet because Request-Response hasn&#8217;t been implemented yet; future version)</li>
<li>Receiving incoming messages, block them with the ResequencerService, after a specified interval, start sending the messages to another system in a specified order.</li>
<li>If I missed an obvious scenario, please drop a comment!</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bveldhoen.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bveldhoen.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bveldhoen.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bveldhoen.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bveldhoen.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bveldhoen.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bveldhoen.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bveldhoen.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bveldhoen.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bveldhoen.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bveldhoen.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bveldhoen.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bveldhoen.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bveldhoen.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bveldhoen.wordpress.com&amp;blog=11293792&amp;post=45&amp;subd=bveldhoen&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bveldhoen.wordpress.com/2010/09/05/debatching-aggregation-and-resequencing-using-the-biztalk-esb-toolkit-2-0-and-esb-extensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f352a7a81e78c1dff1275698642d6ff6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bveldhoen</media:title>
		</media:content>

		<media:content url="http://bveldhoen.files.wordpress.com/2010/09/odm1.jpg" medium="image">
			<media:title type="html">ODM</media:title>
		</media:content>

		<media:content url="http://bveldhoen.files.wordpress.com/2010/09/odam1.jpg" medium="image">
			<media:title type="html">ODAM</media:title>
		</media:content>

		<media:content url="http://bveldhoen.files.wordpress.com/2010/09/odram1.jpg" medium="image">
			<media:title type="html">ODRAM</media:title>
		</media:content>
	</item>
		<item>
		<title>My beef with the ESB Toolkit 2.0 resolution framework</title>
		<link>http://bveldhoen.wordpress.com/2010/09/05/my-beef-with-the-esb-toolkit-2-0-resolution-framework/</link>
		<comments>http://bveldhoen.wordpress.com/2010/09/05/my-beef-with-the-esb-toolkit-2-0-resolution-framework/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 19:00:59 +0000</pubDate>
		<dc:creator>Bram Veldhoen</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[ESB Toolkit]]></category>
		<category><![CDATA[Resolution Framework]]></category>

		<guid isPermaLink="false">http://bveldhoen.wordpress.com/?p=43</guid>
		<description><![CDATA[Lately, I have been working on an extension for the ESB Toolkit 2.0 for BizTalk Server 2009. It can be found here on CodePlex. More posts about this ESB.Extensions solution will follow later, this particular post will describe why I &#8230; <a href="http://bveldhoen.wordpress.com/2010/09/05/my-beef-with-the-esb-toolkit-2-0-resolution-framework/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bveldhoen.wordpress.com&amp;blog=11293792&amp;post=43&amp;subd=bveldhoen&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Lately, I have been working on an extension for the ESB Toolkit 2.0 for BizTalk Server 2009. <a href="http://esbextensions.codeplex.com/">It can be found here on CodePlex</a>. More posts about this ESB.Extensions solution will follow later, this particular post will describe why I think the ESB Toolkit&#8217;s resolution framework should be improved.  </p>
<p>A short summary of how the ESB Toolkit resolution framework works. Resolvers are configured in the esb.config file using a specific name that can be coupled to a .NET type that needs to implement IResolveProvider. From the esb.config:  </p>
<pre>&lt;resolver name="BRE" type="Microsoft.Practices.ESB.Resolver.BRE.ResolveProvider, Microsoft.Practices.ESB.Resolver.BRE, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;</pre>
<p>The above type implements IResolveProvider, and the ESB Toolkit provides a ResolverMgr and ResolverConfigHelper to allow for retrieving and caching the appropriate resolver types when the resolvers are retrieved from the itinerary and to be used by the itinerary service.  </p>
<p>Let&#8217;s look at IResolveProvider:  </p>
<pre>public interface IResolveProvider
{
    Dictionary&lt;string, string&gt; Resolve(ResolverInfo resolverInfo, XLANGMessage message);
    Dictionary&lt;string, string&gt; Resolve(string config, string resolver, XmlDocument message);
    Dictionary&lt;string, string&gt; Resolve(string config, string resolver, IBaseMessage message, IPipelineContext pipelineContext);
}</pre>
<p>IResolveProvider provides three methods that all perform more or less the same task: resolve some information into a Dictionary&lt;string, string&gt;. My main problem with this approach it that everything that needs to be resolved needs to be in the form of string in order to be applicable for this way of resolution. I would expect a generic resolution framework to be more generic than that!  </p>
<p>To make matters worse, there are limitations to which keys you are allowed to use in the resolution dictionary, if you&#8217;re using the out of the box resolvers (i.e. the BRE resolver). Basically, you&#8217;re stuck with the keys that are provided on the Microsoft.Practices.ESB.Resolver.Resolution type:  </p>
<pre>[Serializable]
public sealed class Resolution : IContextParameters, ITransformParameters, IEndpointParameters
{
    ... private members &amp; constructor (left out for brevity) ...  

    public string Action { get; set; }
    public string ActionField { get; set; }
    public string CacheTimeout { get; set; }
    public string DocumentSpecNameField { get; set; }
    public string DocumentSpecStrongNameField { get; set; }
    public string EndpointConfig { get; set; }
    public string EpmRRCorrelationTokenField { get; set; }
    public bool FixJaxRpc { get; set; }
    public string InboundTransportLocationField { get; set; }
    public string InboundTransportTypeField { get; set; }
    public string InterchangeIdField { get; set; }
    public string IsRequestResponseField { get; set; }
    public string MessageExchangePattern { get; set; }
    public string MessageType { get; set; }
    public string MethodNameField { get; set; }
    public string OutboundTransportCLSID { get; set; }
    public string ReceiveLocationNameField { get; set; }
    public string ReceivePortNameField { get; set; }
    public bool Success { get; set; }
    public string TargetNamespace { get; set; }
    public string TransformType { get; set; }
    public string TransportLocation { get; set; }
    public string TransportNamespace { get; set; }
    public string TransportType { get; set; }
    public string WindowUserField { get; set; }
}</pre>
<p>Where the three Interfaces (IContextParameters, ITransformParameters, IEndpointParameters) all define a seperate set of properties (which are implemented by the Resolution type, see above).  </p>
<p>The resolvers use this Resolution type to fill the (more generic) Dictionary&lt;string, string&gt; type using ResolverMgr.SetResolverDictionary:  </p>
<pre>public static void SetResolverDictionary(Resolution resolution, Dictionary&lt;string, string&gt; ResolverDictionary)
{
    try
    {
        ResolverDictionary.Add("Resolver.Action", resolution.Action ?? string.Empty);
        ResolverDictionary.Add("Resolver.ActionField", resolution.ActionField ?? string.Empty);  

        ... more calls to ResolverDictionary.Add("Resolver.Xxx", resolution.Xxx ?? string.Empty); (removed for brevity) ...   

        ResolverDictionary.Add("Resolver.TransportType", resolution.TransportType ?? string.Empty);
        ResolverDictionary.Add("Resolver.WindowUserField", resolution.WindowUserField ?? string.Empty);
    }  

   ... some exception handling ...  

}</pre>
<p>This basically means that you can only work with the properties that the Resolution type provides. I see that as another limitation, because it means that the current resolvers are limited to only be able to resolve those properties. If I want to resolve a string value, that does not correspond to one of the properties of the Resolution type, I have two options:  </p>
<ul>
<li>Abuse one of the properties of the Resolution type. I.e. put a pipeline type name in the property TransformType. I started with this workaround, but it became a problem because I needed to resolve more complex objects than just strings (more on that later).</li>
<li>Write a custom Resolver. For instance, this means that I would need to implement a custom BRE resolver, that does resolution using the BRE in exactly the same way as the standard BRE resolver, just because of the different property.</li>
</ul>
<p>The conclusion is that at the moment, the resolvers are coupled to what those resolvers are actually resolving. That should be decoupled if you ask me.  </p>
<p>I took a stab at improving this situation by implementing a resolution framework that uses the following interface:  </p>
<pre>    public interface IResolutionProvider
    {
        ResolutionDictionary Resolve(ResolverInfo resolverInfo, XLANGMessage message);
        ResolutionDictionary Resolve(string config, string resolver, XmlDocument message);
        ResolutionDictionary Resolve(string config, string resolver, IBaseMessage message, IPipelineContext pipelineContext);
    }  

    [Serializable]
    public class ResolutionDictionary : Dictionary&lt;string, object&gt;, ISerializable
    {
        public ResolutionDictionary()
        {
        }  

        public void SetValue(string key, object value)
        {
            base.Add(key, value);
        }  

        public object GetValue(string key)
        {
            if (base.ContainsKey(key))
            {
                return base[key];
            }
            return null;
        }  

        public string GetString(string key)
        {
            return GetValue(key) as string;
        }
    }</pre>
<p>This dictionary allows resolvers to resolve anything, for as long as the resolution objects are serializable. It also allows for using any key value (string). The code, that&#8217;s calling this kind of resolution, will be responsible for casting the object to the type that it expects.  </p>
<p>The ESB.Extensions resolution framework, that uses the above IResolutionProvider and ResolutionDictionary, is still compatible with the esb configuration and the itinerary designer.  </p>
<p>A full example can be found the in the <a href="http://esbextensions.codeplex.com/">ESB.Extensions solution on codeplex</a>. I use the resolution framework there to resolve parameters needed in a couple of services: ReceivePipelineService, SendPipelineService and Resequencer services. I implemented some BRE vocabularies to enable for creating the resolution objects.  </p>
<p>Off course, any feedback is welcome!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bveldhoen.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bveldhoen.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bveldhoen.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bveldhoen.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bveldhoen.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bveldhoen.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bveldhoen.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bveldhoen.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bveldhoen.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bveldhoen.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bveldhoen.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bveldhoen.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bveldhoen.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bveldhoen.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bveldhoen.wordpress.com&amp;blog=11293792&amp;post=43&amp;subd=bveldhoen&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bveldhoen.wordpress.com/2010/09/05/my-beef-with-the-esb-toolkit-2-0-resolution-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f352a7a81e78c1dff1275698642d6ff6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bveldhoen</media:title>
		</media:content>
	</item>
		<item>
		<title>Promoted property bug in XmlDisAsm component?</title>
		<link>http://bveldhoen.wordpress.com/2010/09/05/promoted-property-bug-in-xmldisasm-component/</link>
		<comments>http://bveldhoen.wordpress.com/2010/09/05/promoted-property-bug-in-xmldisasm-component/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 19:00:04 +0000</pubDate>
		<dc:creator>Bram Veldhoen</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[Bug]]></category>
		<category><![CDATA[Pipeline]]></category>
		<category><![CDATA[Promoted Property]]></category>
		<category><![CDATA[XmlDisAsm Component]]></category>
		<category><![CDATA[XmlDisAssembler]]></category>

		<guid isPermaLink="false">http://bveldhoen.wordpress.com/?p=41</guid>
		<description><![CDATA[I have just uploaded a bug report (#477852 on Microsoft Connect) regarding a fairly specific scenario using the XmlReceive pipeline. It involves having an envelope and a document schema, in which the document schema contains an element (or attribute) that &#8230; <a href="http://bveldhoen.wordpress.com/2010/09/05/promoted-property-bug-in-xmldisasm-component/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bveldhoen.wordpress.com&amp;blog=11293792&amp;post=41&amp;subd=bveldhoen&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have just uploaded a bug report (#477852 on Microsoft Connect) regarding a fairly specific scenario using the XmlReceive pipeline. It involves having an envelope and a document schema, in which the document schema contains an element (or attribute) that is promoted <strong><em>both as a distinguished AND as a promoted property</em></strong>. In this case, after processing by the XmlReceive pipeline, the property is only present in the message context as a distinguished property, and <strong><em>NOT as a promoted property</em></strong>. Some other people may have experienced this same issue:</p>
<ul>
<li><a href="http://www.biztalkgurus.com/forums/p/12435/24295.aspx">http://www.biztalkgurus.com/forums/p/12435/24295.aspx</a> (Greg Forsythe nailed it)</li>
<li><a href="http://www.eggheadcafe.com/conversation.aspx?messageid=30040782&amp;threadid=30040773">http://www.eggheadcafe.com/conversation.aspx?messageid=30040782&amp;threadid=30040773</a></li>
<li><a href="http://www.tech-archive.net/Archive/BizTalk/microsoft.public.biztalk.server/2008-10/msg00018.html">http://www.tech-archive.net/Archive/BizTalk/microsoft.public.biztalk.server/2008-10/msg00018.html</a></li>
</ul>
<p>I reproduced this behaviour both on a BizTalk Server 2009 deployment and in standalone mode with the ExecuteRecievePipelineStep, found in BizUnit 3.1. See the screenshots below.</p>
<div id="attachment_113" class="wp-caption aligncenter" style="width: 650px"><a href="http://bveldhoen.files.wordpress.com/2010/09/schema02.jpg"><img class="size-full wp-image-113" title="Schema0" src="http://bveldhoen.files.wordpress.com/2010/09/schema02.jpg?w=640&#038;h=212" alt="" width="640" height="212" /></a><p class="wp-caption-text">Schema containing both promoted and distinguished property</p></div>
<div id="attachment_114" class="wp-caption aligncenter" style="width: 650px"><a href="http://bveldhoen.files.wordpress.com/2010/09/missingproperty.jpg"><img class="size-full wp-image-114" title="MissingProperty" src="http://bveldhoen.files.wordpress.com/2010/09/missingproperty.jpg?w=640&#038;h=108" alt="" width="640" height="108" /></a><p class="wp-caption-text">Message Context missing the promoted property</p></div>
<p>For BizUnit ExecuteReceivePipelineStep intimi: I used test T_015, added both a distinguished and a promoted property to the Child1Attribute1 attribute (which is of type string) from schema0.xsd, and pointed it to promoted Property2 (which is of type string); then I ran the test. The screenshots above show that the promoted Property2 property isn&#8217;t there.</p>
<p>I have not tested this with the Flat File Disassembler pipeline components.</p>
<p>A workaround for this bug is to define the schema to only use the promoted property, and use the promoted property syntax from within your orchestrations.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bveldhoen.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bveldhoen.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bveldhoen.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bveldhoen.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bveldhoen.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bveldhoen.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bveldhoen.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bveldhoen.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bveldhoen.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bveldhoen.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bveldhoen.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bveldhoen.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bveldhoen.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bveldhoen.wordpress.com/41/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bveldhoen.wordpress.com&amp;blog=11293792&amp;post=41&amp;subd=bveldhoen&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bveldhoen.wordpress.com/2010/09/05/promoted-property-bug-in-xmldisasm-component/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f352a7a81e78c1dff1275698642d6ff6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bveldhoen</media:title>
		</media:content>

		<media:content url="http://bveldhoen.files.wordpress.com/2010/09/schema02.jpg" medium="image">
			<media:title type="html">Schema0</media:title>
		</media:content>

		<media:content url="http://bveldhoen.files.wordpress.com/2010/09/missingproperty.jpg" medium="image">
			<media:title type="html">MissingProperty</media:title>
		</media:content>
	</item>
		<item>
		<title>BizTalk ESB Guidance 2.0 – Fixing the Itinerary OnRamp?</title>
		<link>http://bveldhoen.wordpress.com/2010/09/05/biztalk-esb-guidance-2-0-fixing-the-itinerary-onramp/</link>
		<comments>http://bveldhoen.wordpress.com/2010/09/05/biztalk-esb-guidance-2-0-fixing-the-itinerary-onramp/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 18:59:10 +0000</pubDate>
		<dc:creator>Bram Veldhoen</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[ESB Guidance]]></category>
		<category><![CDATA[ESB Toolkit]]></category>
		<category><![CDATA[Itinerary]]></category>
		<category><![CDATA[Itinerary OnRamp]]></category>

		<guid isPermaLink="false">http://bveldhoen.wordpress.com/?p=39</guid>
		<description><![CDATA[First off, for a very good presentation about what an ESB could be, watch Mark Richards here. Recently, I have taken a look at the new-and-improved ESB Guidance 2.0 for BizTalk Server 2009 Beta. The ESB Guidance contains some interesting &#8230; <a href="http://bveldhoen.wordpress.com/2010/09/05/biztalk-esb-guidance-2-0-fixing-the-itinerary-onramp/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bveldhoen.wordpress.com&amp;blog=11293792&amp;post=39&amp;subd=bveldhoen&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-family:Arial;">First off, for a very good presentation about what an ESB could be, watch Mark Richards <a href="http://www.infoq.com/presentations/Enterprise-Service-Bus">here</a>. </span></p>
<p><span style="font-family:Arial;">Recently, I have taken a look at the <a href="http://www.codeplex.com/esb">new-and-improved ESB Guidance 2.0 for BizTalk Server 2009 Beta</a>. The ESB Guidance contains some interesting and potentially powerful concepts. Where BizTalk provides ESB-functionality out of the box (routing, transformation, etc., etc.), the ESB Guidance allows for a much more dynamic approach to realize these functionalities. With ESB Guidance, the majorities of these functionalities (i.e. dynamic routing and/or dynamic transformation) can be used by the client applications of the ESB (the systems sending messages to BizTalk) in the form of an ESB Guidance specific soap header called an Itinerary header. These Itinerary headers describe the processing steps that the message should go through within the ESB, and this Itinerary header could be different per message if that were necessary.</span></p>
<p><span style="font-family:Arial;">This approach offers a great deal of flexibility, because per each separate message coming from one of the ESB clients, it&#8217;s path through the ESB can be set individually. However, it also means that those clients will need to be aware of the ESB Guidance Itinerary concept and have some way to add the Itinerary headers in the soap header of the message. Next to that, if there are changes to or within the ESB (configuration changes, system replacements), there&#8217;s a chance that the Itinerary header will have to be changed as well.</span></p>
<p><span style="font-family:Arial;">In order to circumvent introducing this dependency of the ESB clients to the Itinerary concept, wouldn&#8217;t it be a good idea to have the ESB be responsible for assigning the Itinerary headers? The most obvious place I can think of doing just that would be in a custom pipeline component, which can be configured with the appropriate Itinerary information, and which will just add this Itinerary header to the message as it comes in into the ESB. Taking this approach, <a href="http://www.masteringbiztalk.com/blogs/jon/PermaLink,guid,85e75dc6-a3fa-42b0-bd11-a3a0d29168a9.aspx">the ContextAdder pipeline component, written by Jon Flanders</a>, comes to mind. Using the ContextAdder, together with <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=8c2572a2-fb61-4016-a7a7-1c37518b39ff&amp;displaylang=en">Saravana Kumar&#8217;s article on design-time properties for custom pipeline components</a>, I came up with a sample that does as I described above. You can <a href="http://esbextensions.codeplex.com/">download it here</a>. BTW, the pipeline component in this sample writes or promotes any set of properties you want it to, it&#8217;s not specific to Itineraries.</span></p>
<p><span style="font-family:Arial;">The sample needs BizTalk 2009 and ESB Guidance 2.0. I worked with the ESB Guidance 2.0 October 2008 release, so there may be some discrepancies when using it with the January 2009 release. Configuring the pipeline component is somewhat tedious, as the xml syntax needs to be very specific (especially regarding &amp;amp;lt;, &amp;lt; and &lt;). If using it for real, a way to programmatically generate the config would be a good enhancement.</span></p>
<p>The sample uses FILE receive locations only and uses a very simple Itinerary that uses the orchestration routing and transformation services, configured with the STATIC resolvers. A screenshot of the pipeline configuration is displayed below.</p>
<div id="attachment_116" class="wp-caption aligncenter" style="width: 650px"><a href="http://bveldhoen.files.wordpress.com/2010/09/configurepipelinescreenshot.jpg"><img class="size-full wp-image-116" title="ConfigurePipelineScreenshot" src="http://bveldhoen.files.wordpress.com/2010/09/configurepipelinescreenshot.jpg?w=640&#038;h=376" alt="" width="640" height="376" /></a><p class="wp-caption-text">Fixed Itinerary OnRamp Pipeline Configuration</p></div>
<p><span style="font-family:Arial;">I&#8217;d be very interested in other&#8217;s thoughts on this approach, so drop me a comment!</span></p>
<p>[27-02-2009] Nick Hauenstein pointed out that the January 2009 CTP2 release of ESB Guidance 2.0 contains a much better way to achieve the same result: static Itineraries, which can be set within a pipeline component. <a href="http://www.quicklearn.com/blog/post/ESB-Guidance-20-Build-Loosely-Coupled-Solutions-You-Can-Be-Proud-Of.aspx">Check out his post</a>!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bveldhoen.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bveldhoen.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bveldhoen.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bveldhoen.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bveldhoen.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bveldhoen.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bveldhoen.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bveldhoen.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bveldhoen.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bveldhoen.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bveldhoen.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bveldhoen.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bveldhoen.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bveldhoen.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bveldhoen.wordpress.com&amp;blog=11293792&amp;post=39&amp;subd=bveldhoen&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bveldhoen.wordpress.com/2010/09/05/biztalk-esb-guidance-2-0-fixing-the-itinerary-onramp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f352a7a81e78c1dff1275698642d6ff6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bveldhoen</media:title>
		</media:content>

		<media:content url="http://bveldhoen.files.wordpress.com/2010/09/configurepipelinescreenshot.jpg" medium="image">
			<media:title type="html">ConfigurePipelineScreenshot</media:title>
		</media:content>
	</item>
	</channel>
</rss>
