<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://bloggingabout.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Vincent Scheel</title><link>http://bloggingabout.net/blogs/vincent/default.aspx</link><description>Blogging about my adventures with BizTalk Server.</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>BizTalk BAM event not written from PipelineComponent when port fails</title><link>http://bloggingabout.net/blogs/vincent/archive/2010/04/07/bam-event-not-written-from-pipelinecomponent-when-port-fails.aspx</link><pubDate>Wed, 07 Apr 2010 13:25:00 GMT</pubDate><guid isPermaLink="false">813b6dfd-644e-4573-a816-eebab56ba0d0:483068</guid><dc:creator>Vincent Scheel</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/vincent/rsscomments.aspx?PostID=483068</wfw:commentRss><comments>http://bloggingabout.net/blogs/vincent/archive/2010/04/07/bam-event-not-written-from-pipelinecomponent-when-port-fails.aspx#comments</comments><description>&lt;p&gt;When developing a custom PipelineComponent I spend quite a while overlooking the obvious. For all those who also overlook this:&lt;/p&gt;
&lt;p&gt;When writing BAM from a PipelineComponent it is a good practice to use the &lt;i&gt;PipelineContext.GetEventStream()&lt;/i&gt; method to get the BAM eventstream. This way your BAM events will piggyback ride along on the SQL calls already made by the BizTalk messaging engine.&lt;/p&gt;
&lt;p&gt;Firstly I wrote a little console app to create some BAM instances from code using a DirectEventStream. When this gave the results I wanted, I developed the PipelineComponent using the same code, but with the MessagingEventstream instead of the DirectEventStream. After I wrote the PipelineComponent and created a little sample with just a receive port (which would cause a routing failure), the BAM instance did not show up in the database.&lt;/p&gt;
&lt;p&gt;I was not sure if the&amp;nbsp;&lt;i&gt;PipelineContext.GetEventStream()&lt;/i&gt; method worked correctly, so I tried to use the DirectEventStream in the PipelineComponent to see if that would work. It did. After that I added some Debug statements in the component using the correct EventStream and ran it again. All the debug statements were hit, but nothing showed up in the database.&lt;/p&gt;
&lt;p&gt;Then it suddenly dawned on me... Since the port was failing due to the routing failure, maybe the transaction of the MessagingEventstream was cancelled? After adding a send port to solve the routing failure, the next BAM activity did show up.&lt;/p&gt;
&lt;p&gt;So, if you use the&amp;nbsp;&lt;i&gt;PipelineContext.GetEventStream()&lt;/i&gt; method it will only store information if the entire receive port was executed succesfully. If this is your requirement, that is fine, but if you want to store everything that goes through the pipeline, don&amp;#39;t use the MessagingEventStream.&lt;/p&gt;
&lt;p&gt;Update: after the comment by&amp;nbsp;Thiago Almeida I tried the same for a send port. In a send port the BAM event is written even if the send port fails. Also a thing to keep in mind.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=483068" width="1" height="1"&gt;</description><category domain="http://bloggingabout.net/blogs/vincent/archive/tags/BizTalk/default.aspx">BizTalk</category><category domain="http://bloggingabout.net/blogs/vincent/archive/tags/BAM/default.aspx">BAM</category><category domain="http://bloggingabout.net/blogs/vincent/archive/tags/eventstream/default.aspx">eventstream</category><category domain="http://bloggingabout.net/blogs/vincent/archive/tags/PipelineComponent/default.aspx">PipelineComponent</category></item><item><title>BizTalk: Two versions of a schema side by side and using them in orchestrations</title><link>http://bloggingabout.net/blogs/vincent/archive/2010/01/26/biztalk-two-versions-of-a-schema-side-by-side-and-using-them-in-orchestrations-UnexpectedMessageTypeException.aspx</link><pubDate>Tue, 26 Jan 2010 14:01:00 GMT</pubDate><guid isPermaLink="false">813b6dfd-644e-4573-a816-eebab56ba0d0:482759</guid><dc:creator>Vincent Scheel</dc:creator><slash:comments>8</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/vincent/rsscomments.aspx?PostID=482759</wfw:commentRss><comments>http://bloggingabout.net/blogs/vincent/archive/2010/01/26/biztalk-two-versions-of-a-schema-side-by-side-and-using-them-in-orchestrations-UnexpectedMessageTypeException.aspx#comments</comments><description>&lt;p&gt;Schema versioning in BizTalk is always a difficult thing to do. When small changes are done on a schema (for a new solution), but this schema is already in use by a solution which is currently in production, you have to be very careful.&lt;/p&gt;
&lt;p&gt;BizTalk defines the schema type of a message by the combination: &lt;em&gt;targetnamespace#rootnode&lt;/em&gt; to make a MessageType unique (for example:&amp;nbsp;http://mynamespace.com/#MyRootNode). This will define the type of the message and is also used in subscriptions.&lt;/p&gt;
&lt;p&gt;If you deploy two schemas with the same MessageType in different assemblies and you try to receive an instance with this MessageType, BizTalk will give you a routing failure telling you it is not able to determine the exact MessageType (the MessageType is found multiple times in the database).&lt;/p&gt;
&lt;p&gt;Suppose you have schema X in DLL Y version 1.0.0.0 and you fix a bug (change a nodes&amp;rsquo; default value for example) for a new version of a solution, and increase DLL Ys version to 1.0.1.0. If you deploy this new version of DLL Y side by side with an old version, BizTalk is smart enough to see that it is a newer version and will use this newer version of schema X for received messages with this MessageType. No routing failure! This works excellent in a message-only scenario.&lt;/p&gt;
&lt;p&gt;So far, so good. If you use the MessageType in a receive shape in an orchestration, this orchestration has a subscription on this MessageType. That is what you expect and see in the &amp;lsquo;View subscriptions&amp;rsquo; panel of the Administration Console:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:12pt;font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-ansi-language:EN-GB;mso-fareast-language:NL;mso-bidi-language:AR-SA;" lang="EN-GB"&gt;&lt;a href="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vincent/3005.subscriptionsidebysideschemas.JPG"&gt;&lt;img border="0" src="http://bloggingabout.net/resized-image.ashx/__size/550x0/__key/CommunityServer.Blogs.Components.WeblogFiles/vincent/3005.subscriptionsidebysideschemas.JPG" alt="" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;As you can see, there is no assembly version shown here! But since the orchestration is developed with a certain version of a schema, the actual orchestration code does expect a certain version of the schema for the received instance. Meaning that the subscription will work, but the orchestration can&amp;rsquo;t use the message, because it was typed as the 1.0.1.0 version and the orchestrations expects the 1.0.0.0 version. This will generate an error in the Administration Console as follows:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Uncaught exception (see the &amp;#39;inner exception&amp;#39; below) has suspended an instance of service &amp;#39;VersioningTestBTProjOrchv1000.BizTalk_Orchestrationv0100(e0f5b7e2-7e31-550e-1022-af218b9002bc)&amp;#39;.&lt;br /&gt;The service instance will remain suspended until administratively resumed or terminated. &lt;br /&gt;If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.&lt;br /&gt;InstanceId: 8b5f3dd1-42b6-4bb0-b7a4-ecd87ced4813&lt;br /&gt;Shape name: Receive_1&lt;br /&gt;ShapeId: 4747131a-9c71-46e6-a99a-319053adcfe7&lt;br /&gt;Exception thrown from: segment 1, progress 3&lt;br /&gt;Inner exception: Received unexpected message type &amp;#39;VersioningTestProject.Schemas.SchemaIncoming_v0100, VersioningTestProject, Version=1.0.1.0, Culture=neutral, PublicKeyToken=b5c9ca1ed57903d0&amp;#39; does not match expected type &amp;#39;VersioningTestProject.Schemas.SchemaIncoming_v0100, VersioningTestProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b5c9ca1ed57903d0&amp;#39;.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;Exception type: UnexpectedMessageTypeException&lt;br /&gt;Source: Microsoft.XLANGs.Engine&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;BizTalk does not automatically know for which orchestration to use the old version and for which the new version. You could say that BizTalk should be smart enough to see that an orchestration obviously expects the older version and cast the message to the correct version before feeding it to the orchestration. But this might lead to unforeseen behaviour and probably is not done this way to avoid errors.&lt;/p&gt;
&lt;p&gt;There is an easy fix for this problem. You probably have a different receive location for the newer version of the schema, since the old version is running side by side. You can tell BizTalk to cast a received message to a certain version of the schema. This way it will not automatically cast the message to the latest version, but it will cast it to your specified version. This can be done on the XMLReceive pipeline as follows:&lt;/p&gt;
&lt;p&gt;1 &amp;ndash; Open the XMLReceive pipeline properties:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vincent/8130.pipelineprop1sidebysideschemas.JPG"&gt;&lt;img border="0" width="521" src="http://bloggingabout.net/resized-image.ashx/__size/550x0/__key/CommunityServer.Blogs.Components.WeblogFiles/vincent/8130.pipelineprop1sidebysideschemas.JPG" height="408" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;2 &amp;ndash; Enter the fully qualified name of the type you are going to receive as the DocumentSpecNames property.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;The name should look like: &amp;lsquo;&lt;b style="mso-bidi-font-weight:normal;"&gt;FullSchemaTypeName, FullAssemblyName&amp;rsquo;&lt;/b&gt; (for example: VersioningTestProject.Schemas.SchemaIncoming_v0100, VersioningTestProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b5c9ca1ed57903d0). This information can be found by double clicking the deployed schema in the BizTalk Administration Console.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vincent/6761.pipelineprop2sidebysideschemas.JPG"&gt;&lt;img border="0" src="http://bloggingabout.net/resized-image.ashx/__size/550x0/__key/CommunityServer.Blogs.Components.WeblogFiles/vincent/6761.pipelineprop2sidebysideschemas.JPG" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Voila, now BizTalk will cast your message to the specified version and your old orchestration will run just fine&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Of course this only works if you have separate receive locations for all versions and you can use the XMLReceive pipeline (or any other pipeline containing the XML dissambler component), but it might just help you out. (Only tested in BizTalk Server 2006 R2)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=482759" width="1" height="1"&gt;</description><category domain="http://bloggingabout.net/blogs/vincent/archive/tags/BizTalk/default.aspx">BizTalk</category><category domain="http://bloggingabout.net/blogs/vincent/archive/tags/SIde+by+Side/default.aspx">SIde by Side</category><category domain="http://bloggingabout.net/blogs/vincent/archive/tags/subscription/default.aspx">subscription</category><category domain="http://bloggingabout.net/blogs/vincent/archive/tags/UnexpectedMessageTypeException/default.aspx">UnexpectedMessageTypeException</category><category domain="http://bloggingabout.net/blogs/vincent/archive/tags/versioning/default.aspx">versioning</category><category domain="http://bloggingabout.net/blogs/vincent/archive/tags/Schema/default.aspx">Schema</category><category domain="http://bloggingabout.net/blogs/vincent/archive/tags/Deployment/default.aspx">Deployment</category></item><item><title>Exposing BizTalk Schemas as a SOAP-RPC/Encoded webservice</title><link>http://bloggingabout.net/blogs/vincent/archive/2010/01/12/exposing-biztalk-schemas-as-a-soap-rpc-encoded-webservice.aspx</link><pubDate>Tue, 12 Jan 2010 08:38:00 GMT</pubDate><guid isPermaLink="false">813b6dfd-644e-4573-a816-eebab56ba0d0:482677</guid><dc:creator>Vincent Scheel</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/vincent/rsscomments.aspx?PostID=482677</wfw:commentRss><comments>http://bloggingabout.net/blogs/vincent/archive/2010/01/12/exposing-biztalk-schemas-as-a-soap-rpc-encoded-webservice.aspx#comments</comments><description>&lt;p&gt;Yesterday I had to connect a Delphi back-end system to the BizTalk 2006 R2 environment&amp;nbsp;of my customer.&amp;nbsp;Since this Delphi system could only call webservices exposed as SOAP-RPC/Encoded, I had to expose the needed schemas as such.&lt;/p&gt;
&lt;p&gt;While searching on this subject I found a good post of &lt;em&gt;Tomas Restrepo&lt;/em&gt; on consuming SOAP-RPC/Encoded webservices: &lt;a href="http://winterdom.com/2005/07/consumingrpcencodedwebservicesfrombiztalk"&gt;http://winterdom.com/2005/07/consumingrpcencodedwebservicesfrombiztalk&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This explains how you have to work with multipart messagetypes to &lt;span style="text-decoration:underline;"&gt;call&lt;/span&gt; a SOAP-RPC/Encoded webservice. At first I figured I would have to do something alike to expose my schemas as a SOAP-RPC/Encoded webservice. However, this is actually very easy.&lt;/p&gt;
&lt;p&gt;With the .Net framework you can easily expose a webservice as SOAP-RPC/Encoded by setting the correct attribute on the webmethod. To achieve this you should do the following to the generated webservice code&amp;nbsp;&lt;span style="text-decoration:underline;"&gt;after&lt;/span&gt; exposing your schemas as a webservice using the default &lt;em&gt;BizTalk Web Services Publishing Wizard&lt;/em&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Comment out (or delete) the &lt;span style="font-size:x-small;color:#008080;"&gt;SoapDocumentMethodAttribute&lt;/span&gt; on the WebMethod and the &lt;span style="font-size:x-small;color:#008080;"&gt;SoapDocumentServiceAttribute&lt;/span&gt; on the class that are set by default by the wizard.&lt;/li&gt;
&lt;li&gt;Set the &lt;span style="font-size:x-small;color:#008080;"&gt;SoapRpcMethod&lt;/span&gt; attribute on the WebMethod and the &lt;span style="font-size:x-small;color:#008080;"&gt;SoapRpcService&lt;/span&gt; attribute on the class.&lt;/li&gt;
&lt;li&gt;You can set parameters on both new attributes to change the behaviour and settings of the SOAP-RPC/Encoded service&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That&amp;#39;s it. Since the .Net Framework creates an object based on your schema of the webrequest and uses this to call BizTalk, you don&amp;#39;t have to change anything on the BizTalk side to expose your schema&amp;#39;s as a SOAP-RPC/Encoded webservice. Now that is easy!&lt;/p&gt;
&lt;p&gt;While on the subject of exposing schemas as a webservice: the generated webservice has &amp;#39;&lt;span style="font-size:x-small;"&gt;ParameterStyle=System.Web.Services.Protocols.&lt;/span&gt;&lt;span style="font-size:x-small;color:#008080;"&gt;SoapParameterStyle&lt;/span&gt;&lt;span style="font-size:x-small;"&gt;.Default&lt;/span&gt;&amp;#39; set on the SoapDocumentMethodAttribute by default. This causes an extra node in the envelope body named like the WebMethod&amp;#39;s name. If you don&amp;#39;t want this extra node, you can set the &amp;#39;ParameterStyle&amp;#39; to &amp;#39;System.Web.Services.Protocols.&lt;span style="font-size:x-small;color:#008080;"&gt;SoapParameterStyle&lt;/span&gt;&lt;span style="font-size:x-small;"&gt;.Bare&lt;/span&gt;&amp;#39; and the extra node is not used anymore.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=482677" width="1" height="1"&gt;</description><category domain="http://bloggingabout.net/blogs/vincent/archive/tags/Encoded/default.aspx">Encoded</category><category domain="http://bloggingabout.net/blogs/vincent/archive/tags/2006/default.aspx">2006</category><category domain="http://bloggingabout.net/blogs/vincent/archive/tags/SOAP-RPC/default.aspx">SOAP-RPC</category><category domain="http://bloggingabout.net/blogs/vincent/archive/tags/R2/default.aspx">R2</category><category domain="http://bloggingabout.net/blogs/vincent/archive/tags/BizTalk/default.aspx">BizTalk</category><category domain="http://bloggingabout.net/blogs/vincent/archive/tags/WebService/default.aspx">WebService</category><category domain="http://bloggingabout.net/blogs/vincent/archive/tags/.Net/default.aspx">.Net</category></item><item><title>Start to blog on BloggingAbout.Net</title><link>http://bloggingabout.net/blogs/vincent/archive/2010/01/12/start-to-blog-on-bloggingabout-net.aspx</link><pubDate>Tue, 12 Jan 2010 07:38:00 GMT</pubDate><guid isPermaLink="false">813b6dfd-644e-4573-a816-eebab56ba0d0:482676</guid><dc:creator>Vincent Scheel</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/vincent/rsscomments.aspx?PostID=482676</wfw:commentRss><comments>http://bloggingabout.net/blogs/vincent/archive/2010/01/12/start-to-blog-on-bloggingabout-net.aspx#comments</comments><description>&lt;p&gt;Today I have started a blog on BloggingAbout.Net. Here I will be posting my findings on Microsoft BizTalk Server and .Net development.&lt;/p&gt;
&lt;p&gt;For the past five years I have been working with .Net (mostly ASP.NET)&amp;nbsp;and Microsoft BizTalk Server and many times I turned to blogs for finding answers to tech related questions. I decided I would like to give back to the community I have turned to many times. From of today I will be posting my findings and hopefully help someone out the way blogs have always helped, and will always help, me out.&lt;/p&gt;
&lt;p&gt;Expect the first technical post later today. Please do not hesitate to comment, so I can make this blog better!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=482676" width="1" height="1"&gt;</description><category domain="http://bloggingabout.net/blogs/vincent/archive/tags/BizTalk/default.aspx">BizTalk</category><category domain="http://bloggingabout.net/blogs/vincent/archive/tags/.Net/default.aspx">.Net</category><category domain="http://bloggingabout.net/blogs/vincent/archive/tags/Blog/default.aspx">Blog</category></item></channel></rss>