<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-14758839</atom:id><lastBuildDate>Sat, 27 Feb 2010 18:17:12 +0000</lastBuildDate><title>Yossi Dahan [BizTalk]</title><description>Yossi Dahan is a business processes and integration consultant living and working in the UK and focusing mostly on Microsoft technologies namely .net and Microsoft BizTalk Server.

Through his blog Yossi hopes to share the challanges, successes and failures he faces day by day, as well as just general thoughts and ideas around the technologies.</description><link>http://www.sabratech.co.uk/blogs/yossidahan/default.html</link><managingEditor>noreply@blogger.com (Yossi Dahan)</managingEditor><generator>Blogger</generator><openSearch:totalResults>244</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-5560156425493634078</guid><pubDate>Sat, 20 Feb 2010 17:01:00 +0000</pubDate><atom:updated>2010-02-20T17:01:43.090Z</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Admin console</category><category domain='http://www.blogger.com/atom/ns#'>BizTalk</category><title>BizTalk Admin Console</title><description>&lt;p&gt;Anything you missing there? anything you don’t like? &lt;/p&gt;  &lt;p&gt;I’m trying to compile a list of suggestions for it, put a comment or drop me a line….&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-5560156425493634078?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2010/02/biztalk-admin-console.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>7</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-3692425235877141141</guid><pubDate>Thu, 18 Feb 2010 13:14:00 +0000</pubDate><atom:updated>2010-02-18T13:14:25.486Z</atom:updated><category domain='http://www.blogger.com/atom/ns#'>BizTalk</category><category domain='http://www.blogger.com/atom/ns#'>SOAP</category><title>More on using the SOAP adapter without a web reference</title><description>&lt;p&gt;Every now and then I am drawn to implement a call to a web service using the SOAP adapter and without adding a web reference. &lt;/p&gt;  &lt;p&gt;I wrote about it in the past &lt;a href="http://www.sabratech.co.uk/blogs/yossidahan/2008/11/calling-service-without-adding.html" target="_blank"&gt;here&lt;/a&gt;, as did others, for example consider &lt;a href="http://seroter.wordpress.com/2007/04/02/consuming-web-services-in-biztalk-without-web-reference/" target="_blank"&gt;Richard Seroter&lt;/a&gt;, &lt;a href="http://blogs.digitaldeposit.net/saravana/post/2007/01/31/Calling-Web-Service-from-BizTalk-2006-in-a-Messaging-only-Scenario-(aka-Content-based-Routing).aspx" target="_blank"&gt;Saravana Kumar&lt;/a&gt; and &lt;a href="http://www.jonfancey.com/default.aspx?key=2006-11-08T20:48:14Z" target="_blank"&gt;Jon Fancy&lt;/a&gt;’s articles on the subject.&lt;/p&gt;  &lt;p&gt;Last time I had to do this, though, a couple of months ago, I bumped into a puzzling error, which took some time to understand.&lt;/p&gt;  &lt;p&gt;In the scenario I had I needed to modify the message in the pipeline, and - being the good citizen that I am (?) - my pipeline component created a new message and did not return the same message it had received.&lt;/p&gt;  &lt;p&gt;When my message hit the adapter it got suspended with the error - &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Failed to load &amp;quot;&amp;quot; type.&lt;/p&gt;    &lt;p&gt;Please verify the fully-qualified type name is valid.&lt;/p&gt;    &lt;p&gt;Details: &amp;quot;&amp;quot;.&lt;/p&gt;    &lt;p&gt;The type must derive from System.Web.Services.Protocols.SoapHttpClientProtocol.&lt;/p&gt;    &lt;p&gt;The type must have the attribute System.Web.Services.WebServiceBindingAttribute.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;In my scenario the proxy was provided for the SOAP adapter via its configuration in the send port explicitly as per Richard’s post, so I was very confused about the empty type definitions in the error message. &lt;/p&gt;  &lt;p&gt;Some investigation revealed the cause – the send port configuration is read at the beginning of the pipeline and these settings are set in the outgoing message’s context.&lt;/p&gt;  &lt;p&gt;My pipeline component created a new message and did not copy these properties to the new message, so when it arrived at the adapter, which tries to read them, the empty definitions were found.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-3692425235877141141?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2010/02/more-on-using-soap-adapter-without-web.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-715346777968600612</guid><pubDate>Sat, 13 Feb 2010 07:43:00 +0000</pubDate><atom:updated>2010-02-13T07:43:03.464Z</atom:updated><category domain='http://www.blogger.com/atom/ns#'>BizTalk</category><category domain='http://www.blogger.com/atom/ns#'>Deployment</category><title>On MSIs and Default Bindings</title><description>&lt;p&gt;Some observations (I’ll you to draw your own conclusions, for a change) - &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;When you import an MSI, any default binding in it will always be imported, then any binding matching the environment selected in the import MSI wizard (if selected)&lt;/li&gt;    &lt;li&gt;If the second binding contains any settings that were already created as part of the first binding, they will be overwritten &lt;/li&gt;    &lt;li&gt;When you export an MSI, a binding file is created with the existing configuration as the default binding, even if you did not add one as a resource explicitly. This binding will be imported first, before any other binding. &lt;/li&gt;    &lt;li&gt;In the case of receive locations – if two bindings in the MSI contain receive locations for the same port each marked as primary, the last one imported will be the primary receive location. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Why am I writing this? &lt;/p&gt;  &lt;p&gt;We had an odd case (which shouldn’t really happen) where we created an application with a particular receive location.    &lt;br /&gt;We have then added a binding file for another environment in which we have misspelled the receive location name (the URI was the same)&lt;/p&gt;  &lt;p&gt;When we tried to import the MSI to the second environment, selecting the environment name in the import MSI wizard we received an error that looked something like this - &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_7lqvqdOFqOU/S3ZYAsDas7I/AAAAAAAAAKw/DDc9o3iyDWg/s1600-h/image001%5B4%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image001" border="0" alt="image001" src="http://lh3.ggpht.com/_7lqvqdOFqOU/S3ZYBlBOqBI/AAAAAAAAAK0/Z7kECA8mWaI/image001_thumb%5B2%5D.png?imgmax=800" width="476" height="400" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;(for the search engines: “Cannot update receive location”, “Address should be unique for Receive Location”)&lt;/p&gt;  &lt;p&gt;The reason was that the wizard imported the MSI and initially applied the default binding creating the receive location with the first name. It then went on to import the second, environment specific, binding file, now trying to add a new receive location with the different name but failing as the URIs are the same. had the name been the same the receive location would have been overwritten, had the URI been different a second one would have been successfully added, but given this weird combination the error was produced.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-715346777968600612?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2010/02/on-msis-and-default-bindings.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-6807830544641774797</guid><pubDate>Sun, 07 Feb 2010 06:48:00 +0000</pubDate><atom:updated>2010-02-07T06:48:42.094Z</atom:updated><title>Developing Streaming Pipeline Components</title><description>&lt;p&gt;A couple of months ago I published &lt;a href="http://www.sabratech.co.uk/blogs/yossidahan/2009/12/what-not-to-do-avoid-reading-entire.html" target="_blank"&gt;this post&lt;/a&gt; suggesting that pipeline component developers should look to design those in a streaming fashion which avoids loading the message into memory.&lt;/p&gt;  &lt;p&gt;Quite a few people contacted me asking for an example so eventually I sat down to create one.&lt;/p&gt;  &lt;p&gt;Creating the sample warranted writing down an explanation for it, which turned out rather long and (hopefully) elaborate, so i turned that into an article and, I’m proud to say, has now been &lt;a href="http://msdn.microsoft.com/en-us/library/ff384124(BTS.10).aspx" target="_blank"&gt;published on MSDN&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;In the article I wanted I wanted to demonstrate a realistic case, which doesn’t necessarily take the “easy path” and yet is clear enough to demonstrate the principles without overwhelming the reader; primarily I felt it was important to show a sample that modifies the stream (and not just using information from it) as these tend to be more complex. &lt;/p&gt;  &lt;p&gt;Hopefully I have managed to provide a good demonstration of the principle. Let me know…&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-6807830544641774797?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2010/02/developing-streaming-pipeline.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-1605607265049519634</guid><pubDate>Wed, 03 Feb 2010 17:55:00 +0000</pubDate><atom:updated>2010-02-03T17:55:22.848Z</atom:updated><title>I guess I could consider this a compliment, but I’m not happy!</title><description>&lt;p&gt;A few months ago I found out that a chap called Jason Hyland, who is another BizTalk consultant here in the UK, has nicked the contents of my web site to his own. word for word. &lt;/p&gt;  &lt;p&gt;Despite the hidden compliment (I guess it means I write reasonably well) I was not very happy and so I thought I’d drop Jason a polite note. &lt;/p&gt;  &lt;p&gt;I never received a response for my email, but several days later his web site was down, so I assumed he accepted this wasn’t nice and is working on his own wording. I guess I was wrong as today I was reminded of that and decided to check what he has done, and what do you know - &lt;a href="http://www.needlecast.co.uk/services"&gt;http://www.needlecast.co.uk/services&lt;/a&gt; still uses, word for word, the wording from my web site.&lt;/p&gt;  &lt;p&gt;How bad is that?!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Jason – at the off chance that you’re reading this – here’s some free publicity on my blog (currently averaging around 160 unique visitors per day) – write your own stuff, I’ve done it, so it can’t be that difficult, and it will be the decent thing to do.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Yossi&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-1605607265049519634?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2010/02/i-guess-i-could-consider-this.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-9040860886297836396</guid><pubDate>Wed, 03 Feb 2010 17:12:00 +0000</pubDate><atom:updated>2010-02-03T17:12:45.742Z</atom:updated><title>Wrong impressions with MaxConnection</title><description>&lt;p&gt;Recently we’ve done some performance tuning on aspects of our solution, and as part of that we’ve looked at configuring the system.net maxCnnections setting (see Darren Jeffords &lt;a href="http://blogs.msdn.com/darrenj/archive/2005/03/07/386655.aspx" target="_blank"&gt;post&lt;/a&gt; on this subject) to increase the number of concurrent calls our application can make to various services it uses. &lt;/p&gt;  &lt;p&gt;We’ve looked at this for our BizTalk solution but also for a complex, multi-threaded smart client we’re building.&lt;/p&gt;  &lt;p&gt;Initially some have been somewhat sceptical about the effects of this, despite all the information on the web, but when I tried to figure out why the reason became apparent – their observations did not match the expectation – no matter they set in the MaxConnections setting, the amount of time it took, and the number of concurrent calls to the external service remained the same. &lt;/p&gt;  &lt;p&gt;Trying to figure out why, we’ve used two scenarios – in one we ran our smart client application and monitored using Fiddler we examined how many concurrent requests are sent to the service; on the other we ran a test application we created specifically for this purpose. Confusingly there were two separate reasons for why the observations did not match our expectations - &lt;/p&gt;  &lt;p&gt;In the test scenario, the application and the service we used to test were all done on the local machine. Of course in this case the request to the service does not actually go through the network, and so the system.net MaxConnections setting does not play a part; as soon as we’ve moved the service to another machine the results were as expected.&lt;/p&gt;  &lt;p&gt;The smart client application, however, was already pointing at a service on a remote machine, and so there must have been something else there; as timing was a little bit more tricky in this case the guys used Fiddler to look into the requests made where they saw all the requests were getting sent out at the same time, despite setting the MaxConnections to 1.&lt;/p&gt;  &lt;p&gt;It turns out, and that I did not know, that Fiddler was the cause of the unexpected behaviour.&lt;/p&gt;  &lt;p&gt;I don’t know exactly how Fiddler works, but I suspect it hijacks the requests on the local machine so that from our client point of view the requests never actually went through the network and so the MaxConnections setting has been ignored. Fiddler itself does not adhere to this (I’m guessing it is not a .net application) and so multiple concurrent requests have been forwarded by it to the remote service.&lt;/p&gt;  &lt;p&gt;As soon as we’ve removed Fiddler the behaviour was as expected.&lt;/p&gt;  &lt;p&gt;Lesson learnt.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-9040860886297836396?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2010/02/wrong-impressions-with-maxconnection.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-4978849885508035349</guid><pubDate>Fri, 22 Jan 2010 16:22:00 +0000</pubDate><atom:updated>2010-01-22T16:22:29.986Z</atom:updated><category domain='http://www.blogger.com/atom/ns#'>BizTalk</category><category domain='http://www.blogger.com/atom/ns#'>Performance</category><title>What I’ve learnt about BizTalk Hosts</title><description>&lt;p&gt;Here’s something I learnt from Guru Venkataraman on my one of my visits to Redmond last year - &lt;/p&gt;  &lt;p&gt;Like most seasoned BizTalk developers, I suspect, I usually follow the best practice around host planning nicely summarised by Marcel &lt;a href="http://blogs.microsoft.nl/blogs/soabpm/archive/2009/07/07/determining-the-optimum-number-of-biztalk-hosts.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;What I did not think about (and nor did Marcel, it appears) is the actual queues behind these hosts, how they are used, and the impact on performance; in comes Guru’s wisdom- &lt;/p&gt;  &lt;p&gt;Each host has a queue, implemented as a table in the message box database, so - loosely speaking – when a message is published to the message box, BizTalk determines which subscribers are interested in the message, and places the message (well – logically) in the queues of the relevant hosts.&lt;/p&gt;  &lt;p&gt;Each hosts polls its own queue periodically (default is 500ms) to get any pending messages and acts on them – start a new instance or correlate to an existing instance, potentially rehydrating it.&lt;/p&gt;  &lt;p&gt;Now imagine you have one host running two different processes and that two messages are received both of which should trigger a new instance of process A.&lt;/p&gt;  &lt;p&gt;The host picks up the first message (for this discussion to be clear enough we’ll have to pretend it’s working on a single thread, although I suspect several aspect of this are) and passes it to a new instance of process A.&lt;/p&gt;  &lt;p&gt;Imagine now that process A publishes a message intended for process B; as process B runs under the same host, the message gets into the very same queue in which we already have the second message queued for process A.&lt;/p&gt;  &lt;p&gt;Now – process B cannot start until the host reads the pending message and starts the second instance of process A. it is only at this point that the message intended for process B is at the ‘front’ of the queue and can be read by the host and an instance of process B can be started. effectively the execution of process B has been delayed unnecessarily because there were messages queued for process A.&lt;/p&gt;  &lt;p&gt;Now – of course BizTalk much of this is indeed multi threaded and so the problem is not that severe. BizTalk was clearly designed to host many processes under any single host and there’s definitely not a requirement (or a recommendation) to have a host per-process, that would be ridiculous, however - &lt;/p&gt;  &lt;p&gt;Where you have a flow where process A often publishes messages that end up in another process (B, C or D to make some names), and you have a reasonable throughput, you would get better performance if the publisher of the messages (process A) is hosted separately from potential subscribers (B, C or D).&lt;/p&gt;  &lt;p&gt;With the subscribers configured with a different host they can pick up their messages without being affected by other messages awaiting for process A, and vice versa – the same goes for any replies published by them.&lt;/p&gt;  &lt;p&gt;Two things worth remembering in this context:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;When you ‘call’ an orchestration, as opposed to ‘start’-ing an orchestration, the host of the calling orchestration is used, regardless of what’s configured in the admin console &lt;/li&gt;    &lt;li&gt;Whilst I’ve specifically mentioned processes, the same considerations apply to send ports, and even receive locations, and when looking at the former it is worth remembering that dynamic send ports, where used, always use the default host for the adapter used. &lt;/li&gt; &lt;/ol&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-4978849885508035349?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2010/01/what-ive-learnt-about-biztalk-hosts.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-3333935960089208871</guid><pubDate>Thu, 21 Jan 2010 17:46:00 +0000</pubDate><atom:updated>2010-01-21T17:46:07.893Z</atom:updated><category domain='http://www.blogger.com/atom/ns#'>BizTalk</category><category domain='http://www.blogger.com/atom/ns#'>What not to do</category><title>What not to do – hard coded values</title><description>&lt;p&gt;This always seemed like an obvious one to me, but as I do see it out there occasionally, I guess it should be mentioned in my little ‘series’ – think carefully whenever you are hard coding any data into your code, as it is almost guaranteed to change one day, however remote you think that chance is.&lt;/p&gt;  &lt;p&gt;This post could probably end here, but that would be almost rude, so I’ll give an example - &lt;/p&gt;  &lt;p&gt;A custom disassembler is being developed to identify a message type before parsing it.&lt;/p&gt;  &lt;p&gt;The messages are expected to be received over POP3, and the decision which message it is is done by identifying the sender of the email (rather than by looking in the actual message), which is fair enough. &lt;/p&gt;  &lt;p&gt;So – the component has code to read the context property storing the sender’s email address and then a switch statement on the property’s value determines the message type required.&lt;/p&gt;  &lt;p&gt;Of course this works very well. until a third party decides to change the email address, or another one is added. now you have to update the code, re-deploy and re-test. why? because you did not want to spend another day moving this to configuration?&lt;/p&gt;  &lt;p&gt;Even a simple AppSetting would be better than hard coded, but of course usually you’d be looking at least at defining a custom configuration section if not using a database or other store (SSO?)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-3333935960089208871?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2010/01/what-not-to-do-hard-coded-values.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-8237741079685261731</guid><pubDate>Mon, 04 Jan 2010 08:52:00 +0000</pubDate><atom:updated>2010-01-21T17:47:19.711Z</atom:updated><category domain='http://www.blogger.com/atom/ns#'>BizTalk</category><title>..and it looks like it’s not</title><description>&lt;p&gt;Back in December I’ve posted ‘&lt;a href="http://www.sabratech.co.uk/blogs/yossidahan/2009/12/this-should-not-be-routing-failure.html" target="_blank"&gt;This should not be a routing failure&lt;/a&gt;’ about an experience we’ve had on our BizTalk 2006 environment that I found very weird. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.linkedin.com/in/timwieman" target="_blank"&gt;Tim Wieman&lt;/a&gt;, a senior program manager on the BizTalk Customer Advisory Team, was kind enough to drop me an email letting me know that this behaviour was indeed identified as incorrect, and was actually fixed.&lt;/p&gt;  &lt;p&gt;A &lt;a href="http://support.microsoft.com/kb/923632" target="_blank"&gt;hotifx&lt;/a&gt; was created for BizTalk 2006 which later versions already incorporate, so if you’re using 2006, and you’re having this issue - get that hotfix, if you’re using a later version – you probably don’t need to worry about it.&lt;/p&gt;  &lt;p&gt;I have managed to test the hotfix on BizTalk 2006 and it does allow my scenario to run without a problem (&lt;strong&gt;don’t forget the registry change for each host, as described in the link to the hotfix&lt;/strong&gt;); I haven’t been able to try this on later versions yet, but there’s no reason to think that would not work.&lt;/p&gt;  &lt;p&gt;Thanks Tim!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-8237741079685261731?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2010/01/and-it-looks-like-its-not.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-202346672585933602</guid><pubDate>Sat, 26 Dec 2009 18:27:00 +0000</pubDate><atom:updated>2009-12-26T18:27:23.601Z</atom:updated><title>UK SOA/BPM User Group meetings in January</title><description>&lt;p&gt;The next ‘in-person’ meeting for the UK SOA/BPM User Group will be held on the 27th of Jan in Paddington – London, check out the details &lt;a href="http://sbugjan2010.eventbrite.com/" target="_blank"&gt;here&lt;/a&gt;, and if you’re coming – be sure to come and say hi – I’ll probably be the loudest chap in the room. again.&lt;/p&gt;  &lt;p&gt;And even before that, on January 12th, an &lt;a href="http://sbugminiascentn.eventbrite.com/" target="_blank"&gt;online meeting&lt;/a&gt; will be held with the title ‘Developing Composited Solutions with Sharepoint and SAP’&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-202346672585933602?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2009/12/uk-soabpm-user-group-meetings-in.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-2874799277807020999</guid><pubDate>Fri, 18 Dec 2009 11:18:00 +0000</pubDate><atom:updated>2010-01-04T08:54:10.345Z</atom:updated><category domain='http://www.blogger.com/atom/ns#'>BizTalk</category><title>This should not be a routing failure!</title><description>&lt;p&gt;&lt;em&gt;&lt;font color="#ff0000"&gt;Important update: it looks like it’s not after all! and I’ve posted the details &lt;/font&gt;&lt;/em&gt;&lt;a href="http://www.sabratech.co.uk/blogs/yossidahan/2010/01/and-it-looks-like-its-not.html" target="_blank"&gt;&lt;em&gt;&lt;font color="#ff0000"&gt;here&lt;/font&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;font color="#ff0000"&gt;; I suggest you check it out after reading this post.&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Some routing failures are straight forward – you have a message, it has context, and no one subscribes to it. Routing Failure Report notifications are very useful on helping troubleshooting these – and most likely someone has mistyped a property’s value, a subscription value or forgot to ensure that the relevant properties are promoted and that relevant services are enlisted.&lt;/p&gt;  &lt;p&gt;Some routing failures are a little bit more tricky to map out - &lt;/p&gt;  &lt;p&gt;Consider a simple scenario where you have a two way receive port publishing a request, which is being picked up by a two way send port - &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_7lqvqdOFqOU/Sytk6fZBMvI/AAAAAAAAAH4/0Y1Xi4IVvQE/s1600-h/image3.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_7lqvqdOFqOU/Sytk7EtV8pI/AAAAAAAAAH8/UNepB_khQmY/image_thumb1.png?imgmax=800" width="533" height="243" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now add a second two-way subscriber to the mix…&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_7lqvqdOFqOU/Sytk8I8zZ-I/AAAAAAAAAIA/9pI5B-l_IMM/s1600-h/image7.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_7lqvqdOFqOU/Sytk9cBkrxI/AAAAAAAAAIE/KKeO6o-PdMM/image_thumb3%5B1%5D.png?imgmax=800" width="522" height="327" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;In this case BizTalk cannot know which of the two potential responses it may get (from the two different two way send ports) it should deliver to the [send side of the] receive port, and so it opts to not even publish the request and instead deliver a routing failure.&lt;/p&gt;  &lt;p&gt;This is fair enough - race conditions are not a good thing and it’s pretty clever that BizTalk identifies this up front and prevents this. &lt;/p&gt;  &lt;p&gt;However - the same routing failure will happen, it appears, even if the publisher is NOT a two way port, and that – I did not expect.&lt;/p&gt;  &lt;p&gt;If the publisher of the original message (the receive port) was not a two way port, but one-way, it would not expect any response from anybody, which removes the race-condition situation, and therefore should have been supported in my view, but it does not appear that it does.&lt;/p&gt;  &lt;p&gt;Imagine a scenario like this - &lt;/p&gt;  &lt;p&gt;1st Process publishes message A, through a one way port    &lt;br /&gt;1st Send port (2-way) picks up message A and calls a service, publishing the service’s response - Message B.     &lt;br /&gt;2nd Send port (also 2-way) picks up message A as well and calls a different service, publishing this service’s response - Message C.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_7lqvqdOFqOU/Sytk-MCXsBI/AAAAAAAAAII/ksV155Jzv2k/s1600-h/image6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_7lqvqdOFqOU/Sytk-8YPwfI/AAAAAAAAAIM/h4fj9h9deO0/image_thumb3.png?imgmax=800" width="536" height="337" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;As far as I can tell, this is a valid scenario – call it message enrichment via external services. &lt;/p&gt;  &lt;p&gt;Subscribers should be able to subscribe to message A, B or C as they wish, and all is nice and loosely coupled, if you only ignore the fact that this does not seem to work!&lt;/p&gt;  &lt;p&gt;Building such a scenario I'm getting a routing failure for message A, which - unless I'm not seeing correctly - I can only explain according to the rule mentioned above, which I find really frustrating.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-2874799277807020999?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2009/12/this-should-not-be-routing-failure.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-7201761046774269049</guid><pubDate>Sun, 13 Dec 2009 18:20:00 +0000</pubDate><atom:updated>2009-12-13T18:20:53.728Z</atom:updated><title>The Microsoft Application Platform Event - February 9th 2010</title><description>&lt;p&gt;Microsoft UK have published the details of this event taking place in the MS Campus in Reading, see the details and register &lt;a href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032436355&amp;amp;Culture=en-GB" target="_blank"&gt;here&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The event has a very promising agenda -&lt;/p&gt;  &lt;p&gt;I had the pleasure of meeting Robert Hogg several times through the MVP program, and he is probably one of the most suitable guys I know to be talking about pragmatic approach to projects with a track record of successful “rescue projects” under his belt.&lt;/p&gt;  &lt;p&gt;I also have the pleasure (although I’m not sure it’s mutual) to be working closely with Paul Saggar and Jon Simpson, and if anybody can talk about implementing complex business processes in an ever changing, and highly competitive, environment it’s these two. &lt;/p&gt;  &lt;p&gt;And of course, as many know, I work closely with PNMsoft, and so its only natural that I’d say it’s always very interesting to hear from their vast experience in the BPM field in which they’ve been working for many years.&lt;/p&gt;  &lt;p&gt;See you there!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-7201761046774269049?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2009/12/microsoft-application-platform-event.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-494284663244005389</guid><pubDate>Fri, 11 Dec 2009 14:31:00 +0000</pubDate><atom:updated>2009-12-11T14:31:12.695Z</atom:updated><category domain='http://www.blogger.com/atom/ns#'>BizTalk</category><category domain='http://www.blogger.com/atom/ns#'>What not to do</category><title>What not to do – avoid reading entire message’s to memory unnecessarily</title><description>&lt;p&gt;This one is fairly common, I suspect, and I can certainly see why – the temptation is simply to big – but too many pipeline components start by reading the message into memory, when, with a little bit more effort this could have been avoided. &lt;/p&gt;  &lt;p&gt;One pipeline component I’ve seen, for example, receives a flat file, and needs to remove records already processed (duplication elimination) – quite a good thing to do in a pipeline, and I also liked the approach of doing so before the disassembler, to make the xml produced smaller.&lt;/p&gt;  &lt;p&gt;V1 of the component used a memory stream – the incoming stream was read line by line, each line was assessed, and – if was not a duplicate – it would get written to the memory stream. &lt;/p&gt;  &lt;p&gt;When the component had finished going through the entire incoming stream, the memory stream would be assigned to the message, replacing the original stream, and the message would get returned to the pipeline.&lt;/p&gt;  &lt;p&gt;There are two downsides to this approach – the first is memory consumption – the component will always consume at least as much memory as the size of the (outgoing) message; done properly BizTalk would then clean this memory, but only after completing the processing of the message; the second downside is potentially unnecessary delay in further processing of the message – one of the huge benefits of the pipeline, in my view, is its streaming fashion, where subsequent components, if developed in the correct manner, can start working on parts of the message before preceding components completed their processing; basically each component passes back to the pipeline the portion of the message it already processed, whilst working on the next portion.&lt;/p&gt;  &lt;p&gt;It appears that the customer in question encounter memory issues as the component’s code was changed to use virtual stream instead of memory stream; a virtual stream is effectively a stream that uses disk for storage instead of memory.&lt;/p&gt;  &lt;p&gt;This solves the memory consumption issue, but merely replaces it with IO operations which may have an even bigger impact on the server’s overall performance (and does not address the processing delay point at all).&lt;/p&gt;  &lt;p&gt;What would have been the correct way to implement this in my view?&lt;/p&gt;  &lt;p&gt;The component should have create a custom stream, wrapping the original stream from the message; It would then replace the message’s stream with the custom stream immediately returning the message back to the pipeline. Note that so far the component hadn’t touched the message stream – zero bytes have been read.&lt;/p&gt;  &lt;p&gt;As BizTalk (and not the component!) would read the message (for instance when persisting it to the message box), the custom stream’s read function would be called which would contain that reads the underlying stream (the original stream received by the component), probably buffering reads until the end of a line for simplicity (although in many cases this is not necessary) and assessing whether the record is a duplicate or not; if it is a duplicate the function will simply read the next line and so on until a non-duplicate record is found, at which point the line would be returned as the output byte stream from the read function.&lt;/p&gt;  &lt;p&gt;This effectively means that the next component, or the message box, will receive the message line by line, duplicate records removed, without having to wait for the component to process the entire message, and with only a maximum of one line ever loaded into memory.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-494284663244005389?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2009/12/what-not-to-do-avoid-reading-entire.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>5</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-8650903087164975378</guid><pubDate>Fri, 04 Dec 2009 08:56:00 +0000</pubDate><atom:updated>2009-12-04T08:56:52.142Z</atom:updated><category domain='http://www.blogger.com/atom/ns#'>BizTalk</category><category domain='http://www.blogger.com/atom/ns#'>LOB Adapter SDK</category><title>LOB Adapter SDK</title><description>&lt;p&gt;I’ve been doing some work recently with the LOB adapter SDK.&lt;/p&gt;  &lt;p&gt;The adapter I’ve been creating is effectively a wrapper around a web service we’re using extensively, to which we often need to make several consecutive calls. &lt;/p&gt;  &lt;p&gt;Doing so from an orchestration, using a send port, is inefficient, as each request involves a pub/sub cycle; on the other hand – I’m not a big fan of ‘inline sends’, which was one of the options considered. &lt;/p&gt;  &lt;p&gt;Building a custom adapter would give us the best of both worlds, if you like – the process would create a message containing all the requests to be sent and publish it; a send port, configured with the custom adapter, would pick this message and deliver it to the adapter which would, in turn, debatch the requests, send them to the service, aggregate the responses back and return the aggregated message. &lt;/p&gt;  &lt;p&gt;This way we still have all the tracking and management BizTalk provides but only one pub/sub cycle.&lt;/p&gt;  &lt;p&gt;The LOB adpater SDK does a very good job in lowering the barrier of creating adapters (I’ve created ‘native’ adapters before) which is a good thing.&lt;/p&gt;  &lt;p&gt;Several points I’ve been left with from this, very initial, exercise - &lt;/p&gt;  &lt;p&gt;Implementing the metadata browser, resolver and search handler was a bit tedious; I ended up creating an xml file with my metadata, embedded this in my project and wrote code to generate the metadata off that. I wish this was part of the SDK.&lt;/p&gt;  &lt;p&gt;Once the metadata was set I needed to write the outbound handler (in my case), for which I needed to know how the incoming messages and outgoing responses should look like; with no generated samples this was a bit too painful to my liking – figuring out the request format is easy although tedious again – I’ve ended up consuming my adapter from a client, making a call, setting a breakpoint and going over the message at runtime.&lt;/p&gt;  &lt;p&gt;This is, of course, not possible for the response – where I need to create the message in the adapter, so trial and error was the only way (ok – and reading the docs, and applying some common sense) – in my case I actually made a mistake in my metadata configuration which took me a while to figure out (and &lt;a href="http://phazed.com/" target="_blank"&gt;Rupert’s&lt;/a&gt; help, thanks!)&lt;/p&gt;  &lt;p&gt;Bottom line is that if there was a tool to look at the metadata and generate request/response samples for each operation this work would have been much easier. I might be tempted to create one if I get the time.&lt;/p&gt;  &lt;p&gt;The last thing that phased me was working with metadata from the client. &lt;/p&gt;  &lt;p&gt;I needed the client to provide some information outside the message; I knew the mechanism in BizTalk would be to use a context property, for which I will need to deploy, with the adapter itself, the property schema, but I wasn’t sure if and how the adapter gets access to that or how I could consume this from a .net client.&lt;/p&gt;  &lt;p&gt;Figuring out the adapter access was easy enough, turns out all the BizTalk message’s context properties are added as properties to the request WCF message received from the framework, so &lt;/p&gt;  &lt;pre class="code"&gt;token = message.Properties[PROPERTY].ToString();&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;where PROPERTY is the context property’s namespace#node would return the value of the property requested.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I was a bit stumbled with how to provide this property outside BizTalk, this time &lt;a href="http://social.msdn.microsoft.com/Profile/en-US/?user=Manas%20Garg%20-%20MSFT&amp;amp;referrer=http://social.msdn.microsoft.com/Forums/en-US/biztalkr2adapters/threads&amp;amp;rh=tdpuxqPgBw%2bLkBGPpZDxfZJ4GkjFCAKVfJXFsuC70uA%3d&amp;amp;sp=forums" target="_blank"&gt;Manas Garg&lt;/a&gt; came to the rescue in &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/biztalkr2adapters/thread/a602ee3e-81ff-480a-b62a-d0b4eceac37b" target="_blank"&gt;this&lt;/a&gt; thread&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Turns out you can simply do - &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;ConcurrentPrograms_ARClient client1 = new ConcurrentPrograms_ARClient(binding, address);&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;using (new OperationContextScope(client1.InnerChannel))&lt;br /&gt;  &lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; OperationContext.Current.OutgoingMessageProperties.Add(&amp;quot;Property Name&amp;quot;, &amp;quot;Property Value&amp;quot;);&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; client1.OPERATION(params...);&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;}&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-8650903087164975378?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2009/12/lob-adapter-sdk.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-2934236570458691425</guid><pubDate>Tue, 01 Dec 2009 08:38:00 +0000</pubDate><atom:updated>2009-12-01T08:38:49.090Z</atom:updated><category domain='http://www.blogger.com/atom/ns#'>BizTalk</category><category domain='http://www.blogger.com/atom/ns#'>What not to do</category><title>What not to do – ‘bundle’ unrelated components together’</title><description>&lt;p&gt;So – here’s another real-world they shouldn’t have done this –really! item; somewhat related to my previous post about &lt;a href="http://www.sabratech.co.uk/blogs/yossidahan/2009/11/what-not-to-do-projects.html" target="_blank"&gt;projects&lt;/a&gt;, but a different slant - &lt;/p&gt;  &lt;p&gt;MyP had used pipeline components fairly extensively, a very good idea in my view, especially in this case.&lt;/p&gt;  &lt;p&gt;But, as discussed in that previous post all pipeline components, regardless of where they were used, were bundled together in a single assembly. &lt;/p&gt;  &lt;p&gt;To make matters worse, a single pipeline component often served more than one purpose, for more than one client.&lt;/p&gt;  &lt;p&gt;So – for example – a pipeline initially created to remove an unwanted trailer from a message from a particular sender, ended up also converting the message to xml, and then extended to support another format, from another sender, only that the two don’t share any code – the execute method of the pipeline component has a switch statement on the sender name, and runs two separate functions. &lt;/p&gt;  &lt;p&gt;Now – considering all the components are in the same assembly already, how can this make matters worse?&lt;/p&gt;  &lt;p&gt;Well – &lt;a href="http://en.wikipedia.org/wiki/Single_responsibility_principle" target="_blank"&gt;single responsibility principle&lt;/a&gt; is one that I generally like – I’m a new developer working on this project, I see a component called TrailerRemover, used in a pipeline called &amp;lt;someSender&amp;gt;_Receive I assume this is processing messages from &amp;lt;someSender&amp;gt; and that it removes a trailer.&lt;/p&gt;  &lt;p&gt;I eventually discover it does a lot more, and processes messages from another sender as well.&lt;/p&gt;  &lt;p&gt;One of the side effects of this is time wasting – it is much more difficult, in my experience, to maintain systems that don’t follow the single responsibility principle.&lt;/p&gt;  &lt;p&gt;This is aggrevated by the fact that this is usually a symptom, if not a cause, for bad architecture – I shouldn’t be able to mix logic for two different senders, not unless specified common logic is factored out and reused properly, from a shared assembly.&lt;/p&gt;  &lt;p&gt;Now when I come to change some code I find it difficult to know what the impact may be – where exactly is this thing used?&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-2934236570458691425?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2009/12/what-not-to-do-bundle-unrelated.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-7574354194378486153</guid><pubDate>Tue, 24 Nov 2009 20:17:00 +0000</pubDate><atom:updated>2009-11-24T20:17:44.576Z</atom:updated><category domain='http://www.blogger.com/atom/ns#'>BizTalk</category><category domain='http://www.blogger.com/atom/ns#'>What not to do</category><title>What not to do – projects</title><description>&lt;p&gt;So – what not to do?&lt;/p&gt;  &lt;p&gt;Here’s one – don’t take 15 different interfaces, from 15 different providers, and the canonical format, and your internal process and bundle it into the same set of projects.&lt;/p&gt;  &lt;p&gt;My predecessor (MyP in short) in this project had followed the best practice and ensured (for the most part) that schemas, maps, pipelines and processes each have their own project.&lt;/p&gt;  &lt;p&gt;This is good – to start with, in the old days, mixing them used to cause all sorts of build issues, but – although I haven’t tried in several years now – I assume that’s all in the past, but – more importantly – this is bad practice because different artifacts have different ‘resilience to change’ – if you need to add a small shape to a small process that gets instantiated as a result of a receive shape (and not being ‘started’ or ‘called’) you can usually un-deploy it fairly easily.&lt;/p&gt;  &lt;p&gt;Change a schema, on the other hand, and usually there’s a whole raft of artifacts you now have to un-deploy with it.&lt;/p&gt;  &lt;p&gt;For that reason – mixing two artifact types in the same assembly, whilst not technically problematic, usually suggests you will have maintenance nightmare in the near future (unless you don’t mind down time, and regression tests, that is).&lt;/p&gt;  &lt;p&gt;Anyway, as I was saying, MyP did separate the different artifact types to different assemblies, but equally MyP only had one assembly of each; so – when we are processing a message arriving from partner A, for which we have a schema, a pipeline, a map or two and an orchestration – these were split across four assemblies; equally - when we are processing a message arriving from partner B, for which we also have a schema, a pipeline, a map or two and an orchestration, all different – these were also split across THE SAME four assemblies.&lt;/p&gt;  &lt;p&gt;On the surface not much wrong with this, the problem is what happens when you want to change a small thing in, say the schema for partner B, used from within a map, which in turn gets used within an orchestration – you now have to un-deploy the orchestration assembly, so that you can un-deploy the maps assembly, so that you can un-deploy the schema assembly, so that you can redeploy the new version of the schema assembly followed by the rest. (ok – so I’m assuming versioning and side-by-side deployment are not being used – which I have to – for my story); &lt;/p&gt;  &lt;p&gt;So – all that is the general pain that is part of the BizTalk developer’s day, why am I bringing this here? well because you’ve taken a BizTalk ‘challenge’ and doubled it - for one – you took process A down due to a change in process B; why? had they existed in separate assembly sets you wouldn’t need to… and two – as you’ve released new code – you have to test new code; only that now you have to test two sets of code, including one you haven’t intended to change (but may have, by mistake or otherwise); again – had there been two sets of assemblies, you could probably get away with testing just the scenarios related to the ones you’ve changed.&lt;/p&gt;  &lt;p&gt;Now multiply this by about 15 partners, and you see how it can be quite wrong. I hope.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-7574354194378486153?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2009/11/what-not-to-do-projects.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>10</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-583473510398261579</guid><pubDate>Tue, 24 Nov 2009 17:14:00 +0000</pubDate><atom:updated>2009-11-24T20:18:05.882Z</atom:updated><category domain='http://www.blogger.com/atom/ns#'>BizTalk</category><category domain='http://www.blogger.com/atom/ns#'>What not to do</category><title>What not to do - premier</title><description>&lt;p&gt;Again I find my self having to apologise for not writing for a while (it’s been one month since my last post, two since my last ‘real’ post), the usual suspects are to blame – too much work, too much bureaucracy, kids, new xbox games….&lt;/p&gt;  &lt;p&gt;Work wise I’ve taken on a few more small engagement recently, one of which was to enhance/fix/maintain a small-ish solution someone else built.&lt;/p&gt;  &lt;p&gt;I could not resist the temptation to take some notes of all the stuff I would have done differently, and am in the process of compiling them as a proper report for the client.&lt;/p&gt;  &lt;p&gt;As I was not posting for a while, partly due to this work, I thought its only fitting that I publish some of these ‘recommendations’ here.&lt;/p&gt;  &lt;p&gt;For obvious reasons, I will not name names and will try to generalise any samples/explanations provided; I can’t resist mentioning, though, that this other person, I learnt as I looked up his/her name on the web, had also nicked the entire text off my web site and used it on his/her own, which I found rather annoying (I believe the pages have since been removed, after a polite nudge…)&lt;/p&gt;  &lt;p&gt;Anyway….keep in mind that many of my notes may come down to style, or MY best practice; they don’t necessarily mean that the other approach is completely wrong -&amp;#160; I don’t presume I know better than anyone else (oh well….) but that there’s value in another point of view – in this case- mine.&lt;/p&gt;  &lt;p&gt;So – a few posts coming, likely to be very short and to the point, hopefully someone will findthem useful.&lt;/p&gt;  &lt;p&gt;Yossi&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-583473510398261579?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2009/11/what-not-to-do-premier.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-8363438262405683781</guid><pubDate>Fri, 23 Oct 2009 08:18:00 +0000</pubDate><atom:updated>2009-10-26T12:54:56.090Z</atom:updated><title>Another nice online SBUG meeting</title><description>&lt;p&gt;This time Global 360 will introduce themselves to the group members, if you’re curious – check the details &lt;a href="http://sbugminihelloglobal360.eventbrite.com/" target="_blank"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-8363438262405683781?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2009/10/another-nice-online-vbug-meeting.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-5334610437522290990</guid><pubDate>Mon, 12 Oct 2009 14:21:00 +0000</pubDate><atom:updated>2009-10-12T15:21:08.504+01:00</atom:updated><title>Online SBUG meeting</title><description>&lt;p&gt;Check out tomorrow’s &lt;strong&gt;ONLINE &lt;/strong&gt;SUBG meeting in which Jean-Pierre Auconie, the engineer behind the famous MessageBoxViewer tool talk us through it; details &lt;a href="http://sbugminimessageboxviewer.eventbrite.com/" target="_blank"&gt;here&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-5334610437522290990?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2009/10/online-sbug-meeting.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-6644319215692579235</guid><pubDate>Sun, 27 Sep 2009 09:53:00 +0000</pubDate><atom:updated>2009-09-27T10:53:46.902+01:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>BizTalk</category><title>Don’t be scared of custom disassemblers</title><description>&lt;p&gt;During the last few weeks I’ve been asked to review two separate projects, for two separate companies, developed – naturally – by two separate teams. &lt;/p&gt;  &lt;p&gt;The two things both projects had in common were that they both had to deal with legacy “flat files” and they both chose to process these files outside BizTalk using custom code. &lt;/p&gt;  &lt;p&gt;In both these cases I completely agree with the decision to use custom code to parse the incoming files – as good as the out-of-the-box flat file support in BizTalk is (made significantly better with the introduction of the flat file wizard, once one gets the hang of using it) – there’s no avoiding from writing custom code to parse flat files every now and then – some file formats are pretty challenging with different records types, conditional records, interleaving segments etc.&lt;/p&gt;  &lt;p&gt;I do not agree with, however, the decision to perform this custom parsing outside BizTalk.&lt;/p&gt;  &lt;p&gt;I’m pretty sure I would not even bother posting this point had I not seen two of these in the same month, but the fact that I did suggests it may be worth posting a quite note.&lt;/p&gt;  &lt;p&gt;One of the projects had the code in a console app, called from a windows scheduled task; the application would pick up files from a folder, parse them, and drop the xml representation in another folder, for BizTalk to consume. &lt;/p&gt;  &lt;p&gt;The other had a windows service monitoring a folder and pick up any files, parse them to a different, simplified, flat file format (!), and drop them in another folder for BizTalk to consume.&lt;/p&gt;  &lt;p&gt;Both of these introduce another component to the mix; such component needs it’s own error handling, it’s own monitoring, deployment strategy, operations manual etc. similarly it includes a fair bit of re-inventing the wheel – writing code to monitor folders, read files, and write files – stuff that BizTalk is doing out of the box. &lt;/p&gt;  &lt;p&gt;What would have been the correct approach then? quite simple – a custom disassembler in the receive pipeline - &lt;/p&gt;  &lt;p&gt;Writing a custom disassembler it quite simple - at the end of the day, it boils down to developing a class library, which implements a few simple interfaces, the main one – IDisassemblerComponent defines two methods - Disassmeble and GetNext (the other interface are even simpler, almost insignificant in terms of effort)&lt;/p&gt;  &lt;p&gt;Disassemble gets the source message and potentially parses it up front, GetNext is called repeatedly by the pipeline to receive 0 or more parsed messages, until it returns null. simple.&lt;/p&gt;  &lt;p&gt;In one of the projects I’ve since taken their existing code (console app), refactored it into a class library, and wrapped it in a custom disassembler class that calls it; converting the scenario to a BizTalk pipeline and performing the key “developer testing” took less than a day.&lt;/p&gt;  &lt;p&gt;Why did they not do it to begin with? whilst sometimes there are valid reasons, technical or otherwise, I suspect that in this case it was just unfamiliarity with with BizTalk and some lack of confidence in the development team’s ability to learn and implement (or their belief in themselves); these are valid concerns to any project manager, but I would suggest that a better course of action would have been to spend some time looking at what it takes to implement a custom disassembler, seeing that’s its not at all that scary, and by doing so learning more about a product used in the solution (BizTalk) and achieving a better architecture, and more maintainable approach.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-6644319215692579235?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2009/09/dont-be-scared-of-custom-disassemblers.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>8</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-2117165098897840591</guid><pubDate>Sun, 13 Sep 2009 10:23:00 +0000</pubDate><atom:updated>2009-09-13T11:23:28.752+01:00</atom:updated><title>Paolo Salvatori on ways to create messages in orchestration helper classes</title><description>&lt;p&gt;I’ve been toying with message creation a few times in the past, and recently turned to Paolo for help with a question; Paolo has an amazing blog and he has now posted &lt;a href="http://blogs.msdn.com/paolos/archive/2009/09/10/4-different-ways-to-process-an-xlangmessage-within-an-helper-component-invoked-by-an-orchestration.aspx"&gt;posted&lt;/a&gt; some of his wisdom around ways to create messages from a helper class to an orchestration on his blog; well worth reading (as any entry on this fantastic blob really!)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-2117165098897840591?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2009/09/paolo-salvatori-on-ways-to-create.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-7433057988367811608</guid><pubDate>Fri, 11 Sep 2009 13:33:00 +0000</pubDate><atom:updated>2009-09-11T14:33:50.208+01:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>BizTalk</category><title>Loosely Coupled….Part II</title><description>&lt;p&gt;In a &lt;a href="http://www.sabratech.co.uk/blogs/yossidahan/2009/08/loosely-coupled-part-i.html"&gt;previous post&lt;/a&gt; I’ve mentioned our constant attempt to strike the right balance when it comes to loosely coupled services; I’ve mentioned that we were looking at two different scenarios – loosely coupling calls to services outside BizTalk and loosely coupling calls to services inside BizTalk (once implemented within the BizTalk group)&lt;/p&gt;  &lt;p&gt;I’ve also mentioned that our solution is composed of a few distinct ‘areas’ (each one generally encapsulated as a BizTalk Application), which we consider, in most cases, to be service boundaries, and – within one ‘flow’ of an incoming request message, we will often have to cross one or more of these boundaries to achieve our end goal.&lt;/p&gt;  &lt;p&gt;In most cases, in our solution, the ‘subscriber’ service would use the schema of the ‘publisher’ service for its incoming message; this roughly follows the principle of a service’s proxy, albeit a bit upside down - for practical reasons. Only that - and that’s a much bigger difference - we don’t create a copy of the schema as a service proxy would, but rather reference the schema of the publisher directly (through a shared assembly); this, of course, creates a strong dependency between the two and - over time – this has caused us a lot of headache around deployments as whenever we wanted to update the publisher, we’d have to remove the subscriber too.&lt;/p&gt;  &lt;p&gt;Recently we have experimented with following more closely the service proxy approach and instead of using the same referenced schema (using a shared assembly), we’ve created an identical copy of it – same root node and namespace - in the ‘subscriber’ side. &lt;/p&gt;  &lt;p&gt;The assumption was that we will be publishing a message using the copy of the schema the publisher holds and be receiving it using the copy of the schema the subscriber holds, but as the message itself will look exactly the same, and will inevitably have exactly the same message type, and so it would be picked up by the subscriber successfully.&lt;/p&gt;  &lt;p&gt;Had it worked, we would be have been able to avoid the dependency between the subscriber and the publisher, which would help us gain much needed flexibility in the publisher to support, and change for, multiple subscribers.&lt;/p&gt;  &lt;p&gt;Theoretically - if the publisher schema had to change (say – to support functionality required by other subscribers), as long as the change is backwards compatible such as added elements, we could replace the publisher copy of the schema, but leave the subscriber copy as is, until such a point that we need/want to update the subscriber process.&lt;/p&gt;  &lt;p&gt;Well - in BizTalk 2006 – this would have worked just fine; unfortunately – from R2 onward, it no longer works – when an orchestration receives a message, it often does so based on a subscription that included the ‘messaging message-type’ (root node and namespace); however – starting with R2 – an additional check has been introduced – to compare the full .net type name of the schema used by the publisher message with the full .net type name of the schema used by the subscriber, assembly, version and all. &lt;/p&gt;  &lt;p&gt;This check obviously fails in our scenario, and our fancy loosely coupling solution no longer works (in R2 or 2009).&lt;/p&gt;  &lt;p&gt;I think this check is actually a result of code introduced as a &lt;a href="http://support.microsoft.com/kb/925502/en-us"&gt;hotfix&lt;/a&gt; for BizTalk 2004, which – for on reason or another did not make its way into BizTalk 2006 but did into later versions, but I’m not sure, either way – it’s important to note the workaround described at the bottom of the hotfix description, as it appears this behaviour can be turned off, but one would have to check carefully the potential impact.&lt;/p&gt;  &lt;p&gt;What else could we do? &lt;/p&gt;  &lt;p&gt;Well – one pattern we know that works fairly well is the broker pattern – there’s the publisher, with it’s own schema, there’s the subscriber, with its own – completely different schema, and there’s a broker – a third process that has dependencies on both and contains a map to convert one to the other; on the plus side – this gives us all the flexibility we need – at any one point we only need to deploy two entities – the publisher or the subscriber and the broker, which is good enough; having the process, with a map, allows us to use multi-part messages if we deem them suitable, and all the complexity we need in the mapping; on the down side there are more artifacts to deploy and manage but, more crucially, one extra message box hop which, in a low latency scenario as ours, is not a small price to pay.&lt;/p&gt;  &lt;p&gt;Another option is to simply expose the subscriber as a service and call it as such – there are big benefits to doing that – including the fact that we can now have a copy of the schema, in the form of a proxy or without one, and we have also decoupled the services in terms of BizTalk groups –the other service can be anywhere, although this was never a requirements for us; however – we’re paying in more pub/sub again, as well as more IO and quite possibly more complexity.&lt;/p&gt;  &lt;p&gt;Theoretically we could have also use XmlDocument (or any other generic wrapper, for that matter) to convey the message, but a) I don’t like typeless intechanges and, b) this does not work well in cases where correlation is required, as the following receive tend to short-cut the subscriber and pick up the request as a response, that is unless you’re willing to introduce two wrappers – one for the request and another one for the response.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-7433057988367811608?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2009/09/loosely-coupledpart-ii.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-2651934496462543593</guid><pubDate>Tue, 08 Sep 2009 07:20:00 +0000</pubDate><atom:updated>2009-09-08T08:20:44.290+01:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>BizTalk</category><category domain='http://www.blogger.com/atom/ns#'>Debug</category><title>Debugging Expression shape code</title><description>&lt;p&gt;&lt;a href="http://sandroasp.spaces.live.com/blog/fakehandlerpage.aspx?wa=wsignin1.0&amp;amp;sa=590845043"&gt;Sandro Pereira&lt;/a&gt; has &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/8dcf9a88-4eb5-4a88-97d8-56bd44e55638"&gt;posted&lt;/a&gt; a question, and answer, in the BizTalk newsgroup (he also described his answer, in detail, on his &lt;a href="http://sandroasp.spaces.live.com/blog/cns!98A008F39B7BBF8E!311.entry"&gt;blog&lt;/a&gt;) about debugging expression code in Visual Studio&lt;/p&gt;  &lt;p&gt;He wasn’t referring to debugging code in helper classes, but code in expression and assignment shapes. &lt;/p&gt;  &lt;p&gt;My answer was that this was not possible, but Sandro quickly proved me wrong, as he demonstrates in his answer and blog post, and this got me thinking –firstly – despite knowing about the option to use the generated code (and actually using it on very rare cases to understand a certain BizTalk behaviour) I had never thought of using it for debugging, and that is an interesting thought.&lt;/p&gt;  &lt;p&gt;However – I had to wonder – how come I never came across the need to? in all those years of BizTalk development, not even once can I remember thinking – oh! I could solve this if only I could debug the piece of code in this shape..&lt;/p&gt;  &lt;p&gt;The reason, I think, is two fold - &lt;/p&gt;  &lt;p&gt;1. I rarely have more than 2-3 lines of code in an expression shape of any kind; if it’s not straight assignments, its going into a helper method; it’s cleaner, it’s more reusable, and it’s easier to debug.&lt;/p&gt;  &lt;p&gt;2. I use trace. a lot. and so every few shapes or so, and certainly in expression shapes, I will have a trace line that outputs to a log file important information about the state, and the flow of the process; this proves to be invaluable when troubleshooting issues on the live environments, but also really helpful in development.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-2651934496462543593?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2009/09/debugging-expression-shape-code.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>4</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-4263888675258605096</guid><pubDate>Mon, 07 Sep 2009 21:18:00 +0000</pubDate><atom:updated>2009-09-07T22:18:39.189+01:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>BizTalk</category><category domain='http://www.blogger.com/atom/ns#'>Web Service</category><category domain='http://www.blogger.com/atom/ns#'>WCF</category><title>On ASMX, WCF, namespaces and generated schemas (in BizTalk 2006)</title><description>&lt;p&gt;Recently we’ve started to consume a new version of a web service we’ve been using for a while.    &lt;br /&gt;We’ve known that, as a whole, not much had changed, only that they have now moved to WCF; they would have migrated their classes to VS 2008 but would expose pretty much the same functions, using pretty much the same parameters. &lt;/p&gt;  &lt;p&gt;Still – it appears that BizTalk now insists on generating multiple schemas for the web reference, and as more of the service is moved across more schemas are introduced. &lt;/p&gt;  &lt;p&gt;This caused Oleg a fair amount of pain as, when new schemas would be introduced, they would re-order the existing schemas, so reference1.xsd (in the web reference) would suddenly become reference2.xsd, which in turn break out maps.&lt;/p&gt;  &lt;p&gt;The process of finding out the logic behind which schemas are created was fairly short and simple, but as I’ve documented it I thought I might as well share it - &lt;/p&gt;  &lt;p&gt;Initial observation revealed that whilst the ASMX services’ WSDL file contains all the schemas needed, the WCF services using import statements in the WSDL file; the schemas exist in separate ‘files’.&lt;/p&gt;  &lt;p&gt;The ASMX services always uses the XmlSerializer, WCF services use the DataContractSerializer by default, but can be configured to use the XmlSerializer if required.&lt;/p&gt;  &lt;p&gt;Here’s a walk thorugh of the scenarios we’ve compared (using BizTalk 2006) - &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Standard WCF project, DataContractFormat        &lt;br /&gt;&lt;/u&gt;&lt;/strong&gt;We’ll start by comparing the standard WCF sample project generated when you create a new WCF service application in Visual Studio 2008 - &lt;/p&gt;  &lt;pre class="code"&gt;[ServiceContract]&lt;br /&gt;&lt;span style="color: blue"&gt;public interface &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IService1&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    [OperationContract]&lt;br /&gt;    &lt;span style="color: blue"&gt;string &lt;/span&gt;GetData(&lt;span style="color: blue"&gt;int &lt;/span&gt;value);&lt;br /&gt;&lt;br /&gt;    [OperationContract]&lt;br /&gt;    CompositeType GetDataUsingDataContract(CompositeType composite);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;[DataContract]&lt;br /&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;CompositeType&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;bool &lt;/span&gt;boolValue = &lt;span style="color: blue"&gt;true&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: blue"&gt;string &lt;/span&gt;stringValue = &lt;span style="color: #a31515"&gt;&amp;quot;Hello &amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    [DataMember]&lt;br /&gt;    &lt;span style="color: blue"&gt;public bool &lt;/span&gt;BoolValue&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;get &lt;/span&gt;{ &lt;span style="color: blue"&gt;return &lt;/span&gt;boolValue; }&lt;br /&gt;        &lt;span style="color: blue"&gt;set &lt;/span&gt;{ boolValue = &lt;span style="color: blue"&gt;value&lt;/span&gt;; }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    [DataMember]&lt;br /&gt;    &lt;span style="color: blue"&gt;public string &lt;/span&gt;StringValue&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;get &lt;/span&gt;{ &lt;span style="color: blue"&gt;return &lt;/span&gt;stringValue; }&lt;br /&gt;        &lt;span style="color: blue"&gt;set &lt;/span&gt;{ stringValue = &lt;span style="color: blue"&gt;value&lt;/span&gt;; }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Looking at the WSDL generated, 3 schemas are imported – &lt;br /&gt;  &lt;br /&gt;1.&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; The usual generic types &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;2.&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; The definition of the compositeType type &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;3.&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; The definition of the service’s messages (GetData, GetDataResposne, GetDataUusingDataContarct, GetDataUsing DataContractResponse) &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;Adding a web reference to this service from a BizTalk 2006 project we can see it represents this fairly accurately - &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;We can see all 3 schemas downloaded from the service, but within the reference.map generated code&amp;#160; a single reference.odx defined the methods in the form of ports and web-messages, and reference.xsd defineds the compositeType schema.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Equivalent project in an ASMX service &lt;br /&gt;      &lt;br /&gt;&lt;/u&gt;&lt;/strong&gt;I’ve created an equivalent ASMX service, which looks like this – &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;[WebService(Namespace = &lt;span style="color: #a31515"&gt;&amp;quot;http://tempuri.org/&amp;quot;&lt;/span&gt;)]&lt;br /&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Service1 &lt;/span&gt;: System.Web.Services.WebService&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;    [WebMethod]&lt;br /&gt;    &lt;span style="color: blue"&gt;public &lt;/span&gt;CompositeType HelloWorld(CompositeType composite)&lt;br /&gt;    {&lt;br /&gt;        CompositeType response = &lt;span style="color: blue"&gt;new &lt;/span&gt;CompositeType();&lt;br /&gt;        response.StringValue = &lt;span style="color: #a31515"&gt;&amp;quot;Hello World&amp;quot;&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: blue"&gt;return &lt;/span&gt;response;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;CompositeType&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;bool &lt;/span&gt;boolValue = &lt;span style="color: blue"&gt;true&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: blue"&gt;string &lt;/span&gt;stringValue = &lt;span style="color: #a31515"&gt;&amp;quot;Hello &amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue"&gt;public bool &lt;/span&gt;BoolValue&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;get &lt;/span&gt;{ &lt;span style="color: blue"&gt;return &lt;/span&gt;boolValue; }&lt;br /&gt;        &lt;span style="color: blue"&gt;set &lt;/span&gt;{ boolValue = &lt;span style="color: blue"&gt;value&lt;/span&gt;; }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue"&gt;public string &lt;/span&gt;StringValue&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;get &lt;/span&gt;{ &lt;span style="color: blue"&gt;return &lt;/span&gt;stringValue; }&lt;br /&gt;        &lt;span style="color: blue"&gt;set &lt;/span&gt;{ stringValue = &lt;span style="color: blue"&gt;value&lt;/span&gt;; }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Publishing this service I can see it’s WSDL contains (does not use import, but that proved to be insignificant) a single schema that represents the service’s messages and the compositeType definition.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Consume this service from a BizTalk 2006 project and only the WSDL file is downloaded (there are no ‘external schemas’ to worry about) but within the reference.map pretty much the same odx and xsd files are generated, no real difference between ASMX and WCF here.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Next I’ve looked at changing the serializer the WCF service works with from DataContract to XmlSerializer – &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Standard WCF project, XmlSerializerFormatter &lt;br /&gt;      &lt;br /&gt;&lt;/u&gt;&lt;/strong&gt;Now we will change the serializer to XmlSerializer&amp;#160; by adding XmlSerializerFormatAttributre to both the service and the data contracts&amp;#160;&amp;#160; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;   [ServiceContract]&lt;br /&gt;    [XmlSerializerFormat]&lt;br /&gt;    &lt;span style="color: blue"&gt;public interface &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IService1&lt;br /&gt;    &lt;/span&gt;{&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;…and&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;[DataContract]&lt;br /&gt;  [XmlSerializerFormat]&lt;br /&gt;  &lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;CompositeType&lt;br /&gt;  &lt;/span&gt;{&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The WSDL in this case includes only one import, for a single schema representing both the service messages and the compositeType schema (basic types are not exposed) and BizTalk now only has one schema downloaded, but again – the reference.map code remained identical (one ODX, one schema) &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;How will adding a second namespace affect these behaviours? Lets investigate - &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;WCF project, two namespaces DataContractFormat &lt;br /&gt;      &lt;br /&gt;&lt;/u&gt;&lt;/strong&gt;To demonstrate this I’ll add another data contract - AnotherCompositeType, specify an explicit namespace for it and include it as a second parameter to the GetDataUsingDataContract operation - &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;[DataContract(Namespace=&lt;span style="color: #a31515"&gt;&amp;quot;HttpL://SomeNamespace&amp;quot;&lt;/span&gt;)]&lt;br /&gt;    &lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;AnotherCompositeType&lt;br /&gt;    &lt;/span&gt;{&lt;br /&gt;        &lt;span style="color: blue"&gt;bool &lt;/span&gt;boolValue = &lt;span style="color: blue"&gt;true&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: blue"&gt;string &lt;/span&gt;stringValue = &lt;span style="color: #a31515"&gt;&amp;quot;Hello &amp;quot;&lt;/span&gt;;&lt;br /&gt; &lt;br /&gt;        [DataMember]&lt;br /&gt;        &lt;span style="color: blue"&gt;public bool &lt;/span&gt;BoolValue&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: blue"&gt;get &lt;/span&gt;{ &lt;span style="color: blue"&gt;return &lt;/span&gt;boolValue; }&lt;br /&gt;            &lt;span style="color: blue"&gt;set &lt;/span&gt;{ boolValue = &lt;span style="color: blue"&gt;value&lt;/span&gt;; }&lt;br /&gt;        }&lt;br /&gt; &lt;br /&gt;        [DataMember]&lt;br /&gt;        &lt;span style="color: blue"&gt;public string &lt;/span&gt;StringValue&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: blue"&gt;get &lt;/span&gt;{ &lt;span style="color: blue"&gt;return &lt;/span&gt;stringValue; }&lt;br /&gt;            &lt;span style="color: blue"&gt;set &lt;/span&gt;{ stringValue = &lt;span style="color: blue"&gt;value&lt;/span&gt;; }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt;        [OperationContract]&lt;br /&gt;        CompositeType GetDataUsingDataContract(CompositeType composite, AnotherCompositeType anotherComposite);&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Using DataContractFormat again, but with two classes, representing two different namespaces, we’re now getting yet another schema - the fourth one - representing the added data contract (if the namespaces of both data contracts were the same, the DataContractFormat would have included them in the same schema)&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;On the BizTalk side, the reference.map code now also contains a second schema, one describes the original CompositeType, and a second describes the second type – AnotherCompositeType and here as well – were the two types in the same namespace, a single schema would exist, describing both.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Let’s look at the same again, using the XmlSerializerFormat&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;WCF project, two namespaces XmlSerializerFormat &lt;br /&gt;      &lt;br /&gt;&lt;/u&gt;&lt;/strong&gt;Adding the XmlSerializerFormat, I also have to remember to include the XmlRoot attribute to set the namespace, as the serializer does not look at the DataContract attribute - &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;[DataContract(Namespace = &lt;span style="color: #a31515"&gt;&amp;quot;http://SomeNamesapce&amp;quot;&lt;/span&gt;)]&lt;br /&gt;[XmlSerializerFormat]&lt;br /&gt;[XmlRoot(Namespace = &lt;span style="color: #a31515"&gt;&amp;quot;http://SomeNamesapce&amp;quot;&lt;/span&gt;)]&lt;br /&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;AnotherCompositeType&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;bool &lt;/span&gt;boolValue = &lt;span style="color: blue"&gt;true&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: blue"&gt;string &lt;/span&gt;stringValue = &lt;span style="color: #a31515"&gt;&amp;quot;Hello &amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    [DataMember]&lt;br /&gt;    &lt;span style="color: blue"&gt;public bool &lt;/span&gt;BoolValue&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;get &lt;/span&gt;{ &lt;span style="color: blue"&gt;return &lt;/span&gt;boolValue; }&lt;br /&gt;        &lt;span style="color: blue"&gt;set &lt;/span&gt;{ boolValue = &lt;span style="color: blue"&gt;value&lt;/span&gt;; }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    [DataMember]&lt;br /&gt;    &lt;span style="color: blue"&gt;public string &lt;/span&gt;StringValue&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;get &lt;/span&gt;{ &lt;span style="color: blue"&gt;return &lt;/span&gt;stringValue; }&lt;br /&gt;        &lt;span style="color: blue"&gt;set &lt;/span&gt;{ stringValue = &lt;span style="color: blue"&gt;value&lt;/span&gt;; }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Now the WSDL for this service, using the XmlSerialiserFormat imports two schemas – one for the service messages, and the CompositeType schema, all reside in the same namespace, and a second for AnotherCompositeType which is defined in a separate namespace&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Consuming this from BizTalk and again I’m getting two schemas – one for each namespace. &lt;br /&gt;  &lt;br /&gt;So far – switching between DataContractFormat and XmlSerializerFormat made no difference to the generated code under reference.map, but it did change the way the WSDL is constructed (import vs. embededed schemas) and therefore the downloaded components (wsdl and schemas, vs. wsdl only)&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;em&gt;Note - another thing I’ve noticed is that when a new schema needs to be generated under the reference.map code, as a result of a change to the service, updating web reference does not seem to do so; I had to delete the web reference and re-add it to see the newly added schema.&lt;/em&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Last&amp;#160; - let’s look at how the ASMX service behaves with two namespaces – &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;ASMX service with two namespaces &lt;br /&gt;      &lt;br /&gt;&lt;/u&gt;&lt;/strong&gt;I’ve added the second class, and added it as a parameter to my web method &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;[XmlRoot(Namespace = &lt;span style="color: #a31515"&gt;&amp;quot;http://AontherNamespace&amp;quot;&lt;/span&gt;)]&lt;br /&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;AnotherCompositeType&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;bool &lt;/span&gt;boolValue = &lt;span style="color: blue"&gt;true&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: blue"&gt;string &lt;/span&gt;stringValue = &lt;span style="color: #a31515"&gt;&amp;quot;Hello &amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue"&gt;public bool &lt;/span&gt;BoolValue&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;get &lt;/span&gt;{ &lt;span style="color: blue"&gt;return &lt;/span&gt;boolValue; }&lt;br /&gt;        &lt;span style="color: blue"&gt;set &lt;/span&gt;{ boolValue = &lt;span style="color: blue"&gt;value&lt;/span&gt;; }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue"&gt;public string &lt;/span&gt;StringValue&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;get &lt;/span&gt;{ &lt;span style="color: blue"&gt;return &lt;/span&gt;stringValue; }&lt;br /&gt;        &lt;span style="color: blue"&gt;set &lt;/span&gt;{ stringValue = &lt;span style="color: blue"&gt;value&lt;/span&gt;; }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;And, still consistent – when consumed from BizTalk 2006 I’m getting only the WSDL downloaded (two schemas are embedded) but the reference.map code contains two schemas – one for each namespace.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;To summarise - &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Using the DataContractFormat you will always get one schema for generic types, one schema for the service’s messages, and then one schema for each namespace any other types are declared in (0..n)&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Using the XmlSerializerFormat&amp;#160; schemas are embedded in the WSDL file, and you would get one per xml namespace used.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;As far as BizTalk generated code is concerned, however, there’s no difference between the two. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;What this meant to us – well – we understand better, but there’s still not much we can do.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;In our case – we control the service, and – in fact - we know that the only reason we encounter multiple xml namespaces in the service contract is because the various classes exist in several .net namespaces, and they have not supplied the DataContract attribute on any class, they have certainly no supplied the namespace parameter to that attribute, which meant the .net namespace was used as the xml namespace, resulting with multiple namespaces and therefore multiple schemas. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;One that team added the attribute, and used a consistent xml namespace throughout, our immediate problem was solved; however - had it been a third party’s service we would not have that luxury and we would have had to update our code whenever we update our web reference, even if only new types were added in a backwards compatible way (as the schema ordering may have changed)&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;On that – it’s probably easier to simply rename the schemas (and the underlying .net types) under the reference.map generated code rather than the referencing maps and messages.&lt;/p&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-4263888675258605096?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2009/09/on-asmx-wcf-namespaces-and-generated.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-14758839.post-6421305828242897431</guid><pubDate>Thu, 03 Sep 2009 06:42:00 +0000</pubDate><atom:updated>2009-09-03T07:43:22.310+01:00</atom:updated><title>Pro Business Activity Monitoring in BizTalk Server 2009</title><description>&lt;p&gt;Richard Seroter &lt;a href="http://seroter.wordpress.com/2009/08/11/review-pro-business-activity-monitoring-in-biztalk-server-2009/"&gt;wrote a review&lt;/a&gt; of this book on his blog&lt;/p&gt;&lt;p&gt;Whilst I haven’t yet finished reading the book, I completely agree with Richard – this book is very well written, and is doing a fantastic job explaining this fascinating, and often misunderstood, if not completely overlooked, capability of BizTalk. &lt;/p&gt;&lt;p&gt;The book also does a very good job at looking at scenarios outside BIzTalk server, making it well worth reading for any enterprise solution architect.&lt;/p&gt;&lt;p&gt;Highly recommended.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14758839-6421305828242897431?l=www.sabratech.co.uk%2Fblogs%2Fyossidahan%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</description><link>http://www.sabratech.co.uk/blogs/yossidahan/2009/09/pro-business-activity-monitoring-in.html</link><author>noreply@blogger.com (Yossi Dahan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item></channel></rss>