<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-10551425</id><updated>2008-07-07T15:05:44.157Z</updated><title type='text'>Saravana Kumar</title><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/default.htm'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default?start-index=26&amp;max-results=25'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.digitaldeposit.net/blog'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>106</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-10551425.post-6690626756690466446</id><published>2008-07-04T08:37:00.001Z</published><updated>2008-07-04T08:37:39.848Z</updated><title type='text'>MVP Year - #2</title><content type='html'>&lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/MVPYear2_8740/image.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; margin: 0px 20px 0px 0px; border-left: 0px; border-bottom: 0px" height="164" alt="image" src="http://www.digitaldeposit.net/blog/images/MVPYear2_8740/image_thumb.png" width="106" align="left" border="0"&gt;&lt;/a&gt; I'm delighted to say I been awarded Microsoft Most Valuable Professional (MVP) for second year in a row. My first MVP year was awesome, its hard to believe the level of benefits you get from Microsoft for being an MVP. I'll say the highlight of my award year was participating in the "&lt;a href="http://www.microsoft.com/soa/products/oslo.aspx" target="_blank"&gt;Oslo&lt;/a&gt;" Software Design Review at Redmond during the &lt;a href="https://www.mvpsummit2008.com/" target="_blank"&gt;MVP global summit&lt;/a&gt;. Without being an MVP its very unlikely I would have got a chance like this to hear directly from the Product team their future road map. It's not all about hearing what's coming soon, but also getting the opportunity to engage yourself in heated debate and to provide feedback directly to the product team to shape the technology you love the most.&lt;/p&gt; &lt;p&gt;One of the other exciting thing for me as part of "&lt;a href="http://www.microsoft.com/soa/products/oslo.aspx" target="_blank"&gt;Oslo&lt;/a&gt;" SDR, is the chance to interact with the industry experts. It was limited set of audience (around 40 people I believe) including people like &lt;a href="http://www.pluralsight.com/community/blogs/dbox/default.aspx" target="_blank"&gt;Don Box&lt;/a&gt;, Juval Lowy, &lt;a href="http://www.dasblonde.net." target="_blank"&gt;Michele Leroux Bustamante&lt;/a&gt; , &lt;a href="http://weblogs.asp.net/gsusx/" target="_blank"&gt;Jesus Rodriguez&lt;/a&gt;, &lt;a href="http://www.masteringbiztalk.com/" target="_blank"&gt;Jon Flanders&lt;/a&gt;, &lt;a href="http://samgentile.com/blogs/samgentile/default.aspx" target="_blank"&gt;Sam Gentile&lt;/a&gt;, &lt;a href="http://geekswithblogs.net/bloesgen" target="_blank"&gt;Brian Loesgen&lt;/a&gt;, &lt;a href="http://geekswithblogs.net/cyoung/Default.aspx" target="_blank"&gt;Charles Young&lt;/a&gt;, &lt;a href="http://seroter.wordpress.com/" target="_blank"&gt;Richard Seroter&lt;/a&gt;, &lt;a href="http://www.traceofthought.net/" target="_blank"&gt;Scott Colestock&lt;/a&gt;, &lt;a href="http://geekswithblogs.net/sthomas" target="_blank"&gt;Stephen Thomas&lt;/a&gt;, to name the few (guys I haven't left anyone intentionally, this list is from just on top of my head). &lt;/p&gt; &lt;p&gt;Not to mention, you get MSDN or Technet subscription free during your award year, which is great for a technical enthusiast to play with different things without the barrier of buying it.&lt;/p&gt; &lt;p&gt;I also need to thank everyone behind the scene, who nominated me for this award year.&lt;/p&gt; &lt;p&gt;Nandri!&lt;/p&gt; &lt;p&gt;Saravana&lt;/p&gt;  </content><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/2008/07/mvp-year-2.html' title='MVP Year - #2'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10551425&amp;postID=6690626756690466446' title='2 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.digitaldeposit.net/blog' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/6690626756690466446'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/6690626756690466446'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-10551425.post-6271970704336457360</id><published>2008-06-30T10:00:00.001Z</published><updated>2008-06-30T10:00:40.636Z</updated><title type='text'>Any recommendation for Windows 2003-ASP .NET hosting?</title><content type='html'>&lt;p&gt;Hi All,&lt;/p&gt; &lt;p&gt;In the past few months I been hit with so many technical problems running biztalk 24 * 7.com. I'm currently with 1and1 for my hosting, I been with them for past few years now. Everything is well and good until you hit a problem, but once you got some you are in real trouble.&lt;/p&gt; &lt;p&gt;In my past few months experience I never got a single issue solved by their technical team (this is just my experience). &lt;/p&gt; &lt;p&gt;At last I decided to take the plunge and move to a different hosting company. That's the only way I can come with next version of biztalk 24 * 7 confidently. Now I need your help on making my decision, here are my criteria's&lt;/p&gt; &lt;p&gt;1. Preferably in UK, since it will help me solve the issue during UK office hours. With 1and1, even though I'm a UK customer their server department is in US and most of the time I simply need to wait until US wakes up.&lt;/p&gt; &lt;p&gt;2. Windows Server 2003 virtual or dedicated sever hosting.&lt;/p&gt; &lt;p&gt;3. Support for ASP.NET 2.0 and SQL Server&lt;/p&gt; &lt;p&gt;I'm sure lot of you out there reading my blog will have experience in this area. Please feel free to drop your comments.&lt;/p&gt; &lt;p&gt;Nandri!&lt;/p&gt; &lt;p&gt;Saravana&lt;/p&gt;  </content><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/2008/06/any-recommendation-for-windows-2003-asp.html' title='Any recommendation for Windows 2003-ASP .NET hosting?'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10551425&amp;postID=6271970704336457360' title='3 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.digitaldeposit.net/blog' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/6271970704336457360'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/6271970704336457360'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-10551425.post-5987387354714874187</id><published>2008-06-04T09:37:00.001Z</published><updated>2008-06-04T09:37:53.556Z</updated><title type='text'>Read this before using bts_CleanupMsgBox stored procedure.</title><content type='html'>&lt;p&gt;&lt;strong&gt;Subject:&lt;/strong&gt; Losing subscriptions after running the sproc, resulting in complete redeploy of BizTalk application(s).&lt;/p&gt; &lt;p&gt;bts_CleanupMsgBox is not something new and it's been there from BizTalk 2004 SP1. Basically this script is used to clear the MessageBox database (intended only for development and especially useful while during performance testing). This script is not installed by default, the stored procedure will be empty and does nothing. That's how it should be on a production box, so no one accidentally runs it. You can install the stored procedure (please don't do it on production server) by running the SQL script presented inside installation folder "C:\Program Files\Microsoft BizTalk Server 2006\Schema\msgbox_cleanup_logic.sql"&lt;/p&gt; &lt;p&gt;Read this great post from &lt;a href="http://blogs.msdn.com/biztalk_core_engine/archive/2005/03/09/390996.aspx"&gt;Lee, explaining how to use it&lt;/a&gt; properly.&lt;/p&gt; &lt;p&gt;Recently, I been using the script very frequently on our performance environment after each test run to bring the environment to a clean state. Couple of days back when I ran the script, I lost all the subscriptions. We had around 13 BizTalk applications in our environment. Executing a query from Admin Console for subscription only showed subscriptions for Caching Service. Stopping and Starting the BizTalk Applications (Enlisting all Send Ports/Orchestrations) only brought back Send Port Subscriptions and Orchestrations subscriptions were not created whatsoever. The only way I managed to bring it back is by stopping/deleting existing BizTalk applications and re-importing them back in one server, then I had to apply the correct binding file and set all the modified parameters before continuing the test. We lost few hours of our valuable performance slot.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Reason:&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The reason is so simple, only thing I did wrong this time was generated "EXECUTE" script from SQL Management console, which generated the script as shown below&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/Readthisbeforeusingbts_CleanupMsgBoxsto_9575/ss.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="125" alt="ss" src="http://www.digitaldeposit.net/blog/images/Readthisbeforeusingbts_CleanupMsgBoxsto_9575/ss_thumb.jpg" width="468" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;the parameter @fLeaveActSubs is by default set to "1" in the stored procedure, so if you run it normally using the command "exec bts_CleanupMsgBox", everything is well and good, it will leave the subscriptions.&lt;/p&gt; &lt;p&gt;But by generating the "EXECUTE" script and running it, this value is set to "0" (default), which in turn results in clearing the subscriptions.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Million Dollar Question!!&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Why do we have this option in the first place in this stored procedure? Do we really need to clear the&amp;nbsp; subscriptions at any stage of testing. I can understand clearing all instance subscriptions, but why do we need to clear the activations subscriptions, and resulting in a environment where we couldn't bring it back, unless we do a redeploy.&lt;/p&gt; &lt;p&gt;Probably I could have tried running the piece of SQL inside the ELSE part of the IF condition @fLeaveActSubs &amp;lt;&amp;gt; 0, but I didn't want to leave the environment in a completely unstable state. So redeployed all of our applications (time consuming but safe bet).&lt;/p&gt; &lt;p&gt;If someone can explain the reason behind it, I'll happily update this post.&lt;/p&gt; &lt;p&gt;Thanks Gunjan Jain (Microsoft, India) for pointing this out. &lt;/p&gt; &lt;p&gt;Nandri,&lt;/p&gt; &lt;p&gt;Saravana&lt;/p&gt;  </content><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/2008/06/read-this-before-using-btscleanupmsgbox.html' title='Read this before using bts_CleanupMsgBox stored procedure.'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10551425&amp;postID=5987387354714874187' title='1 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.digitaldeposit.net/blog' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/5987387354714874187'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/5987387354714874187'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-10551425.post-3645053348772234314</id><published>2008-05-26T19:42:00.001Z</published><updated>2008-05-26T19:42:42.938Z</updated><title type='text'>biztalk247 Status</title><content type='html'>&lt;p&gt;Hello Reader,&lt;/p&gt; &lt;p&gt;I'm still experiencing intermittent problems with biztalk247 hosting from my ISP. Most of the time things are out of my control.&lt;/p&gt; &lt;p&gt;Recently I been spending lot of time with the ISP customer care, they are not sure about the root cause for the problem, they promised they are putting monitoring in place to identify it.&lt;/p&gt; &lt;p&gt;Whenever the problem happens the fix is simple, I need to restart few of their hosting services. But its hard work to just keep an eye on the status of the server.&lt;/p&gt; &lt;p&gt;I enhanced my blog aggregator component this weekend to send me a notification email whenever its polling for new content. If I don't receive the email within few hours gap I know something is not correct on the server. I hope this is just a temporary thing and doesn't carry forever.&lt;/p&gt; &lt;p&gt;Moving to an different ISP is not an easy choice due to the nature of the site, but if things doesn't improve I really don't have much choice.&lt;/p&gt; &lt;p&gt;I got some really cool stuff implemented recently to improve the site, but reliability problem just scars me a bit to release it.&lt;/p&gt; &lt;p&gt;Keep tuned, I'll try to sort this out ASAP. Again apologies for all the inconvenience.&lt;/p&gt; &lt;p&gt;Nandri!&lt;/p&gt; &lt;p&gt;Saravana&lt;/p&gt;  </content><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/2008/05/biztalk247-status.html' title='biztalk247 Status'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10551425&amp;postID=3645053348772234314' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.digitaldeposit.net/blog' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/3645053348772234314'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/3645053348772234314'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-10551425.post-5896884031124554110</id><published>2008-05-19T06:21:00.001Z</published><updated>2008-05-19T17:18:51.248Z</updated><title type='text'>biztalk 24 * 7 is down</title><content type='html'>&lt;p&gt;Hi readers,&lt;/p&gt; &lt;p&gt;BizTalk 24 * 7 is down at the moment due to hardware failure at my ISP. They are currently working on the case. I'm trying whatever I can on my capacity to bring it back online ASAP.&lt;/p&gt; &lt;p&gt;Apologies for any inconvenience.&lt;/p&gt; &lt;p&gt;I'll give you an update once the issue is fixed.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;font color="#ff0000"&gt;UPDATE: At last the site is back now after calling the customer care few times during the day. As of 19th May 2008 18:17 GMT the site is up and running.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#ff0000"&gt;Unfortunately due to budget constraints I don't have a DR site, probably will need to consider it if this happens again.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Nandri,&lt;/p&gt; &lt;p&gt;Saravana&lt;/p&gt;  </content><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/2008/05/biztalk-24-7-is-down.html' title='biztalk 24 * 7 is down'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10551425&amp;postID=5896884031124554110' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.digitaldeposit.net/blog' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/5896884031124554110'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/5896884031124554110'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-10551425.post-2298926951543600516</id><published>2008-04-14T10:57:00.001Z</published><updated>2008-04-14T10:57:54.125Z</updated><title type='text'>MVP Summit 2008</title><content type='html'>&lt;p&gt;It's exactly 24 hours since I started my journey from London Heathrow to attend the 2008 MVP summit, I'm still travelling. I'm writing this blog post from Chicago O'hare airport at 5:30 AM in the morning. It's not a good start, it looks like I'm going to miss the morning session of the summit. &lt;/p&gt; &lt;p&gt;Lesson Learned: Avoid change overs in US from International to Domestic with short time duration.&amp;nbsp; Don't plan to reach your destination very late.&lt;/p&gt; &lt;p&gt;To add to my short transit time, my Air India flight was delayed by almost 1hr:45 minutes. I knew very clearly there is no chance of catching my connecting flight. As expected I missed my connecting flight from Chicago to Seattle, to add to my shock list they said they couldn't find any seat availability for whole of Monday to Seattle. Luckily after spending 30 minutes with the Air India staff they found one via St. Louis for next day which will take me to Seattle at around 11AM, but again the transit time is less than 30 minutes to get my connecting flight from St. Louis to Seattle. I was put in a near by Hotel for that night.&lt;/p&gt; &lt;p&gt;I arrived at the airport at around 4:45AM next day, the airport staff gave me two options either to take the flight via St. Louis or take a direct flight to Seattle which will take me 45 minutes later than the original one. With previous night experience I happily grabbed the offer in both hands to take the direct flight. Now I need to wait for another 3 hours in the airport to catch my flight.&lt;/p&gt; &lt;p&gt;Hope this terrible events will end here, and I'll have a good enjoyable conference. I'll miss the morning session, but hopefully there should be plenty more for me to cheer up for rest of the event.&lt;/p&gt; &lt;p&gt;I'll try my level best to convey the message (of course useful technical stuff, not all this blabbing), I can during the course of the conference.&lt;/p&gt; &lt;p&gt;-Saravana &lt;/p&gt;  </content><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/2008/04/mvp-summit-2008.html' title='MVP Summit 2008'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10551425&amp;postID=2298926951543600516' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.digitaldeposit.net/blog' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/2298926951543600516'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/2298926951543600516'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-10551425.post-5988779108141361265</id><published>2008-04-05T08:07:00.001Z</published><updated>2008-04-05T15:50:57.531Z</updated><title type='text'>Extended XmlValidation Pipeline Component</title><content type='html'>&lt;p&gt;It's always a good practice to validate your incoming messages against schema to make sure you discard useless messages up front and avoiding unnecessary processing.  &lt;p&gt;BizTalk allows you to verify the validity of the incoming Xml message against deployed schema in few different ways. Some of the easy options are  &lt;ol&gt; &lt;li&gt;Using XmlReceive pipeline and setting the ValidateDocument property to true.  &lt;li&gt;Create a custom Receive Pipeline and use the XmlValidate pipeline component in the validate stage. &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;In both the scenarios, the incoming message is validated inside a receive pipeline and an exception is raised if the message fails validation, eventually suspending the pipeline service instance. You'll see description of the error messages both in event log and suspended instance with associated messages in the admin console.  &lt;p&gt;&lt;b&gt;Here are the few challenges in a real world situation:&lt;/b&gt;  &lt;ol&gt; &lt;li&gt;The default Xml validation component supplied with BizTalk (both the above cases) only notifies you about the very first error message it encounters.  &lt;li&gt;It simply suspends the service instance, and its all your responsibility to take necessary action (configure routing failure, or administrator taking appropriate action etc). If you don't take any action, the consumer won't get any clue about the validation failure. &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;b&gt;Our (improved) requirements are:&lt;/b&gt;  &lt;ol&gt; &lt;li&gt;We need to get all the schema validation exceptions at one go. Say for example, if there are 4 validation errors in the incoming message, then we need to see the reasons for all the 4 errors.  &lt;li&gt;Also, there should be an accessible error message with all the error descriptions, which we can map it to a response to send it back to the consumer (explained later.) in addition to suspending the service instances. &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;b&gt;NOTE: &lt;/b&gt;&lt;a href="http://www.digitaldeposit.net/blog/samples/XmlValidation.zip"&gt;Attached sample code&lt;/a&gt; got all the relevant materials discussed in this article.  &lt;p&gt;Sample Schema, Extended Pipeline component code, Sample receive pipeline, Sample Orchestration and required binding file.  &lt;p&gt;&lt;b&gt;Test Schema definition:&lt;/b&gt;  &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/ExtendedXmlValidationPipelineComponent_7EC9/clip_image002.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="119" alt="clip_image002" src="http://www.digitaldeposit.net/blog/images/ExtendedXmlValidationPipelineComponent_7EC9/clip_image002_thumb.jpg" width="182" border="0"&gt;&lt;/a&gt;  &lt;p&gt;&lt;b&gt;&lt;u&gt;Restrictions:&lt;/u&gt;&lt;/b&gt;  &lt;p&gt;employeeId: Is a string that contain only numbers of 5 chars long.  &lt;p&gt;jobSpecification: Manager, Programmer, Analyst.  &lt;p&gt;firstName/lastName: Can only be of alphabets.  &lt;p&gt;&lt;b&gt;&lt;/b&gt; &lt;p&gt;&lt;b&gt;&lt;u&gt;Validation using XmlReceive default pipeline:&lt;/u&gt;&lt;/b&gt;  &lt;p&gt;You can enable validation inside the default XmlReceive pipeline by setting &lt;em&gt;ValidateDocument&lt;/em&gt; property to true. But there is a trick, if you enable this property you need to set the &lt;em&gt;DocumentSpecName&lt;/em&gt; property as well specifying the schemas. Unfortunately it doesn't resolve the schemas automatically, and you'll see clear exception message saying  &lt;p&gt;&lt;i&gt;&lt;font color="#ff0000"&gt;There was a failure executing the receive pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML disassembler" Receive Port: "Receive.XmlReceive" URI: "C:\@Blog\XmlValidation\FileDrop\XmlReceive\In\*.xml" Reason: &lt;u&gt;Validation can only be performed when document schemas are provided&lt;/u&gt;.&lt;/font&gt;&lt;/i&gt;  &lt;p&gt;&lt;em&gt;DocumentSpecName&lt;/em&gt; property must be specified in this format (it's not documented clearly and took me a while to figure out)  &lt;p&gt;&lt;em&gt;DDL.Demo.Schemas.EmployeeRequest, DDL.Demo.Schemas, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c2b0cafd9314ef3e&lt;/em&gt;  &lt;p&gt;&lt;em&gt;DDL.Demo.Schemas&lt;/em&gt;: Schema .net namespace  &lt;p&gt;&lt;em&gt;EmployeeRequest&lt;/em&gt;: Type name defined for the Schema  &lt;p&gt;&lt;em&gt;DDL.Demo.Schemas&lt;/em&gt;: Fully qualified assembly name.  &lt;p&gt;(You can easy get these values from BizTalk Admin Console by opening the schema)  &lt;p&gt;If you receive more than one message type inside the same pipeline, you can add multiple &lt;em&gt;DocumentSpecNames&lt;/em&gt; by splitting it with a pipe (|) symbol.  &lt;p&gt;&lt;b&gt;&lt;u&gt;Validation using XmlValidator pipeline component:&lt;/u&gt;&lt;/b&gt;  &lt;p&gt;Configuring and performing validation using the out of the box XmlValidator component is simple. Follow these easy steps:  &lt;ol&gt; &lt;li&gt;Create a blank BizTalk project and add New item of type &lt;em&gt;Receive Pipeline&lt;/em&gt;  &lt;li&gt;From the BizTalk tool box, drag and drop the XmlValidator component into the Validate Stage  &lt;li&gt;Assign strong key and deploy the pipeline.  &lt;li&gt;In the BizTalk administration console, create a receive port/ location utilizing the pipeline deployed in #3.  &lt;li&gt;Get a message into the configured receive port via your choice of adapter File, HTTP, etc &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;The XmlValidator component should resolve the schema dynamically and validate the message against the schema. If there are any exceptions it will raise an exception and suspends the instance.  &lt;p&gt;&lt;b&gt;&lt;u&gt;Testing:&lt;/u&gt;&lt;/b&gt;  &lt;p&gt;I created a sample message as shown below  &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/ExtendedXmlValidationPipelineComponent_7EC9/clip_image004.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="69" alt="clip_image004" src="http://www.digitaldeposit.net/blog/images/ExtendedXmlValidationPipelineComponent_7EC9/clip_image004_thumb.jpg" width="363" border="0"&gt;&lt;/a&gt;  &lt;p&gt;There are 3 invalid elements in the schema. employeeId is not in the right format and both first name and last name got some invalid characters (according to our schema definition only alphabets are allowed).  &lt;p&gt;Firing the above message with validation enabled (either one of the above methods) will raise the exception and suspends the service instance. The exception message will be:  &lt;p&gt;&lt;i&gt;&lt;font color="#ff0000"&gt;The document failed to validate because of the following error:"The 'employeeId' element has an invalid value according to its data type." .&lt;/font&gt; &lt;/i&gt; &lt;p&gt;Correcting the above error in the message and firing it second time will show the second validation failure as below  &lt;p&gt;&lt;i&gt;&lt;font color="#ff0000"&gt;The document failed to validate because of the following error:"The 'firstName' element has an invalid value according to its data type." .&lt;/font&gt; &lt;/i&gt; &lt;p&gt;&lt;b&gt;&lt;u&gt;Extended XmlValidation pipeline component:&lt;/u&gt;&lt;/b&gt;  &lt;p&gt;In most of the cases it not useful to get one error message at a time, consumers would like to receive all the validation failure messages at one go, so that they correct all of them and send the message back.  &lt;p&gt;This problem forces us to write the extended XmlValidation pipeline component, which basically extend the functionality of the default BizTalk XmlValidation component to raise all the errors at one go and also give a serialized exception message, which you can easily to map it to a customer specific response message.  &lt;p&gt;The complete source code is available for &lt;a href="http://www.digitaldeposit.net/blog/samples/XmlValidation.zip"&gt;download here&lt;/a&gt;.  &lt;p&gt;Firing the message via the extended validation component will raise the following error description.  &lt;p&gt;&lt;font color="#ff0000"&gt;&lt;i&gt;There was a failure executing the receive pipeline: "DDL.Pipeline.ExtendedXmlValidation, DDL.Pipeline, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c2b0cafd9314ef3e" Source: "Pipeline " Receive Port: "Receive.ExtendedXmlValidation" URI: "C:\@Blog\XmlValidation\FileDrop\ ExtendedXmlValidation.In.ReceivePort\In\*.xml" Reason: Exception of type 'DDL.PipelineComponents.XmlValidationException' was thrown.NodeName: &lt;b&gt;employeeId&lt;/b&gt;NodeValue: 12 NodeNameSpace: . Severity: Error. Description: The 'employeeId' element has an invalid value according to its data type.. &lt;/i&gt;&lt;i&gt;NodeName: &lt;b&gt;firstName&lt;/b&gt;NodeValue: firstName007 NodeNameSpace: . Severity: Error. Description: The 'firstName' element has an invalid value according to its data type.. &lt;/i&gt;&lt;/font&gt;&lt;i&gt;&lt;font color="#ff0000"&gt;NodeName: &lt;b&gt;lastName&lt;/b&gt;NodeValue: lastName008 NodeNameSpace: . Severity: Error. Description: The 'lastName' element has an invalid value according to its data type..&lt;/font&gt; &lt;/i&gt; &lt;p&gt;So, you can see clearly you got all the validation failures at one go and also you got extra information like the node value, severity of the error (whether its error or warning) etc.  &lt;p&gt;&lt;b&gt;&lt;u&gt;Sending the validation failure message back to caller:&lt;/u&gt;&lt;/b&gt;  &lt;p&gt;One of the other big challenges is sending this exception message to the caller or to some other system to process. Just plainly terminating the service is instance is not useful most of the time.  &lt;p&gt;We utilised BizTalk 2006 ability to call &lt;em&gt;Receive pipeline&lt;/em&gt; within orchestration to achieve this.  &lt;p&gt;First a response schema is defined as shown below, which contains an errors collection node with description and nodeName elements inside.  &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/ExtendedXmlValidationPipelineComponent_7EC9/clip_image006.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="151" alt="clip_image006" src="http://www.digitaldeposit.net/blog/images/ExtendedXmlValidationPipelineComponent_7EC9/clip_image006_thumb.jpg" width="185" border="0"&gt;&lt;/a&gt;  &lt;p&gt;The sample orchestration looks like:  &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/ExtendedXmlValidationPipelineComponent_7EC9/clip_image008.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="clip_image008" src="http://www.digitaldeposit.net/blog/images/ExtendedXmlValidationPipelineComponent_7EC9/clip_image008_thumb.jpg" width="188" border="0"&gt;&lt;/a&gt;  &lt;p&gt;Inside the &lt;em&gt;Schema Validation&lt;/em&gt; expression shape we called our custom pipeline as shown below:  &lt;p&gt;&lt;i&gt;&lt;font color="#0000a0"&gt;Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecuteReceivePipeline((typeof(&lt;b&gt;DDL.Pipeline.ExtendedXmlValidation&lt;/b&gt;)),MSG_EMP_REQ);&lt;/font&gt;&lt;/i&gt;  &lt;p&gt;&lt;i&gt;&lt;/i&gt; &lt;p&gt;An exception handler is created to catch exceptions of type &lt;i&gt;&lt;font color="#0000a0"&gt;Microsoft.XLANGs.Pipeline.XLANGPipelineManagerException&lt;/font&gt;&lt;/i&gt;  &lt;p&gt;&lt;i&gt;&lt;/i&gt; &lt;p&gt;Exception message is created inside the 2&lt;sup&gt;nd&lt;/sup&gt; construct shape using the following statement  &lt;p&gt;&lt;i&gt;&lt;font color="#0000a0"&gt;schemaException = (DDL.PipelineComponents.XmlValidationException)exSchemaValidation.InnerException;&lt;/font&gt;&lt;/i&gt;  &lt;p&gt;&lt;i&gt;&lt;font color="#0000a0"&gt;MSG_XML_VALIDATION_ERROR = schemaException.ErrorCollection;&lt;/font&gt;&lt;/i&gt;  &lt;p&gt;Note we are accessing the &lt;em&gt;innerException &lt;/em&gt;property of the &lt;em&gt;XLANGPipelineManager &lt;/em&gt;exception.&amp;nbsp; &lt;p&gt;&lt;i&gt;&lt;/i&gt; &lt;p&gt;If there are no schema validation exceptions a response message will be constructed normally (first construct shape). Else if the control goes to the exception handler block a map is applied to transform the errors from XmlValidation to the response message as shown below  &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/ExtendedXmlValidationPipelineComponent_7EC9/clip_image010.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="165" alt="clip_image010" src="http://www.digitaldeposit.net/blog/images/ExtendedXmlValidationPipelineComponent_7EC9/clip_image010_thumb.jpg" width="244" border="0"&gt;&lt;/a&gt;  &lt;p&gt;The response message will look like:  &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/ExtendedXmlValidationPipelineComponent_7EC9/clip_image012.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="207" alt="clip_image012" src="http://www.digitaldeposit.net/blog/images/ExtendedXmlValidationPipelineComponent_7EC9/clip_image012_thumb.jpg" width="244" border="0"&gt;&lt;/a&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Setting up the sample file:&lt;/u&gt;&lt;/strong&gt;  &lt;p&gt;Unzip the &lt;a href="http://www.digitaldeposit.net/blog/samples/XmlValidation.zip"&gt;content&lt;/a&gt; to C:\@blog\XmlValidation folder. Open DDL.Demo.PipelineComponent solution and compile it, open XmlValidation.sln build and deploy it. Binding file is present.  &lt;p&gt;Nandri!  &lt;p&gt;Saravana&lt;/p&gt;  </content><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/2008/04/extended-xmlvalidation-pipeline.html' title='Extended XmlValidation Pipeline Component'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10551425&amp;postID=5988779108141361265' title='3 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.digitaldeposit.net/blog' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/5988779108141361265'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/5988779108141361265'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-10551425.post-1218496592861578796</id><published>2008-02-14T17:08:00.001Z</published><updated>2008-02-14T17:17:54.667Z</updated><title type='text'>BizTalk Web Service: Enum's picking default values automatically and resulting in Xml Schema validation issues.</title><content type='html'>&lt;p&gt;Recently I encountered a serious problem with BizTalk generated web service while doing Xml validation that uses mandatory elements with enumeration.  &lt;p&gt;&lt;strong&gt;&lt;u&gt;System Background:&lt;/u&gt;&lt;/strong&gt;  &lt;ol&gt; &lt;li&gt;Schemas are exposed as web services using "BizTalk Web Publishing Wizard".  &lt;li&gt;The messages come into BizTalk via Web Service and SOAP adapter.  &lt;li&gt;A custom XML schema validation pipeline component was build, which is capable of returning all the validation errors (the default out of the box BizTalk one only returns the first validation error) in a serializable error collection.  &lt;li&gt;Published messages are picked up by our business process Orchestration, whose first job is to validate it against the schema using the custom pipeline component created in step #3 (by using &lt;em&gt;XLANGPipelineManager.ExecuteReceivePipeline&lt;/em&gt; inside an expression shape and capturing exception). If any validation errors are identified, then they are mapped to response message with appropriate error codes. &lt;br&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Our system heavily depends on the schema validation and different error codes it generates. For example, say if a mandatory element called "channel" is not supplied then an error code called INVALID_CHANNEL will be returned, the consumer will kick off different work flow based on the critical error codes. So, it's crucial for us to get the schema validation and correct error codes generation spot on. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Problem:&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;In our schemas, some of the critical elements are expressed as enums using "derivation-by-restriction" on xs:string. Example: An element named "channel”"(mandatory, min=1) will have enumeration values "Postal", "Email", "Fax". &lt;/p&gt; &lt;p&gt;Sample Valid Message:  &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/BizTalkWebServiceEnumspickingdefaultval_F0C3/image.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="76" alt="image" src="http://www.digitaldeposit.net/blog/images/BizTalkWebServiceEnumspickingdefaultval_F0C3/image_thumb.png" width="402" border="0"&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp; &lt;p&gt;Sample Invalid Message (because mandatory "channel" element is missing):  &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/BizTalkWebServiceEnumspickingdefaultval_F0C3/image_3.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="62" alt="image" src="http://www.digitaldeposit.net/blog/images/BizTalkWebServiceEnumspickingdefaultval_F0C3/image_thumb_3.png" width="410" border="0"&gt;&lt;/a&gt;  &lt;p&gt;If the invalid message is passed to our orchestration as it's, everything will work fine. The orchestration will do the schema validation, will detect the missing channel element and generates the appropriate response message with correct error code (INVALID_CHANNEL). But the problem lies in the web service through which the message travels. When the web service receives the above invalid message it identifies the missing "channel" and substitutes the first enumeration value as default for the missing element "channel". So, by the time the message reaches the orchestration it will look like  &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/BizTalkWebServiceEnumspickingdefaultval_F0C3/image_4.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="75" alt="image" src="http://www.digitaldeposit.net/blog/images/BizTalkWebServiceEnumspickingdefaultval_F0C3/image_thumb_4.png" width="404" border="0"&gt;&lt;/a&gt;  &lt;p&gt;You can clearly see the problem here. The orchestration won't throw any schema validation exception since the mandatory "channel" element is present but with completely random value. This might have serious implication on the down line business systems.  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Solution:&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;The solution to the problem is quite straight forward. All you need to know is set the "nillable" property of the "channel" element to "true".  &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/BizTalkWebServiceEnumspickingdefaultval_F0C3/image_5.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="25" alt="image" src="http://www.digitaldeposit.net/blog/images/BizTalkWebServiceEnumspickingdefaultval_F0C3/image_thumb_5.png" width="277" border="0"&gt;&lt;/a&gt;  &lt;p&gt;We are using BizTalk Server 2006, and thanks mainly go to .NET Framework 2.0 "Nullable&amp;lt;T&amp;gt;" type. I assume the problem still persist in BizTalk Server 2004 based solution which runs on top of .NET 1.1  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Under the hood:&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;When we don’t specify the "nillable" property, the default value is "false". This will result in web service code being generated in a normal way as shown below  &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/BizTalkWebServiceEnumspickingdefaultval_F0C3/image_7.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="226" alt="image" src="http://www.digitaldeposit.net/blog/images/BizTalkWebServiceEnumspickingdefaultval_F0C3/image_thumb_7.png" width="301" border="0"&gt;&lt;/a&gt;&amp;nbsp; &lt;p&gt;If you recollect in .NET data types are separated into "value" types and "reference" types. "Reference" types are allocated on the CLR heap and the value types are allocated on the stack. Most of the basic data types like int, char, bool etc fall under "value" type so as &lt;strong&gt;&lt;u&gt;Enum and Struct&lt;/u&gt;&lt;/strong&gt;.  &lt;p&gt;A value type cannot be nullable because it has enough capacity to express only the values appropriate for that type; it does not have the additional capacity required to express a value of null.  &lt;p&gt;When the web service deserialize the incoming message it will assign null values to the missing the properties. Since a null value cannot be assigned to the Enum type, by default it puts the first value in the list.  &lt;p&gt;You need to remember, the internal representation of enum's is integers, by default it will start from "0". So, from the web service perspective it's assigning the initial value "0" to the property.  &lt;p&gt;(NOTE: The heading of the post is concentrating on Enum, but you will experience similar problem with basic data types like "int" as well, if the mandatory element of type int is not supplied, after serialization an element with value "0" will automatically be inserted by the web service.)  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Effect of assigning nullable = true&lt;/u&gt;&lt;/strong&gt;  &lt;p&gt;When we set the nullable property to true in our schema, the way web service code is generated is slightly different as shown below  &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/BizTalkWebServiceEnumspickingdefaultval_F0C3/image_6.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="225" alt="image" src="http://www.digitaldeposit.net/blog/images/BizTalkWebServiceEnumspickingdefaultval_F0C3/image_thumb_6.png" width="438" border="0"&gt;&lt;/a&gt;  &lt;p&gt;Nullable&amp;lt;T&amp;gt; Generic structure is new in .NET 2.0 to accommodate the usage of null on value types. See this link for more information &lt;a href="http://msdn2.microsoft.com/en-us/library/b3h38hb0.aspx"&gt;http://msdn2.microsoft.com/en-us/library/b3h38hb0.aspx&lt;/a&gt;  &lt;p&gt;Now the web service serialization won't assing the default value to the "channel" element. It will be null instead, so when the message gets serialized it, the "channel" element wont be there.  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Losing Messages: &lt;/u&gt;&lt;/strong&gt; &lt;p&gt;During this exercise I also identified a strange behaviour, which is not acceptable on an enterprise system. If the serialization fails for some reason, say for example you put a wrong value for the enum, Example &lt;em&gt;&lt;u&gt;&amp;lt;channel&amp;gt;Pigeon&amp;lt;/channel&amp;gt;&lt;/u&gt;&lt;/em&gt; or even put wrong case for example &lt;em&gt;&lt;u&gt;&amp;lt;channel&amp;gt;postal&amp;lt;/channel&amp;gt;&lt;/u&gt;&lt;/em&gt; ('p' is lower case). There won't be any errors or warning raised by the web service and message won’t be submitted to BizTalk. (NOTE: This is applicable only to one-way web service operations).  &lt;p&gt;Nandri!&lt;br&gt;Saravana&lt;/p&gt;  </content><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/2008/02/biztalk-web-service-enum-picking.html' title='BizTalk Web Service: Enum&amp;#39;s picking default values automatically and resulting in Xml Schema validation issues.'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10551425&amp;postID=1218496592861578796' title='4 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.digitaldeposit.net/blog' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/1218496592861578796'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/1218496592861578796'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-10551425.post-3390651671710270027</id><published>2008-02-14T10:26:00.001Z</published><updated>2008-02-14T17:11:18.193Z</updated><title type='text'>It's biztalk247.com 's first birthday</title><content type='html'>&lt;p&gt;Hello readers,&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/Itsbiztalk247.comsfirstbirthday_91EF/image.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="88" alt="image" src="http://www.digitaldeposit.net/blog/images/Itsbiztalk247.comsfirstbirthday_91EF/image_thumb.png" width="305" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;I need to thank everyone for their overwhelming support and interest on &lt;a href="http://www.biztalk247.com/v1"&gt;http://www.biztalk247.com/v1&lt;/a&gt; I launched the site same time last year on valentines day, to support the BizTalk community.&lt;/p&gt; &lt;p&gt;The site acts as a single portal containing all sort of information relevant to BizTalk Server 2004, 2006, and R2 like Search, Videos, &lt;a href="http://www.biztalk247.com/v1/ContentTransformer.aspx?tag=1891BBD2-A30B-11DB-BF50-FC8155D89593"&gt;Articles&lt;/a&gt;, &lt;a href="http://www.biztalk247.com/v1/ContentTransformer.aspx?tag=2028D15A-A30B-11DB-B36B-078255D89593"&gt;white papers&lt;/a&gt;, &lt;a href="http://www.biztalk247.com/v1/ContentTransformer.aspx?tag=101164A2-A366-11DB-B208-100356D89593"&gt;newsgroups&lt;/a&gt;, &lt;a href="http://www.biztalk247.com/v1/blogs/FeedReaderFS.aspx"&gt;aggregated blogs&lt;/a&gt;, and many more.&lt;/p&gt; &lt;p&gt;I have received numerous emails during this one year giving me suggestions, improvements and of course broken links. Thanks for everyone.&lt;/p&gt; &lt;p&gt;Below is the unique visitors count to &lt;a href="http://www.biztalk247.com"&gt;http://www.biztalk247.com&lt;/a&gt; in the past 1 year, averaging around 3000 / month from various parts of the world.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/Itsbiztalk247.comsfirstbirthday_91EF/mapoverlay.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="435" alt="mapoverlay" src="http://www.digitaldeposit.net/blog/images/Itsbiztalk247.comsfirstbirthday_91EF/mapoverlay_thumb.png" width="474" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;I'll try my level best to keep up the site with latest content relevant to BizTalk community.&lt;/p&gt; &lt;p&gt;Nandri!&lt;/p&gt; &lt;p&gt;Saravana&lt;/p&gt;  </content><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/2008/02/it-biztalk247com-first-birthday.html' title='It&amp;#39;s biztalk247.com &amp;#39;s first birthday'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10551425&amp;postID=3390651671710270027' title='1 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.digitaldeposit.net/blog' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/3390651671710270027'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/3390651671710270027'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-10551425.post-1845661596214439444</id><published>2007-10-23T13:00:00.001Z</published><updated>2007-10-23T13:08:08.807Z</updated><title type='text'>Off to Microsoft SOA and Business Process Conference</title><content type='html'>&lt;p&gt;I'm going to Microsoft &lt;a href="http://www.mssoaandbpconference.com/"&gt;SOA and Business Process&lt;/a&gt; Conference running between Oct 29th to Nov 2nd. To make most out of my trip (going to spend 13hrs each way in flight) I decided to attend the 2 days pre-conference session by PluralSight presented by &lt;a href="http://www.pluralsight.com/matt.aspx"&gt;Matt Milner&lt;/a&gt;, &lt;a href="http://www.pluralsight.com/jfland.aspx"&gt;Jon Flanders&lt;/a&gt; and &lt;a href="http://www.pluralsight.com/aaron.aspx"&gt;Aaron Skonnard&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.mssoaandbpconference.com"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="154" alt="image" src="http://www.digitaldeposit.net/blog/images/OfftoMicrosoftSOAandBusinessProcessConfe_C4E3/image.png" width="385" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;On the second day of the conference I'm hosting a round table session at &amp;quot;Ask the Expert (ATE)&amp;quot; reception, to cover the topic&amp;#xA0; &amp;quot;BizTalk Overview&amp;quot;.&lt;/p&gt;  &lt;p&gt;Hope to see some of you there. Please ping me if you are going to be there.&lt;/p&gt;  &lt;p&gt;Nandri!&lt;/p&gt;  &lt;p&gt;Saravana&lt;/p&gt; </content><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/2007/10/off-to-microsoft-soa-and-business.html' title='Off to Microsoft SOA and Business Process Conference'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10551425&amp;postID=1845661596214439444' title='1 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.digitaldeposit.net/blog' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/1845661596214439444'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/1845661596214439444'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-10551425.post-6492906093983106455</id><published>2007-08-17T03:42:00.001Z</published><updated>2007-08-17T03:56:59.449Z</updated><title type='text'>SOAP Adapter and BizTalk Web Publishing Wizard - things you need to know.</title><content type='html'>&lt;p&gt;&lt;b&gt;&lt;u&gt;Exposing an Orchestration as Web Service:&lt;/u&gt;&lt;/b&gt;  &lt;p&gt;This is the safest option you can choose, when you want to expose your business process as an industry standard web service, which can later be consumed by a client (consumer) either using a web service proxy or HTTP post of correctly formatted SOAP message.  &lt;p&gt;There is a very good article in MSDN &lt;a href="http://msdn2.microsoft.com/en-US/library/ms935219.aspx"&gt;http://msdn2.microsoft.com/en-US/library/ms935219.aspx&lt;/a&gt; explaining how you can expose your orchestration as web service.  &lt;p&gt;Let's assume you have exposed your orchestration as web service, bound the inbound logical port to the auto-generated SOAP receive port (created by the wizard) and enlisted-started the Orchestration. Now, when you look at the activation subscription details for the Orchestration it will look something similar to the one shown below:  &lt;p&gt;&lt;u&gt;&lt;/u&gt; &lt;p&gt;&lt;u&gt;SNIPPET #1&lt;/u&gt;  &lt;blockquote&gt; &lt;p&gt;http://schemas.microsoft.com/BizTalk/2003/system-properties.ReceivePortID&lt;b&gt; ==&lt;/b&gt; {73684F88-8D5C-4659-9E8F-F1B5E6E9A780}&lt;b&gt; And&lt;/b&gt;  &lt;p&gt;http://schemas.microsoft.com/BizTalk/2003/system-properties.MessageType&lt;b&gt; ==&lt;/b&gt; http://www.digitaldeposit.net/samples/schema/1.0#personRequest&lt;b&gt; And&lt;/b&gt;  &lt;p&gt;http://schemas.microsoft.com/BizTalk/2003/system-properties.InboundTransportType&lt;b&gt; !=&lt;/b&gt; SOAP&lt;b&gt;&lt;/b&gt;  &lt;p&gt;&lt;b&gt;Or&lt;/b&gt;  &lt;p&gt;http://schemas.microsoft.com/BizTalk/2003/system-properties.ReceivePortID&lt;b&gt; ==&lt;/b&gt; {73684F88-8D5C-4659-9E8F-F1B5E6E9A780}&lt;b&gt; And&lt;/b&gt;  &lt;p&gt;http://schemas.microsoft.com/BizTalk/2003/soap-properties.MethodName&lt;b&gt; ==&lt;/b&gt; GetPersonDetail&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;u&gt;&lt;/u&gt; &lt;p&gt;When you are receiving the messages via the auto-generated SOAP receive port the properties &lt;em&gt;MethodName&lt;/em&gt; and &lt;em&gt;ReceivePortID&lt;/em&gt; will get promoted by the SOAP adapter and the orchestration will get the message due to second subscription condition. (&lt;em&gt;MethodName&lt;/em&gt; will equate to the &lt;em&gt;Operation&lt;/em&gt; name you defined inside the logical port within your Orchestration)  &lt;p&gt;If you inspect the first condition carefully, you'll see "&lt;u&gt;if &lt;em&gt;MessageType&lt;/em&gt; property is present then the receive adapter should NOT be SOAP"&lt;/u&gt;. Also, the auto-generated SOAP R&lt;em&gt;eceiveLocation&lt;/em&gt; uses &lt;em&gt;PassThru&lt;/em&gt; pipeline, which results in &lt;em&gt;MessageType&lt;/em&gt; property not being promoted.  &lt;p&gt;This design introduces two potential problems  &lt;p&gt;&amp;nbsp;(LISTING #1)  &lt;ol&gt; &lt;ol&gt; &lt;li&gt;Configuring MAP(S) on the auto-generated SOAP receive port will be ignored.  &lt;li&gt;Properties (distinguished and promoted) defined in the schema wont get into the context.&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt; &lt;p&gt;&lt;b&gt;&lt;u&gt;Maps will be ignored on the auto-generated SOAP Receive Port:&lt;/u&gt;&lt;/b&gt;  &lt;p&gt;Usage of &lt;em&gt;PassThru&lt;/em&gt; pipeline inside the auto-generated SOAP &lt;em&gt;ReceiveLocation&lt;/em&gt; is bit contrary when you are using Orchestrations and dealing with XML messages. Majority of the time Orchestration subscriptions will be based on &lt;em&gt;MessageType&lt;/em&gt; you specified on the &lt;em&gt;Activation&lt;/em&gt; receive shape and you'll be using &lt;em&gt;XmlReceive&lt;/em&gt; pipeline on your &lt;em&gt;ReceiveLocation&lt;/em&gt;, so that &lt;em&gt;MessageType&lt;/em&gt; and other property promotions (both distinguished and promoted properties defined in the schema) gets into the context. Since the &lt;em&gt;MessageType&lt;/em&gt; property is NOT promoted anywhere in the &lt;em&gt;ReceivePort&lt;/em&gt; (mainly due to the usage of &lt;em&gt;PassThru&lt;/em&gt; pipeline), any MAP you configure on the &lt;em&gt;ReceivePort&lt;/em&gt; will be ignored.  &lt;p&gt;Due to the configuration of &lt;em&gt;PassThru &lt;/em&gt;pipeline by default, any properties (both distinguished and promoted) defined in your schema won't get into to the context, which creates potential problem if you want to use content based routing.  &lt;p&gt;We can fix these problems easily, by modifying the auto-generated SOAP &lt;em&gt;ReceiveLocation&lt;/em&gt; to use &lt;em&gt;XmlReceive&lt;/em&gt; pipeline instead of &lt;em&gt;PassThru&lt;/em&gt;. As I mentioned in the beginning "Exposing orchestration as web-service" is the safest option, it doesn't introduce too much head aches. The &lt;u&gt;problem really starts when you just want to expose your schemas as web services&lt;/u&gt; as explained in next topic.  &lt;p&gt;&lt;b&gt;&lt;u&gt;&lt;/u&gt;&lt;/b&gt; &lt;p&gt;&lt;b&gt;&lt;u&gt;Exposing schemas as web services:&lt;/u&gt;&lt;/b&gt;  &lt;p&gt;The MSDN article &lt;a href="http://msdn2.microsoft.com/en-US/library/ms935219.aspx"&gt;http://msdn2.microsoft.com/en-US/library/ms935219.aspx&lt;/a&gt; got clear explanation of exposing schemas as web services.  &lt;p&gt;After exposing your schemas as web-services using "BizTalk Web Publishing" wizard, you can create an Orchestration to consume the messages published by the auto-generated SOAP &lt;em&gt;ReceivePort&lt;/em&gt;. The important thing to note here is the name of the "Operation" you define inside the logical port, make sure it matches the &lt;em&gt;WebMethod&lt;/em&gt; name you have&amp;nbsp;specified while generating the web-service. As shown in the below figure:  &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/SOAPAdapterandBizTalkWebPublishingWizar_3A3A/image.png" atomicselection="true"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="163" alt="image" src="http://www.digitaldeposit.net/blog/images/SOAPAdapterandBizTalkWebPublishingWizar_3A3A/image_thumb.png" width="415" border="0"&gt;&lt;/a&gt;  &lt;p&gt;&lt;b&gt;&lt;u&gt;&lt;/u&gt;&lt;/b&gt; &lt;p&gt;When you bind the logical orchestration port to physical auto-generated SOAP &lt;em&gt;ReceivePort&lt;/em&gt; and start (enlist) the orchestration, the subscription for the orchestration will look identical to the one shown in SNIPPET #1 (earlier).  &lt;p&gt;We'll hit the same problems (explained in detail earlier) outlined under "Exposing an Orchestration as web service"  &lt;ol&gt; &lt;li&gt;Map won't get applied  &lt;li&gt;Properties (distinguished and promoted) won't get into context&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Due to the fact, the auto-generated SOAP &lt;em&gt;ReceiveLocation&lt;/em&gt; uses &lt;em&gt;PassThru&lt;/em&gt; pipeline by default.  &lt;p&gt;If you modify the auto-generated SOAP &lt;em&gt;ReceiveLocation &lt;/em&gt;to use &lt;em&gt;XmlReceive&lt;/em&gt; pipeline instead of &lt;em&gt;PassThru&lt;/em&gt; (hoping its going to fix all the problems, as we did with "Exposing an Orchestration as web service") the run-time will generate the following exception when it receives the message:  &lt;blockquote&gt; &lt;p&gt;There was a failure executing the receive pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML disassembler" Receive Port: "WebPort_SK.ws.viaSchemas.1_0/WebService1" URI: "/SK.ws.viaSchemas.1_0/WebService1.asmx" Reason: The type SK.Schemas.Person_1_0 is not a valid part type for a message. This invalid type may be from a property schema. &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;b&gt;&lt;u&gt;&lt;/u&gt;&lt;/b&gt; &lt;p&gt;The exception is mainly raised because SOAP adapter puts the wrong &lt;em&gt;DocumentSpecName&lt;/em&gt; property in the message context and hands over the message to the pipeline. &lt;em&gt;PassThru&lt;/em&gt; pipeline (DEFAULT Configuration on auto-generated SOAP &lt;em&gt;ReceiveLocation&lt;/em&gt;)&amp;nbsp;doesn't do any processing, so whatever value present in the property &lt;em&gt;DocumentSpecName&lt;/em&gt; is ignored. On the other hand if you configure &lt;em&gt;XmlReceive&lt;/em&gt; pipeline which uses &lt;em&gt;XmlDisassembler, &lt;/em&gt;it&lt;em&gt;&amp;nbsp;&lt;/em&gt;will&amp;nbsp;utilizes the "&lt;em&gt;DocumentSpecName"&lt;/em&gt; property to resolve the schema.  &lt;p&gt;&lt;u&gt;Behavior of &lt;em&gt;XmlDissambler&lt;/em&gt; inside the &lt;em&gt;XmlReceive&lt;/em&gt; pipeline:&lt;/u&gt;  &lt;p&gt;Having the &lt;em&gt;DocumentSpecName&lt;/em&gt; property in the context, will force &lt;em&gt;XmlDissambler&lt;/em&gt; pipeline component to use it, to locate your schema. If &lt;em&gt;DocumentSpecName&lt;/em&gt; is &lt;u&gt;NOT&lt;/u&gt; present then &lt;em&gt;XmlDissambler&lt;/em&gt; pipeline component will go through dynamic schema resolution mechanisms to get the correct schema. Since &lt;em&gt;DocumentSpecName&lt;/em&gt; is present with wrong value, &lt;em&gt;XmlDissambler&lt;/em&gt;&amp;nbsp;throws the exception and it clearly states "&lt;em&gt;This invalid type may be from a property schema"&lt;/em&gt;.  &lt;p&gt;There are few ways you can get away from this problem  &lt;p&gt;&lt;u&gt;&lt;strong&gt;Solution #1:&lt;/strong&gt; Use &lt;em&gt;PassThru &lt;/em&gt;pipeline and Orchestration (DEFAULT config):&lt;/u&gt;  &lt;p&gt;If you don't have any inbound maps to be applied on the port level and you are not dependant on promoted properties (distinguished and promoted) defined in the schema outside the orchestration, then you can use &lt;em&gt;PassThru&lt;/em&gt; pipeline (configured by default by auto-generated SOAP receive location). The Orchestration gets the message by other subscription conditions (ex: &lt;em&gt;MethodName&lt;/em&gt;) without the need for &lt;em&gt;MessageType&lt;/em&gt;.  &lt;ol&gt; &lt;li&gt;You can get away from the MAP problem by applying it inside your orchestration, and  &lt;li&gt;You automatically get away from property promotion problem. Because when the orchestration receives a message the &lt;em&gt;IBaseMessage&lt;/em&gt; (from adapter/pipeline) is converted into a XLANG message, which results in the process of new message construction (since messages are immutable in BizTalk server). During this step all the distinguished and promoted properties gets into the context. [&lt;font color="#ff0000"&gt;This is my own prediction of how distinguished fields and promoted properties gets into the context automatically within Orchestration&lt;/font&gt; even though we used &lt;em&gt;PassThru&lt;/em&gt; pipeline, I couldn't find clear documentation explaining it] and available within the Orchestration.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;u&gt;&lt;strong&gt;Solution #2:&lt;/strong&gt; Modify the generated .asmx.cs code. Passing &lt;em&gt;null&lt;/em&gt; instead of &lt;em&gt;bodyTypeAssemblyQualifiedName:&lt;/em&gt;&lt;/u&gt;  &lt;p&gt;By passing the value “&lt;em&gt;null&lt;/em&gt;” instead of &lt;em&gt;bodyTypeAssemblyQualifiedName&lt;/em&gt; both the problems defined in Listing #1 can be solved  &lt;p&gt;//Original Code  &lt;blockquote&gt; &lt;p&gt;string bodyTypeAssemblyQualifiedName = "SK.Schemas.Person_2_0, SK.Schemas, Version=1.0.0.0, Culture=neutral, PublicKeyTok" +  &lt;p&gt;"en=c2b0cafd9314ef3e";  &lt;p&gt;// BizTalk invocation  &lt;p&gt;object[] invokeResults = this.Invoke("GetPersonDetail", invokeParams, inParamInfos, outParamInfos, 0, &lt;b&gt;&lt;u&gt;bodyTypeAssemblyQualifiedName&lt;/u&gt;&lt;/b&gt;, inHeaders, inoutHeaders, out inoutHeaderResponses, out outHeaderResponses, null, null, null, out unknownHeaderResponses, false, false); &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;//Modified Code  &lt;blockquote&gt; &lt;p&gt;// BizTalk invocation  &lt;p&gt;object[] invokeResults = this.Invoke("GetPersonDetail", invokeParams, inParamInfos, outParamInfos, 0, &lt;b&gt;&lt;u&gt;null&lt;/u&gt;&lt;/b&gt;, inHeaders, inoutHeaders, out inoutHeaderResponses, out outHeaderResponses, null, null, null, out unknownHeaderResponses, false, false); &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;If the value &lt;em&gt;null&lt;/em&gt; is passed instead of &lt;em&gt;bodyTypeAssemblyQualifiedName&lt;/em&gt;, SOAP adapter won't add the &lt;em&gt;DocumentSpecName&lt;/em&gt; property to the context. Now, when we configure our auto-generated SOAP &lt;em&gt;ReceiveLocation&lt;/em&gt; to use &lt;em&gt;XmlReceive&lt;/em&gt; pipeline, the &lt;em&gt;XmlDisassembler&lt;/em&gt; component inside &lt;em&gt;XmlReceive&lt;/em&gt; will go through the process of automatic dynamic schema resolution mechanism, pick up the correct schema and promotes all the required properties (distinguished and promoted) defined in the schema and it also promotes the &lt;em&gt;MessageType&lt;/em&gt; property.  &lt;p&gt;&lt;u&gt;&lt;strong&gt;Solution #3:&lt;/strong&gt; Modify the generated .asmx.cs code. Change &lt;em&gt;bodyTypeAssemblyQualifiedName&lt;/em&gt; property to include the schema root node.&lt;/u&gt;  &lt;p&gt;We are going to follow a similar approach here, but instead of passing &lt;em&gt;null&lt;/em&gt;”for &lt;em&gt;bodyTypeAssemblyQualifiedName&lt;/em&gt;, we are actually going to pass the correct value.  &lt;p&gt;//Original Code  &lt;blockquote&gt; &lt;p&gt;string bodyTypeAssemblyQualifiedName = "SK.Schemas.Person_2_0, SK.Schemas, Version=1.0.0.0, Culture=neutral, PublicKeyTok" +  &lt;p&gt;"en=c2b0cafd9314ef3e"; &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;//Modified Code  &lt;blockquote&gt; &lt;p&gt;string bodyTypeAssemblyQualifiedName = "SK.Schemas.Person_2_0&lt;b&gt;&lt;u&gt;+personRequest&lt;/u&gt;&lt;/b&gt;, SK.Schemas, Version=1.0.0.0, Culture=neutral, PublicKeyTok" +  &lt;p&gt;"en=c2b0cafd9314ef3e"; &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The only difference is we are appending the schema root element name to the schema Type Name. You can see the correct &lt;em&gt;DocumentSpecName&lt;/em&gt; name by  &lt;ol&gt; &lt;li&gt;Add a Receive Pipeline to your project (or to a dummy project),  &lt;li&gt;Drag-Drop a &lt;em&gt;XmlDisassembler&lt;/em&gt; component  &lt;li&gt;Select &lt;em&gt;XmlDisassembler&lt;/em&gt; and in the properties window, click on button next to the "&lt;em&gt;Document Schemas"&lt;/em&gt; property. You’ll see "&lt;em&gt;Schema collection property editor"&lt;/em&gt; window as shown in the below figure, which clearly shows the expected "&lt;em&gt;DocumentSpecName"&lt;/em&gt; name.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/SOAPAdapterandBizTalkWebPublishingWizar_3A3A/image_4.png" atomicselection="true"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="242" alt="image" src="http://www.digitaldeposit.net/blog/images/SOAPAdapterandBizTalkWebPublishingWizar_3A3A/image_thumb_4.png" width="484" border="0"&gt;&lt;/a&gt;  &lt;p&gt;When you expose your Orchestration as web service the auto generated code will look similar to our modified code.  &lt;p&gt;&lt;strong&gt;&lt;u&gt;NOTE:&lt;/u&gt;&lt;/strong&gt; You need to be careful with Solution #2 and #3, because regenerating the web-service code will result in losing the manual changes you performed.  &lt;p&gt;You can download the ZIP file containing all the sample projects I used for this research.&lt;/p&gt; &lt;p&gt;Nandri!&lt;/p&gt; &lt;p&gt;Saravana&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/2007/08/soap-adapter-and-biztalk-web-publishing.html' title='SOAP Adapter and BizTalk Web Publishing Wizard - things you need to know.'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10551425&amp;postID=6492906093983106455' title='8 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.digitaldeposit.net/blog' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/6492906093983106455'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/6492906093983106455'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-10551425.post-8684128822651177507</id><published>2007-07-13T15:40:00.001Z</published><updated>2007-07-13T15:40:54.864Z</updated><title type='text'>Code Snippet: Sort nodes in an Xml Document</title><content type='html'>&lt;p&gt;&lt;font color="#ff0000"&gt;Scenario: Need to produce a new xml document with particular node list sorted in ascending/descending order&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Code:&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;XmlDocument xmlDoc = new XmlDocument();&lt;br&gt;xmlDoc.Load(@"Input.xml");  &lt;p&gt;XmlDocument xmlDocCopy = new XmlDocument();&lt;br&gt;xmlDocCopy.LoadXml(xmlDoc.OuterXml);&lt;br&gt;xmlDocCopy.SelectSingleNode("//Links").RemoveAll();  &lt;p&gt;XmlNode node = xmlDoc.SelectSingleNode("//Links");&lt;br&gt;XPathNavigator navigator = node.CreateNavigator();&lt;br&gt;XPathExpression selectExpression = navigator.Compile("Link/Title");&lt;br&gt;selectExpression.&lt;strong&gt;AddSort&lt;/strong&gt;(".", XmlSortOrder.Ascending, XmlCaseOrder.None, "", XmlDataType.Text);&lt;br&gt;XPathNodeIterator nodeIterator = navigator.Select(selectExpression);&lt;br&gt;while (nodeIterator.MoveNext())&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; XmlNode linkNode = xmlDoc.SelectSingleNode("//Link[Title=\"" + nodeIterator.Current.Value + "\"]");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; XmlNode importedLinkNode = xmlDocCopy.&lt;strong&gt;ImportNode&lt;/strong&gt;(linkNode, true);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlDocCopy.SelectSingleNode("//Links").AppendChild(importedLinkNode);&lt;br&gt;}  &lt;p&gt;xmlDocCopy.Save(@"Output.xml");  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Input:&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&amp;lt;Section&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Links&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Link Id="1"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Title&amp;gt;Jupiter Line&amp;lt;/Title&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;AddedDate&amp;gt;27/05/2007&amp;lt;/AddedDate&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Link&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Link Id="2"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Title&amp;gt;Alfa Line&amp;lt;/Title&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;AddedDate&amp;gt;27/05/2007&amp;lt;/AddedDate&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Link&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Link Id="3"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Title&amp;gt;Zebra Line&amp;lt;/Title&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;AddedDate&amp;gt;27/05/2007&amp;lt;/AddedDate&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Link&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Link Id="4"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Title&amp;gt;Copper Line&amp;lt;/Title&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;AddedDate&amp;gt;27/05/2007&amp;lt;/AddedDate&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Link&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Links&amp;gt;&lt;br&gt;&amp;lt;/Section&amp;gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Output:&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&amp;lt;Section&amp;gt;&lt;br&gt;&amp;nbsp; &amp;lt;Links&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Link Id="2"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Title&amp;gt;Alfa Line&amp;lt;/Title&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;AddedDate&amp;gt;27/05/2007&amp;lt;/AddedDate&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Link&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Link Id="4"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Title&amp;gt;Copper Line&amp;lt;/Title&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;AddedDate&amp;gt;27/05/2007&amp;lt;/AddedDate&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Link&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Link Id="1"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Title&amp;gt;Jupiter Line&amp;lt;/Title&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;AddedDate&amp;gt;27/05/2007&amp;lt;/AddedDate&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Link&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Link Id="3"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Title&amp;gt;Zebra Line&amp;lt;/Title&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;AddedDate&amp;gt;27/05/2007&amp;lt;/AddedDate&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Link&amp;gt;&lt;br&gt;&amp;nbsp; &amp;lt;/Links&amp;gt;&lt;br&gt;&amp;lt;/Section&amp;gt;&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/2007/07/code-snippet-sort-nodes-in-xml-document.html' title='Code Snippet: Sort nodes in an Xml Document'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10551425&amp;postID=8684128822651177507' title='4 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.digitaldeposit.net/blog' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/8684128822651177507'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/8684128822651177507'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-10551425.post-3291121892256376789</id><published>2007-07-02T22:26:00.001Z</published><updated>2007-07-02T22:26:45.447Z</updated><title type='text'>Subject: [MVP] Congratulations! You have received the Microsoft MVP Award</title><content type='html'>&lt;p&gt;&lt;img style="margin: 0px 20px 0px 0px" alt="mvplogo.png" src="http://www.timrayburn.net/content/binary/mvplogo.png" align="left" border="0"&gt;&lt;/p&gt; &lt;p&gt;Yeah, its official now. I have received the 2007 Microsoft&amp;nbsp;MVP award for BizTalk Server. It's been a really fun year blogging, &lt;a title="Understanding Desing-Time Properties" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=8C2572A2-FB61-4016-A7A7-1C37518B39FF&amp;amp;displaylang=en"&gt;writing white paper&lt;/a&gt;, launching &lt;a href="http://www.biztalk247.com/v1"&gt;BizTalk 24 * 7&lt;/a&gt;&amp;nbsp;and just generally getting more involved in the community.&lt;/p&gt; &lt;p&gt;I feel proud and honored to be part of the select few that Microsoft recognizes as community leaders.&amp;nbsp;I'll take this opportunity to&amp;nbsp;thank each and everyone who nominated me for this award&amp;nbsp;behind the scene.&lt;/p&gt; &lt;p&gt;&amp;nbsp;Nandri!&lt;/p&gt; &lt;p&gt;Saravana&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/2007/07/subject-mvp-congratulations-you-have.html' title='Subject: [MVP] Congratulations! You have received the Microsoft MVP Award'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10551425&amp;postID=3291121892256376789' title='8 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.digitaldeposit.net/blog' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/3291121892256376789'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/3291121892256376789'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-10551425.post-1984656756549036303</id><published>2007-06-21T09:12:00.001Z</published><updated>2007-06-21T09:12:39.121Z</updated><title type='text'>please ignore - posted for Technorati claim</title><content type='html'>&lt;a href="http://technorati.com/claim/x75xfdh5w" rel="me"&gt;Technorati Profile&lt;/a&gt;</content><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/2007/06/please-ignore-posted-for-technorati_21.html' title='please ignore - posted for Technorati claim'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10551425&amp;postID=1984656756549036303' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.digitaldeposit.net/blog' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/1984656756549036303'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/1984656756549036303'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-10551425.post-8629649195378899631</id><published>2007-06-06T21:14:00.001Z</published><updated>2007-06-06T21:14:23.945Z</updated><title type='text'>Adding Custom HTTP Headers to messages send via HTTP Adapter.</title><content type='html'>&lt;p&gt;&lt;a title="Custom HTTP Header Sample" href="http://www.digitaldeposit.net/blog/samples/CustomHTTPHeader.zip"&gt;Download Full sample code here&lt;/a&gt;&lt;/p&gt; &lt;p&gt;There will often be times we need to add some custom HTTP Headers to our outgoing message. The common one we come across is &lt;em&gt;SOAPAction&lt;/em&gt;, if you need to communicate with the web services just with HTTP adapter (not using SOAP Adapter).&lt;/p&gt; &lt;p&gt;BizTalk server gives us a context property called "&lt;font color="#ff0000"&gt;UserHttpHeader&lt;/font&gt;"&amp;nbsp;as part of the HTTP adapter, which can be used to set custom HTTP headers.&lt;/p&gt; &lt;p&gt;The below Orchestration shows an example, how you can take advantage of "UserHttpHeader" property.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/AddingCustomHTTPHeaderstomessagessendvi_9288/image.png" atomicselection="true"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="372" alt="image" src="http://www.digitaldeposit.net/blog/images/AddingCustomHTTPHeaderstomessagessendvi_9288/image_thumb.png" width="298" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;The code inside the "Message Assignment" shape is shown below:&lt;/p&gt; &lt;p&gt;&lt;em&gt;MSG_AUTHOR_OUT = MSG_AUTHOR_IN;&lt;br&gt;MSG_AUTHOR_OUT(*) = MSG_AUTHOR_IN(*);&lt;br&gt;MSG_AUTHOR_OUT(HTTP.UserHttpHeaders) = "userName: Saravana\r\npassword: hola";&lt;/em&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Important things to note:&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;ol&gt; &lt;li&gt;You can add &lt;font color="#ff0000"&gt;multiple headers&lt;/font&gt; (ex: userName, password)&amp;nbsp;in a single line as shown in the sample above.  &lt;li&gt;"&lt;font color="#ff0000"&gt;\r\n&lt;/font&gt;" is used to separate multiple headers.  &lt;li&gt;"&lt;font color="#ff0000"&gt;: &lt;/font&gt;" is used to separate header and value, you must specify a &lt;font color="#ff0000"&gt;SPACE&lt;/font&gt; after colon.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;The content of the output file is shown below&lt;/p&gt; &lt;p&gt;&lt;em&gt;POST /HTTPReceiver/Default.aspx HTTP/1.1&lt;br&gt;Connection: Keep-Alive&lt;br&gt;Content-Length: 312&lt;br&gt;Content-Type: text/xml; charset=utf-16&lt;br&gt;Expect: 100-continue&lt;br&gt;Host: localhost:3131&lt;br&gt;User-Agent: Microsoft (R) BizTalk (R) Server 2006 3.0.1.0&lt;br&gt;userName: Saravana&lt;br&gt;password: hola&lt;/em&gt;  &lt;p&gt;&lt;em&gt;&amp;lt;?xml version="1.0" encoding="utf-16"?&amp;gt;&amp;lt;&amp;lt;stripped content for clarity&amp;gt;&amp;gt;&lt;/em&gt;&lt;/p&gt; &lt;p&gt;I used an orchestration sample to demonstrate how you can set &lt;font color="#ff0000"&gt;UserHttpHeader &lt;font color="#000000"&gt;context&lt;/font&gt; &lt;/font&gt;property. But like any other BizTalk context property you can set this property in different places like within custom adapter, custom pipeline etc.&lt;/p&gt; &lt;p&gt;&lt;a title="Custom HTTP Header Sample" href="http://www.digitaldeposit.net/blog/samples/CustomHTTPHeader.zip"&gt;Download Full sample code here&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Nandri!&lt;/p&gt; &lt;p&gt;Saravana&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/2007/06/adding-custom-http-headers-to-messages.html' title='Adding Custom HTTP Headers to messages send via HTTP Adapter.'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10551425&amp;postID=8629649195378899631' title='1 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.digitaldeposit.net/blog' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/8629649195378899631'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/8629649195378899631'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-10551425.post-2123919326735318041</id><published>2007-06-04T18:18:00.001Z</published><updated>2007-08-24T03:27:47.888Z</updated><title type='text'>Implement Caching for your BizTalk applications using "static" classes and methods.</title><content type='html'>&lt;p&gt;&lt;font color="#ff0000"&gt;UPDATED:&lt;/font&gt; 24th August 2007, to reflect &lt;a href="http://seroter.wordpress.com/2007/08/17/behavior-of-static-objects-in-biztalk-runtime/"&gt;Richard Seroter's&lt;/a&gt; comment&lt;/p&gt; &lt;p&gt;There is no necessity to explain the importance of caching in any server based developments like BizTalk, ASP .NET etc. You need to plan early in your development cycle to cache resources in order to make most out of your limited server resources. &lt;/p&gt; &lt;p&gt;In BizTalk applications, it's quite common to lookup a&amp;nbsp;data store&amp;nbsp;to pickup a value, at different stages like custom Adapters, Pipelines, Orchestration, etc. The data store could be a custom SQL database/table,&amp;nbsp; a XML File, Active directory etc etc. Whatever the data store is, if you are doing the lookup for every message you process without any caching, its going to be an expensive and useless operation.&lt;/p&gt; &lt;p&gt;Due to the nature of BizTalk architecture and behavior of .NET run-time, its very easy to implement a caching logic just with a static class and a static method as shown below:&lt;/p&gt; &lt;p&gt;&lt;em&gt;public &lt;strong&gt;static&lt;/strong&gt; class CacheHelper&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private &lt;strong&gt;static&lt;/strong&gt; Dictionary&amp;lt;string, string&amp;gt; _authorIds = null;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public &lt;strong&gt;static&lt;/strong&gt; string GetAuthorName(string authorId)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (_authorIds == null)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Debug.WriteLine("Cache is empty. So populating the cache...");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _authorIds = new Dictionary&amp;lt;string, string&amp;gt;();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lock (_authorIds)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _authorIds.Add("2FC0CF1D-E107", "Matthew Johnstone");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _authorIds.Add("71F5C860-80FA", "Carl Reynolds");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _authorIds.Add("158FF294-1A89", "Robert Perkins");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _authorIds.Add("A71AE681-9C39", "Michael Killey");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _authorIds.Add("58794661-A9A3", "Saravana Kumar");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Debug.WriteLine("Cache list is pre-populated. Value is going to be taken from the cache.");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string authName = _authorIds[authorId];&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (authName != string.Empty)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return authName;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new Exception("Author cannot be found with id :" + authorId);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/em&gt;&lt;/p&gt; &lt;p&gt;In .NET static variables are maintained per&amp;nbsp;Common Language Runtime (CLR)&amp;nbsp;"AppDomain". We can just exploit this behavior of .NET for our caching needs.&amp;nbsp;&lt;/p&gt; &lt;p&gt;Inside the BizTalk server host instances,&amp;nbsp;several subservices will be running. The exact services can be found in the adm_HostInstance_SubServices table in the BizTalk Server Management database. The services are listed here for reference:&lt;/p&gt; &lt;table cellspacing="0" cellpadding="2" width="400" border="1" unselectable="on"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td valign="top" width="200"&gt;&lt;b&gt;Service&lt;/b&gt;&lt;/td&gt; &lt;td valign="top" width="200"&gt;&lt;b&gt;Description&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="200"&gt;Caching &lt;/td&gt; &lt;td valign="top" width="200"&gt;Used internally by BizTalk Server to cache configuration information for the other services&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="200"&gt;Endpoint Manager&lt;/td&gt; &lt;td valign="top" width="200"&gt;Responsible for hosting receive and send ports including adapters and pipelines&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="200"&gt;Tracking&lt;/td&gt; &lt;td valign="top" width="200"&gt;Responsible for moving data out of the MessageBox database and into the BAM or Tracking databases as appropriate&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="200"&gt;XLANG/s&lt;/td&gt; &lt;td valign="top" width="200"&gt;Host engine for BizTalk Server orchestrations&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="200"&gt;MSMQT&lt;/td&gt; &lt;td valign="top" width="200"&gt;MSMQT adapter service; serves as a replacement for the MSMQ protocol when interacting with BizTalk Server&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;The BizTalk host instance simply acts as a container to host these other services. When the service is started, each of these subservices is started as well. They handle all of the processing related to the messaging and orchestration engines in BizTalk Server. For isolated hosts, the Endpoint Manager is the only service that is loaded into the process. Isolated hosts are only intended to be used for hosting adapters that send and/or receive messages.&lt;/p&gt; &lt;p&gt;So, inside the BizTalk host instance by default there will be one .NET "AppDomain" created per each BizTalk SubService (EPM, XLANG, etc). Majority of our custom code will be running under the "AppDomains" either created for EPM (if you are doing any&amp;nbsp;messaging related stuff, example custom pipeline components and any assemblies you reference)&amp;nbsp;or XLANG (any custom orchestration and any assemblies you reference).&amp;nbsp;Both the "AppDomains" will&amp;nbsp;be&amp;nbsp;hosted inside the BizTalk host instance. &lt;/p&gt; &lt;p&gt;As I mentioned earlier, in .NET static variables are maintained per&amp;nbsp;Common Language Runtime (CLR)&amp;nbsp;"AppDomain".&amp;nbsp;Any static data you hold lives inside the "AppDomain" for the life time of the "AppDomain", in BizTalk term that means from the time BizTalk Host Instance is started, corresponding DLL's (pipeline components, pipelines, orchestrations, in general&amp;nbsp;any custom assembly like schemas, maps, helper classes) are loaded (assemblies get loaded into "AppDomain" on demand)&amp;nbsp;into the "AppDomains" (EPM, XLANG, etc)&amp;nbsp;to the time BizTalk host instance is restarted.&lt;/p&gt; &lt;p&gt;We can utilize this behavior of .NET run-time, to create a pattern to cache values, which doesn't change very often. Lets see the behavior with an example.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Here is an example using Orchestration:&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;In the above code snippet (showed earlier), I just added few Name-Value pair items to "authorsIds" collection, in real world scenarios we might need to populate them from a data store like SQL database. If we are doing that database lookup for every message, then its going to be unnecessary roundtrip's to the database and wastage of server resource.&lt;/p&gt; &lt;p&gt;This utility class can now be used in any of your custom BizTalk solution like Adapters, Pipelines, Orchestrations etc.&amp;nbsp; The following Orchestration shows its usage.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/ImplementCachingforyourBizTalkapplicati_A155/image.png" atomicselection="true"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="372" alt="Orchestration" src="http://www.digitaldeposit.net/blog/images/ImplementCachingforyourBizTalkapplicati_A155/image_thumb.png" width="275" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;The message assignment shape got the following lines of code.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;MSG_AUTHOR_OUT = MSG_AUTHOR_IN;&lt;br&gt;MSG_AUTHOR_OUT.Name = Utility.CacheHelper.GetAuthorName(MSG_AUTHOR_IN.Id);&lt;/strong&gt;  &lt;p&gt;When I Build, Deploy and run the sample, for the first message the DebugView showed the following output:&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/ImplementCachingforyourBizTalkapplicati_A155/image_3.png" atomicselection="true"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="37" alt="image" src="http://www.digitaldeposit.net/blog/images/ImplementCachingforyourBizTalkapplicati_A155/image_thumb_3.png" width="497" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;For subsequent messages (I posted 4), DebugView showed the following output:&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/ImplementCachingforyourBizTalkapplicati_A155/image_4.png" atomicselection="true"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="91" alt="image" src="http://www.digitaldeposit.net/blog/images/ImplementCachingforyourBizTalkapplicati_A155/image_thumb_4.png" width="458" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;You can make sure the cache is repopulating by restarting the BizTalk host instance (NT Service).&lt;/p&gt; &lt;p&gt;NOTE: If you are using isolated adapters like HTTP/SOAP the data will be cached under the IIS worker process, so to reset the cache you need to reset IIS.&lt;/p&gt; &lt;p&gt;This technique is simple to implement and easy to use. If you want more advanced caching like cache expiration, dependency etc then you can consider using Enterprise Library caching application block.&lt;/p&gt; &lt;p&gt;&lt;a title="Caching Demo Download" href="http://www.digitaldeposit.net/blog/samples/CachingDemo.zip"&gt;Download the full sample here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Nandri!&lt;/p&gt; &lt;p&gt;Saravana&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/2007/06/implement-caching-for-your-biztalk.html' title='Implement Caching for your BizTalk applications using &amp;quot;static&amp;quot; classes and methods.'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10551425&amp;postID=2123919326735318041' title='1 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.digitaldeposit.net/blog' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/2123919326735318041'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/2123919326735318041'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-10551425.post-6404191826049795765</id><published>2007-06-02T06:56:00.001Z</published><updated>2007-06-02T07:06:08.811Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='BIZTALK'/><title type='text'>Determine whether the BizTalk assembly is Debug or Release build at runtime.</title><content type='html'>&lt;p&gt;Recently someone raised this question in the newsgroup, they wanted to branch inside the orchestration based on the build of the assembly itself. Whenever an assembly is build with "Debug" mode, some System.Diagnostics.DebuggableAttributes are added to the assembly. One such attribute is "IsJITTrackingEnabled", which will track information during code generation (MSIL) for the debugger.&lt;/p&gt; &lt;p&gt;So, we can use the simple technique of reflection to determine whether the assembly is build against "Debug" or "Release" mode by the presence or absence of IsJITTrackingEnabled attribute. The below method does exactly the same: &lt;/p&gt; &lt;p&gt;&lt;font color="#ff0000"&gt;public static bool IsDebugBuild(System.Reflection.Assembly assembly)&lt;br&gt;{&lt;br&gt;object[] attributes = assembly.GetCustomAttributes(typeof(DebuggableAttribute), false); &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#ff0000"&gt;if (attributes.Length == 0)&lt;br&gt;return false;//No debug attibutes, so release build &lt;/font&gt; &lt;p&gt;&lt;font color="#ff0000"&gt;foreach (Attribute attr in attributes)&lt;br&gt;{&lt;br&gt;if (attr is DebuggableAttribute)&lt;br&gt;{&lt;br&gt;DebuggableAttribute d = attr as DebuggableAttribute;&lt;br&gt;if (d.IsJITTrackingEnabled == true) //this flag is set only for debug builds&lt;br&gt;return true; //Debug&lt;br&gt;else&lt;br&gt;return false; //Release&lt;br&gt;}&lt;br&gt;}&lt;br&gt;throw new Exception("Cannot determine the build type");&lt;br&gt;}&lt;/font&gt; &lt;p&gt;Place the above code in an utility class (external assembly), build and GAC it. Inside your Orchestration, reference the assembly, define a variable (ex: assm) of type "&lt;em&gt;System.Reflection.Assembly&lt;/em&gt;" and call the method &lt;em&gt;IsDebugBuild &lt;/em&gt;as shown below inside your &lt;em&gt;Expression&lt;/em&gt; shape&lt;/p&gt; &lt;p&gt;&lt;font color="#ff0000"&gt;assm = System.Reflection.Assembly.GetExecutingAssembly();&lt;br&gt;System.Diagnostics.Debug.WriteLine(Utility.DetermineDebugOrRelease.IsDebugBuild(assm));&lt;/font&gt;&lt;/p&gt; &lt;p&gt;Place the above code in an utility class (external assembly), build and GAC it. Inside your Orchestration, reference the assembly, define a variable (ex: assm) of type "System.Reflection.Assembly" and call the method IsDebugBuild as shown below inside your Expression shape&lt;br&gt;&lt;/p&gt; &lt;p&gt;assm = System.Reflection.Assembly.GetExecutingAssembly();&lt;br&gt;System.Diagnostics.Debug.WriteLine(Utility.DetermineDebugOrRelease.IsDebugBuild(assm));&lt;br&gt;&lt;/p&gt; &lt;p&gt;NOTE: This example is just to address someone's question. You should try NOT to use this type of code in production. Because reflection is an expensive process and it doesn't really suits well for high throughput BizTalk applications.&lt;br&gt;&lt;/p&gt; &lt;p&gt;Nandri!&lt;br&gt;Saravana&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/2007/06/determine-whether-biztalk-assembly-is_02.html' title='Determine whether the BizTalk assembly is Debug or Release build at runtime.'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10551425&amp;postID=6404191826049795765' title='2 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.digitaldeposit.net/blog' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/6404191826049795765'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/6404191826049795765'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-10551425.post-2255957181020071337</id><published>2007-05-31T18:40:00.001Z</published><updated>2007-06-01T10:08:44.316Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='BIZTALK'/><category scheme='http://www.blogger.com/atom/ns#' term='BizTalk 2006 R2'/><title type='text'>BizTalk 2006 R2 - consume an .ASMX webservice using WCF-BasicHttp adapter</title><content type='html'>&lt;p&gt;Normally when we need to consume a .&lt;em&gt;asmx&lt;/em&gt; web service in BizTalk 2004/2006 (NOT R2) inside an orchestration, we add a web reference, which will create all the multi-part message and web port type required to consume the orchestration. You construct the orchestration and&amp;nbsp;configure the SOAP adapter in the send port to consume the web service. I suppose that's the normal route any BizTalk developer will take when you are put under a circumstance to consume an .asmx webservice using WCF-BasicHttp adapter.&lt;/p&gt; &lt;p&gt;But when you are going to use the WCF-BasicHttp adapter, "&lt;u&gt;&lt;em&gt;Add Web Reference&lt;/em&gt;&lt;/u&gt;" is not going to work, and we need to take advantage of the hidden "&lt;em&gt;&lt;font color="#ff0000"&gt;Consume WCF Service&lt;/font&gt;&lt;/em&gt;" wizard, which comes as part of BizTalk 2006 R2. The wizard will generate required schemas, multi-part messages, orchestration port types, and also binding files for both basicHttp and custom binding. I'll put the steps here to consume a basic .asmx webservice in BizTalk 2006 R2 with WCF-BasicHttp adapter.&lt;/p&gt; &lt;p&gt;The sample webservice we are going to use contains a very simple webmethod as shown below.&lt;/p&gt; &lt;p&gt;&lt;font color="#ff0000"&gt;[WebMethod]&lt;br&gt;public string ConcatName(string firstName, string lastName)&lt;br&gt;{&lt;br&gt;return firstName + " " + lastName;&lt;br&gt;}&lt;/font&gt;&lt;/p&gt; &lt;p&gt;The below walk-through is based on the sample webservice, which comes as part of the &lt;a href="http://www.digitaldeposit.net/blog/samples/ConsumeASMXUsingWCFBasicHttpAdapter.zip"&gt;download&lt;/a&gt;. &lt;/p&gt; &lt;ol&gt; &lt;li&gt;Create a blank BizTalk Project  &lt;li&gt;Right-Click on the project and select &lt;em&gt;Add-&amp;gt;Add Generated Items-&amp;gt;Consume WCF Service&lt;/em&gt;  &lt;li&gt;Select the option "&lt;em&gt;Metadata file (WSDL and XSD)&lt;/em&gt;", Click "Next"  &lt;li&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/Biz.ASMXwebserviceusingWCFBasicHttpadapt_EEAD/image08.png" atomicselection="true"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="365" src="http://www.digitaldeposit.net/blog/images/Biz.ASMXwebserviceusingWCFBasicHttpadapt_EEAD/image0_thumb2.png" width="476" border="0"&gt;&lt;/a&gt;  &lt;li&gt;Open an instance of a browser and navigate to your "&lt;em&gt;.asmx?WSDL&lt;/em&gt;" file and save it somewhere in your harddrive (Example: c:\Service.wsdl).  &lt;li&gt;Click on the "Add" button (next step in the wizard after the one shown above), browse to the .WSDL file you saved in Step 4, Click "Next" (Accept defaults), Click "Import" and then Click "Finish" to complete the wizard.  &lt;li&gt;Once you click "Finish" the following files will be added to your project (File name will depend on the name of the .WSDL file you selected)&lt;br&gt;&lt;font color="#ff0000"&gt;Service.BindingInfo.xml&lt;br&gt;Service.odx&lt;br&gt;Service_Custom.BindingInfo.xml&lt;br&gt;Service.tempuri_org.xsd&lt;/font&gt;  &lt;li&gt;Open the Service.odx file, inside the orchestration view create 2 messages as shown below&lt;br&gt;&lt;font color="#ff0000"&gt;WSRequest - Multi-part Message Type - ConsumeWebService.ConcatNameSoapIn&lt;br&gt;WSResponse - Multi-part Message Type - ConsumeWebService.ConcatNameSoapOut&lt;/font&gt;  &lt;li&gt;Right-Click on the orchestration "&lt;em&gt;Port Surface&lt;/em&gt;", Click "Next", In the port properties page Click "Next", In the "Select a Port Type" page select "&lt;em&gt;Use an existing Port Type&lt;/em&gt;" and select "&lt;em&gt;ConsumeWebService.ServiceSoap&lt;/em&gt;", In port binding page select "&lt;em&gt;I'll be sending a request and receiving a response.&lt;/em&gt;" for port direction and "&lt;em&gt;Specify later&lt;/em&gt;" for port binding. Click "Next" and then "Finish".  &lt;li&gt;Construct an orchestration as shown in the below figure&lt;br&gt;&lt;font color="#ff0000"&gt;Receive_1 -&amp;gt; Activate=true, Message= WSRequest&lt;br&gt;Send_1 -&amp;gt; Message = WSRequest&lt;br&gt;Receive_2 -&amp;gt; Message = WSResponse&lt;br&gt;Send_2 -&amp;gt; Message = WSResponse&lt;/font&gt;  &lt;li&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/Biz.ASMXwebserviceusingWCFBasicHttpadapt_EEAD/image011.png" atomicselection="true"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="357" src="http://www.digitaldeposit.net/blog/images/Biz.ASMXwebserviceusingWCFBasicHttpadapt_EEAD/image0_thumb3.png" width="343" border="0"&gt;&lt;/a&gt;  &lt;li&gt;I created a FILE Receive and FILE Send (Specify Now) port binding for port_2 and port_3  &lt;li&gt;Assign a key file to the project and set the "&lt;em&gt;Application Name&lt;/em&gt;" to "&lt;em&gt;ConsumeWebService&lt;/em&gt;". Build and Deploy the project.&lt;br&gt;Open BizTalk Administration Console, Right-Click on the application and select "&lt;em&gt;Import Binding&lt;/em&gt;". Browse to the &lt;font color="#ff0000"&gt;auto generated&lt;/font&gt; binding file "&lt;em&gt;Service.BindingInfo.xml&lt;/em&gt;" and select it.  &lt;li&gt;Bind your Orchestration to the correct ports and host. For the .asmx webservice logical port, select the auto generated "&lt;em&gt;WcfSendPort_Service_ServiceSoap&lt;/em&gt;". (Start the application)  &lt;li&gt;Create a sample message by right-clicking on "&lt;em&gt;Service_tempuri_org.xsd&lt;/em&gt;" file and clicking "&lt;em&gt;Generate Instance&lt;/em&gt;". Drop the message in the folder you configured for &lt;em&gt;port_2&lt;/em&gt; in the orchestration, you should see the output result in folder you configured for &lt;em&gt;port_3&lt;/em&gt; in your orchestration. &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/samples/ConsumeASMXUsingWCFBasicHttpAdapter.zip"&gt;Download the sample here&lt;/a&gt;  &lt;p&gt;Nandri!  &lt;p&gt;Saravana&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/2007/05/biztalk-2006-r2-consume-asmx-webservice.html' title='BizTalk 2006 R2 - consume an .ASMX webservice using WCF-BasicHttp adapter'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10551425&amp;postID=2255957181020071337' title='11 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.digitaldeposit.net/blog' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/2255957181020071337'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/2255957181020071337'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-10551425.post-8787306079352630168</id><published>2007-05-29T18:33:00.001Z</published><updated>2007-06-01T10:08:11.972Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='BIZTALK'/><category scheme='http://www.blogger.com/atom/ns#' term='BizTalk 2006 R2'/><title type='text'>BizTalk 2006, WCF (basicHttpBinding), Adding Web Reference will go in end less loop.</title><content type='html'>&lt;p&gt;When I tried to add a "Web Reference" to&amp;nbsp;a WCF service (basicHttpBinding), I encountered following behaviors&lt;/p&gt; &lt;p&gt;1. Either it will throw an exception showing "Failed to&amp;nbsp;add Web Reference"&amp;nbsp;and no more clue anywhere, OR&lt;/p&gt; &lt;p&gt;2. Message saying "This page is accessing information that is not under its control. This poses a security risk. Do you want to continue?" it wont wait for your reply, it will go on endless loop until you click "NO" (then you need to close some 50 or windows), OR&lt;/p&gt; &lt;p&gt;3. It will throw an exception message saying, "Could not generate BizTalk files. Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"&lt;/p&gt; &lt;p&gt;I attached following screen shots for reference:&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/BizTalk2006WCFbasicHttpBindingAddingWeb_FA20/image02.png" atomicselection="true"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="309" src="http://www.digitaldeposit.net/blog/images/BizTalk2006WCFbasicHttpBindingAddingWeb_FA20/image0_thumb.png" width="440" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;(OR)&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/BizTalk2006WCFbasicHttpBindingAddingWeb_FA20/image013.png" atomicselection="true"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="81" src="http://www.digitaldeposit.net/blog/images/BizTalk2006WCFbasicHttpBindingAddingWeb_FA20/image0_thumb5.png" width="449" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Tweaking the WCF config file with different setting didn't give me any luck. At last I figured out the issue is due to the namespace declaration for the WCF service. Just removing the namespace declaration and defaulting it to use "&lt;b&gt;http://tempuri.org/&lt;/b&gt;" (which is not the best practice) solved the problem.&lt;/p&gt; &lt;p&gt;Before:&lt;/p&gt; &lt;p&gt;&lt;em&gt;[ServiceContract(Name = "BackOfficeServices", Namespace = http://companyurl/Service/BackOffice)]&lt;/em&gt;&lt;/p&gt; &lt;p&gt;After:&lt;/p&gt; &lt;p&gt;&lt;em&gt;[ServiceContract(Name = "BackOfficeServices"]&lt;/em&gt;&lt;/p&gt; &lt;p&gt;I can't really justify the reason, but I guess it will help someone.&lt;/p&gt; &lt;p&gt;Nandri!&lt;/p&gt; &lt;p&gt;Saravana&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/2007/05/biztalk-2006-wcf-basichttpbinding.html' title='BizTalk 2006, WCF (basicHttpBinding), Adding Web Reference will go in end less loop.'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10551425&amp;postID=8787306079352630168' title='1 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.digitaldeposit.net/blog' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/8787306079352630168'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/8787306079352630168'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-10551425.post-3759945182386452416</id><published>2007-05-29T11:33:00.001Z</published><updated>2007-05-30T21:31:04.333Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='BIZTALK'/><title type='text'>Pipeline Component, XmlSerialization and Performance</title><content type='html'>&lt;p&gt;I'm basically replying to &lt;a href="http://www.sabratech.co.uk/blogs/yossidahan/2007/04/loading-custom-pipeline-component_30.html"&gt;Yossi's post here&lt;/a&gt;. I tried to leave it as a comment in his post but for some reasons my comments are not getting posted in his blog.&lt;/p&gt; &lt;p&gt;Myself and Yossi used to work together in a big public sector Healthcare BizTalk project for nearly 1.5 years.&lt;/p&gt; &lt;p&gt;First off all I need to thank&amp;nbsp;Yossi for his complement about&amp;nbsp;my white paper "&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=8c2572a2-fb61-4016-a7a7-1c37518b39ff&amp;amp;displaylang=en"&gt;Understanding Design-Time Properties for Custom Pipeline Components in BizTalk Server&lt;/a&gt;". Yossi mentioned in his post about the potential performance problem in using XmlSerializer inside pipeline component. Until now I thought his point is valid, but after&amp;nbsp;reading the very first chapter from &lt;a href="http://www.amazon.co.uk/dp/0470046422?tag=biztalk247-21&amp;amp;camp=526&amp;amp;creative=3950&amp;amp;linkCode=st1&amp;amp;creativeASIN=0470046422&amp;amp;adid=1BHZF6AB5FWFJHK533CJ&amp;amp;"&gt;Professional BizTalk Server 2006&lt;/a&gt; by (DJ, KS and EF) , where&amp;nbsp;Darren&amp;nbsp;explains about Serialization and performance hit, its clear there is &lt;font color="#ff0000"&gt;NO PERFORMANCE HIT&lt;/font&gt; by using XmlSerialization in a BizTalk solution. &lt;/p&gt; &lt;p&gt;I thought the explanation will be helpful for readers to make the decision. The following extract is from the book (Page 11): &lt;p&gt;"&lt;em&gt;When you first use the XmlSerializer in your application against a given type, a dynamic class is created and compiled on the fly to represent the serialized class. This has an obvious performance over head, but it will be cached for susbsequent requests &lt;/em&gt; &lt;p&gt;&lt;em&gt;This cache is maintained per AppDomain, which is fine for applications like BizTalk, as there is by default only one AppDomain per BizTalk host.&lt;br&gt;"&lt;/em&gt;.  &lt;p&gt;So, eventually by using XmlSerialization inside the pipeline component, you'll hit the penalty only once during the lifetime of the component. That's until some one restarts the host.  &lt;p&gt;Nandri!,&lt;br&gt;Saravana&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/2007/05/pipeline-component-xmlserialization-and.html' title='Pipeline Component, XmlSerialization and Performance'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10551425&amp;postID=3759945182386452416' title='6 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.digitaldeposit.net/blog' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/3759945182386452416'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/3759945182386452416'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-10551425.post-6021756902628131532</id><published>2007-05-25T18:52:00.001Z</published><updated>2007-05-30T21:31:04.334Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='BIZTALK'/><title type='text'>Create SQL Receive Locations Programmatically.</title><content type='html'>One of our recent projects involved creating an orchestration, which was bound to a physical one way receive port polling data from SQL server.&amp;nbsp; There will be multiple SQL receive locations for the same&amp;nbsp;receive port. The receive locations will have different polling conditions based on the customer. Our requirement was to create one receive location per customer. So, we'll be adding more SQL receive locations as the customer base increases.&amp;nbsp; For that reason I created this function (part of a bigger client application) which create SQL receive location programmatically, which uses BizTalk Catalogue explorer object (no WMI). Hope this will be helpful to some one, because there is minor things to take care of.  &lt;div&gt;&amp;nbsp;&lt;/div&gt; &lt;div&gt;You can download the &lt;a href="http://www.digitaldeposit.net/blog/samples/sqlreceiveloc.zip"&gt;.CS file from here&lt;/a&gt;.&lt;/div&gt; &lt;div&gt;&amp;nbsp;&lt;/div&gt; &lt;div&gt;The below figure shows a SQL receive location created with help of the above function. &lt;/div&gt; &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/CreateSQLReceiveLocationsProgrammatical_8CD0/image09.png" atomicselection="true"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="335" src="http://www.digitaldeposit.net/blog/images/CreateSQLReceiveLocationsProgrammatical_8CD0/image0_thumb3.png" width="440" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;How To Execute it:&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Here is the sample code, which is used to run the function.&lt;/p&gt; &lt;div class="formatedCode"&gt;&lt;font color="blue"&gt;string&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;server&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color="#808080"&gt;"SK_WORKSTATION"&lt;/font&gt;&lt;font color="blue"&gt;;&lt;br&gt;string&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;database&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color="#808080"&gt;"ORDER_POLLING"&lt;/font&gt;&lt;font color="blue"&gt;;&lt;br&gt;string&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;address&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color="#808080"&gt;"SQL://"&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;+&amp;nbsp;server&amp;nbsp;+&amp;nbsp;&lt;/font&gt;&lt;font color="#808080"&gt;"/"&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;+&amp;nbsp;database&amp;nbsp;+&amp;nbsp;&lt;/font&gt;&lt;font color="#808080"&gt;"/"&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;+&amp;nbsp;Guid.NewGuid().ToString()&lt;/font&gt;&lt;font color="blue"&gt;;&lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;font color="black"&gt;CreateAndConfigureSQLReceiveLocation(&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="#808080"&gt;"Receive.SQL.Autogenerated.SK1"&lt;br&gt;&lt;/font&gt;&lt;font color="black"&gt;,&amp;nbsp;&lt;/font&gt;&lt;font color="#808080"&gt;"Receive.Sch.Orders.Internal.SQL.1Way.AllPollingService.ActivationMessages"&lt;br&gt;&lt;/font&gt;&lt;font color="black"&gt;,&amp;nbsp;address&lt;br&gt;,&amp;nbsp;&lt;/font&gt;&lt;font color="#808080"&gt;"False"&lt;br&gt;&lt;/font&gt;&lt;font color="black"&gt;,&amp;nbsp;&lt;/font&gt;&lt;font color="#808080"&gt;"Minutes"&lt;br&gt;&lt;/font&gt;&lt;font color="black"&gt;,&amp;nbsp;&lt;/font&gt;&lt;font color="#808080"&gt;"10"&lt;br&gt;&lt;/font&gt;&lt;font color="black"&gt;,&amp;nbsp;&lt;/font&gt;&lt;font color="#808080"&gt;"DocumentRootElement"&lt;br&gt;&lt;/font&gt;&lt;font color="black"&gt;,&amp;nbsp;&lt;/font&gt;&lt;font color="#808080"&gt;"http://www.digitaldeposit.net/samples/SQL/schema"&lt;br&gt;&lt;/font&gt;&lt;font color="black"&gt;,&amp;nbsp;&lt;/font&gt;&lt;font color="#808080"&gt;"exec&amp;nbsp;[GetSQLActivationMessage]&amp;nbsp;@AccountNumber='007'"&lt;br&gt;&lt;/font&gt;&lt;font color="black"&gt;,&amp;nbsp;&lt;/font&gt;&lt;font color="#808080"&gt;"Provider=SQLOLEDB.1;Integrated&amp;nbsp;Security=SSPI;Persist&amp;nbsp;Security&amp;nbsp;Info=False;User&amp;nbsp;ID=sa;Initial&amp;nbsp;Catalog=ORDER_POLLING;Data&amp;nbsp;Source=SK_WORKSTATION"&lt;br&gt;&lt;/font&gt;&lt;font color="black"&gt;,&amp;nbsp;&lt;/font&gt;&lt;font color="#808080"&gt;"Data&amp;nbsp;Source=(local);Initial&amp;nbsp;Catalog=BiztalkMgmtDb;Integrated&amp;nbsp;Security=true;Trusted_Connection=True"&lt;br&gt;&lt;/font&gt;&lt;font color="black"&gt;)&lt;/font&gt;&lt;font color="blue"&gt;;&lt;/font&gt; &lt;/div&gt; &lt;p&gt;NOTE: The function assumes you already got a "Receive Port" (which you pass as second argument to the function), but its not hard to create it inside the function.&lt;/p&gt; &lt;p&gt;Nandri!&lt;br&gt;Saravana&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/2007/05/create-sql-receive-locations.html' title='Create SQL Receive Locations Programmatically.'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10551425&amp;postID=6021756902628131532' title='1 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.digitaldeposit.net/blog' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/6021756902628131532'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/6021756902628131532'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-10551425.post-6649645301883653376</id><published>2007-05-24T05:56:00.001Z</published><updated>2007-05-24T06:13:20.096Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='BIZTALK'/><title type='text'>Output custom formatted message from Orchestration.</title><content type='html'>&lt;p&gt;Have you ever wanted to create a custom formatted message. For example if you define a message of type &lt;em&gt;System.String&lt;/em&gt; inside your orchestration and output it via an adapter the result will be as shown below&lt;/p&gt; &lt;p&gt;&lt;font color="#ff0000"&gt;&amp;lt;?xml version="1.0" ?&amp;gt; &lt;br&gt;&amp;lt;string&amp;gt;Hello there&amp;lt;/string&amp;gt;&lt;/font&gt;  &lt;p&gt;this is because of the default serialization behavior of .NET base types within BizTalk. If in case you wanted to output the message as a simple string, in our case "&lt;font color="#ff0000"&gt;Hello there&lt;/font&gt;" without any xml tags and processing instruction, you need to create your own .NET type with custom serialization and use it instead of &lt;em&gt;System.String&lt;/em&gt; . In this post I'll explain how you can achieve this seamlessly&amp;nbsp;with a similar sample&amp;nbsp;by creating your own class with your own custom formatting serialization technique to create a sample email text message from an XML message. The &lt;a href="http://www.digitaldeposit.net/blog/samples/CustomEmailFormat.zip"&gt;sample solution&lt;/a&gt; contains full working sample and the code is self explanatory.  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Orchestration:&lt;/u&gt;&lt;/strong&gt;  &lt;p&gt;We got a simple orchestration which takes an input XML message and produces the output in text format.  &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/OutputcustomformattedmessagefromOrchest_EA16/image02.png" atomicselection="true"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="368" src="http://www.digitaldeposit.net/blog/images/OutputcustomformattedmessagefromOrchest_EA16/image0_thumb.png" width="290" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;em&gt;MSG_TEXT_EMAIL&lt;/em&gt;&amp;nbsp; is a message created from a custom .NET class called&amp;nbsp;&lt;em&gt;FormattedTextEmail&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;The message assignment shape got the following one line code, which assigns a .NET type to the Orchestration XLang message MSG_TEXT_EMAIL.&lt;/p&gt; &lt;p&gt;&lt;font color="#ff0000"&gt;&lt;em&gt;MSG_TEXT_EMAIL = new FormattedEmail.FormattedTextEmail(MSG_XML_EMAIL.From, MSG_XML_EMAIL.To,MSG_XML_EMAIL.Subject, MSG_XML_EMAIL.Body);&lt;/em&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;As you can see there is no MAP's involved to do the transformation.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Input:&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;div class="formatedCode"&gt;&lt;font color="blue"&gt;&amp;lt;&lt;/font&gt;&lt;font color="maroon"&gt;ns0:EmailMessage&lt;/font&gt;&lt;font color="red"&gt;&amp;nbsp;xmlns:ns0&lt;/font&gt;&lt;font color="blue"&gt;="http://www.digitaldeposit.net/sample/schema"&amp;gt;&lt;/font&gt;&lt;font color="black"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;&amp;lt;&lt;/font&gt;&lt;font color="maroon"&gt;From&lt;/font&gt;&lt;font color="blue"&gt;&amp;gt;&lt;/font&gt;&lt;font color="black"&gt;sk@email.com&lt;/font&gt;&lt;font color="blue"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="maroon"&gt;From&lt;/font&gt;&lt;font color="blue"&gt;&amp;gt;&lt;/font&gt;&lt;font color="black"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;&amp;lt;&lt;/font&gt;&lt;font color="maroon"&gt;To&lt;/font&gt;&lt;font color="blue"&gt;&amp;gt;&lt;/font&gt;&lt;font color="black"&gt;gow@biz.com&lt;/font&gt;&lt;font color="blue"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="maroon"&gt;To&lt;/font&gt;&lt;font color="blue"&gt;&amp;gt;&lt;/font&gt;&lt;font color="black"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;&amp;lt;&lt;/font&gt;&lt;font color="maroon"&gt;Subject&lt;/font&gt;&lt;font color="blue"&gt;&amp;gt;&lt;/font&gt;&lt;font color="black"&gt;Hey&amp;nbsp;are&amp;nbsp;you&amp;nbsp;alrigh&lt;/font&gt;&lt;font color="blue"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="maroon"&gt;Subject&lt;/font&gt;&lt;font color="blue"&gt;&amp;gt;&lt;/font&gt;&lt;font color="black"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;&amp;lt;&lt;/font&gt;&lt;font color="maroon"&gt;Body&lt;/font&gt;&lt;font color="blue"&gt;&amp;gt;&lt;/font&gt;&lt;font color="black"&gt;I&amp;nbsp;found&amp;nbsp;this&amp;nbsp;sample&amp;nbsp;really&amp;nbsp;cool&lt;/font&gt;&lt;font color="blue"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="maroon"&gt;Body&lt;/font&gt;&lt;font color="blue"&gt;&amp;gt;&lt;/font&gt;&lt;font color="black"&gt;&lt;br&gt;&lt;/font&gt;&lt;font color="blue"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="maroon"&gt;ns0:EmailMessage&lt;/font&gt;&lt;font color="blue"&gt;&amp;gt;&lt;/font&gt;&lt;font color="black"&gt;&lt;/font&gt; &lt;/div&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Output:&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;From : sk@email.com&lt;br&gt;To : gow@biz.com&lt;br&gt;Subject : Hey are you alrigh&lt;br&gt;Body : I found this sample really cool&lt;/p&gt; &lt;p&gt;Download Sample: &lt;a href="http://www.digitaldeposit.net/blog/samples/CustomEmailFormat.zip"&gt;CustomEmailFormat&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Executing the sample:&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;1. Extract the solution to C:\BTSSamples&lt;/p&gt; &lt;p&gt;2. Open the visual studio solution, build and deploy it&lt;/p&gt; &lt;p&gt;3. Open BizTalk administration console, Open application "CustomEmailFormat", &amp;nbsp;Bind orchestration and Start the application&lt;/p&gt; &lt;p&gt;4. Drop the sample message inside the folder "C:\BTSSamples\CustomEmailFormat\FileDrop\In"&lt;/p&gt; &lt;p&gt;5. You should see the text output inside the folder "C:\BTSSamples\CustomEmailFormat\FileDrop\Out"&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Related Reading:&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a title="http://msdn2.microsoft.com/en-us/library/bb418739.aspx" href="http://msdn2.microsoft.com/en-us/library/bb418739.aspx"&gt;http://msdn2.microsoft.com/en-us/library/bb418739.aspx&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Nandri!&lt;/p&gt; &lt;p&gt;Saravana&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/2007/05/output-custom-formatted-message-from.html' title='Output custom formatted message from Orchestration.'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10551425&amp;postID=6649645301883653376' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.digitaldeposit.net/blog' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/6649645301883653376'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/6649645301883653376'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-10551425.post-7939644566352497674</id><published>2007-05-24T05:49:00.001Z</published><updated>2007-05-24T06:01:36.816Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='BIZTALK'/><title type='text'>Can't see Debug statements in DebugView?</title><content type='html'>&lt;p&gt;First of all to see debug statements inside &lt;a href="http://www.microsoft.com/technet/sysinternals/utilities/debugview.mspx"&gt;DebugView&lt;/a&gt; you need to compile your assemblies in "Debug" mode. For optimization reasons if you compile your assemblies in "Release" mode all the &lt;em&gt;System.Diagnostics.Debug.WriteLine &lt;/em&gt;statements will be ignored by the compiler and you won't see any output in the DebugView.&lt;/p&gt; &lt;p&gt;When it comes to BizTalk project sometimes even though the tool bar will say the build is "Debug" as shown in the figure &lt;/p&gt; &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/CantseeDebugstatementsinDebugView_DC32/image05.png" atomicselection="true"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="46" src="http://www.digitaldeposit.net/blog/images/CantseeDebugstatementsinDebugView_DC32/image0_thumb3.png" width="290" border="0"&gt;&lt;/a&gt;&amp;nbsp; &lt;/p&gt; &lt;p&gt;When you actually look into the properties of the BizTalk project it may be configured for "Deployment", which is equivalent to the "Release" build and it won't emit any debug symbols.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.digitaldeposit.net/blog/images/CantseeDebugstatementsinDebugView_DC32/image010.png" atomicselection="true"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="147" src="http://www.digitaldeposit.net/blog/images/CantseeDebugstatementsinDebugView_DC32/image0_thumb4.png" width="311" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;So, in this case you need to set the configuration to "Development", which is equivalent to "Debug" build.&lt;/p&gt; &lt;p&gt;Nandri!&lt;/p&gt; &lt;p&gt;Saravana&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://www.digitaldeposit.net/blog/2007/05/can-see-debug-statements-in-debugview.html' title='Can&amp;#39;t see Debug statements in DebugView?'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10551425&amp;postID=7939644566352497674' title='3 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.digitaldeposit.net/blog' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/7939644566352497674'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10551425/posts/default/7939644566352497674'/><author><name>Saravana Kumar</name><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-10551425.post-5018405441180947882</id><published>2007-05-23T11:43:00.001Z</published><updated>2007-05-24T06:02:29.954Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><title type='text'>ASP .NET Treeview Control, weird problem when you Programmatically expand the nodes.</title><content type='html'>&lt;p&gt;One of my supporting project required building a web site using TreeView control to show hierarchical data. I used "&lt;em&gt;NavigateUrl&lt;/em&gt;" property while data binding, so that every node in the tree view will have proper link something like &lt;em&gt;http://abc.com/bts/default.aspx&lt;/em&gt; instead of &lt;em&gt;Javascript:__doPostBack&lt;/em&gt;. Even though all of my pages are going to have the treeview control on the left, I'll lose the expanded status because the control will be navigated to a brand new page and whole page will be loaded from scratch. So, my requirement is to set the treeview expanded status programmatically.&lt;/p&gt; &lt;p&gt;What do you think of this line of code?&lt;/p&gt; &lt;p&gt;&lt;font color="#ff8000"&gt;TreeView1.FindNode("BizTalk Server|Planning and Architecture|Patterns").Expand();&lt;/font&gt;&lt;/p&gt; &lt;p&gt;("|" is the path separator)&lt;/p&gt; &lt;p&gt;Perfectly alright right? But, the output will only expand the node till&amp;nbsp;"Planning and Architecture", I tried different things like putting the code in different event handlers like page_prerender, treeview_databound, navigating to the node via Nodes and ChildNodes property etc, etc. Whatsoever I couldn't make it work. Google search revealed similar problems but no solution. At last I managed to find the solution from the book "&lt;a href="http://www.amazon.com/Professional-ASP-NET-2-0-Bill-Evjen/dp/0764576100"&gt;Professional ASP .NET 2.0&lt;/a&gt;" (Page: 525) the code should be written this way:&lt;/p&gt; &lt;p&gt;&lt;font color="#ff8000"&gt;TreeView1.FindNode("BizTalk Server").Expand();&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#ff8000"&gt;TreeView1.FindNode("BizTalk Server|Planning and Architecture").Expand();&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font co