<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>BizTalk</title>
        <link>http://geekswithblogs.net/plundberg/category/9197.aspx</link>
        <description>BizTalk</description>
        <language>sv-FI</language>
        <copyright>plundberg</copyright>
        <managingEditor>per.lundberg@ecraft.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>Be careful when setting GenerateCSFiles to 1</title>
            <link>http://geekswithblogs.net/plundberg/archive/2009/03/11/be-careful-when-setting-generatecsfiles-to-1.aspx</link>
            <description>If you, like me, have set the GenerateCSFiles property to 1 (as described &lt;a href="http://arnulfowing.blogspot.com/2007/10/c-generated-code-from-biztalk.html"&gt;here&lt;/a&gt;) to get BizTalk to keep the .cs files after they have been generated from the orchestrations and maps, be a bit aware that it &lt;span style="font-style: italic;"&gt;can&lt;/span&gt; cause some weird problems sometimes.&lt;br /&gt;
&lt;br /&gt;
I just had one of my orchestrations indicating that there was an error with some of the shapes. The map was missing, seemingly. The odd thing was that the whole solution was compiling correctly, so the problem seemed only to affect the editor.&lt;br /&gt;
&lt;br /&gt;
When looking at the "configure map" settings, the map the shape was referring to had just &lt;span style="font-style: italic;"&gt;disappeared&lt;/span&gt;. Yeah, you heard me. It was completely gone. Why? I don't know. The file was located in the project, it was set to Compile on build, but... it didn't work.&lt;br /&gt;
&lt;br /&gt;
The solution: close down Visual Studio. Remove all .cs files from the folder with the orchestration and the folder with the maps. Open the solution, and the problem was gone... &lt;img src="http://geekswithblogs.net/plundberg/aggbug/130010.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>plundberg</dc:creator>
            <guid>http://geekswithblogs.net/plundberg/archive/2009/03/11/be-careful-when-setting-generatecsfiles-to-1.aspx</guid>
            <pubDate>Wed, 11 Mar 2009 17:19:40 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/plundberg/comments/130010.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/plundberg/archive/2009/03/11/be-careful-when-setting-generatecsfiles-to-1.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/plundberg/comments/commentRss/130010.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Script calling external assemblies - be aware that it uses "dynamic binding"</title>
            <link>http://geekswithblogs.net/plundberg/archive/2008/12/15/script-calling-external-assemblies---be-aware-that-it-uses.aspx</link>
            <description>I've been having an error lately that looks like this in the event log:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: Courier New;"&gt;Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'SomeRoutines.OrderHandler(1f254f9a-5838-1051-30a3-ca1c40b2906f)'.&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: 875947d5-5c01-4ad7-9d62-a033902a3133&lt;br /&gt;
Shape name: ConstructUpdateMessage&lt;br /&gt;
ShapeId: 43a0909e-5877-4e6e-a6a0-c4bbb7c5c644&lt;br /&gt;
Exception thrown from: segment 1, progress 12&lt;br /&gt;
Inner exception: Error encountered while executing the transform SomeRoutines.SomeTransformation. Error:Unable to create the transform..&lt;br /&gt;
       &lt;br /&gt;
Exception type: XTransformationFailureException&lt;br /&gt;
Source: Microsoft.XLANGs.Engine&lt;br /&gt;
Target Site: Void ApplyTransform(System.Type, System.Object[], System.Object[])&lt;br /&gt;
The following is a stack trace that identifies the location where the exception occured&lt;br /&gt;
   at Microsoft.XLANGs.Core.Service.ApplyTransform(Type mapRef, Object[] outParams, Object[] inParams)&lt;br /&gt;
   at SomeRoutines.OrderHandler.segment1(StopConditions stopOn)&lt;br /&gt;
   at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception&amp;amp; exp)&lt;br /&gt;
Additional error information:&lt;br /&gt;
&lt;br /&gt;
        Could not load file or assembly 'Xxxxxxxxxxx.XxxXxxxxx.Integration.HelperFunctions, Version=1.0.0.1, Culture=neutral, PublicKeyToken=aaaaabbbbbccccdddd'&lt;br /&gt;
or one of its dependencies. The system cannot find the file specified.&lt;br /&gt;
       &lt;br /&gt;
Exception type: FileNotFoundException&lt;br /&gt;
Source: mscorlib&lt;br /&gt;
Target Site: System.Reflection.Assembly nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.Assembly, &lt;br /&gt;
System.Threading.StackCrawlMark ByRef, Boolean, Boolean)&lt;br /&gt;
The following is a stack trace that identifies the location where the exception occured&lt;br /&gt;
   at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark&amp;amp; stackMark, &lt;br /&gt;
Boolean throwOnFileNotFound, Boolean forIntrospection)&lt;br /&gt;
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark&amp;amp; stackMark, Boolean forIntrospection)&lt;br /&gt;
   at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark&amp;amp; stackMark, Boolean forIntrospection)&lt;br /&gt;
   at System.Reflection.Assembly.Load(String assemblyString)&lt;br /&gt;
   at Microsoft.XLANGs.BaseTypes.TransformBase.get_TransformArgs()&lt;br /&gt;
   at Microsoft.XLANGs.RuntimeTypes.TransformMetaData..ctor(Type transformBaseType)&lt;br /&gt;
   at Microsoft.XLANGs.RuntimeTypes.TransformMetaData._creator(Type t)&lt;br /&gt;
   at Microsoft.XLANGs.RuntimeTypes.MetadataCache._slowFor(Type t)&lt;br /&gt;
   at Microsoft.XLANGs.RuntimeTypes.MetadataCache.For(Type t)&lt;br /&gt;
   at Microsoft.XLANGs.RuntimeTypes.TransformMetaData.For(Type t)&lt;br /&gt;
   at Microsoft.XLANGs.Core.Service.ApplyTransform(Type mapRef, Object[] outParams, Object[] inParams)&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;The problem with this was that the .dll version number had been increased from 1.0.0.1 to 2.0.0.0, causing the above error. I had recompiled the project in question and deployed it again, but I still got this error and today I decided to take a look at its cause. It turned out that what I have in the .btm file (BizTalk map) is a scripting function, calling an &lt;span style="font-style: italic;"&gt;external assembly&lt;/span&gt;. Now, when you do that, this is what it looks like in the .btm file:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&amp;lt;ScripterCode&amp;gt;&lt;br /&gt;  &amp;lt;Script Language="ExternalAssembly" Assembly="Xxxxxxxxxxxx.Xxxxxxx.Integration.HelperFunctions, Version=1.0.0.1, Culture=neutral, PublicKeyToken=aaaabbbbbbcccccdddd" &lt;br /&gt;          Class="Xxxxxxxx.Xxxxxxxxxxx.Integration.HelperFunctions.WrapperClass" Function="GetDiscount" &lt;br /&gt;          AssemblyPath="..\IntegrationFunctoids\obj\Debug\Xxxxxxxxxxxx.Xxxxxxxxx.Integration.HelperFunctions.dll" /&amp;gt;&lt;br /&gt;&amp;lt;/ScripterCode&amp;gt;&lt;br /&gt;&lt;/pre&gt;
&lt;br /&gt;
What this means in reality is that the binding is not done using the project's "assembly references"; rather, the .dll is loaded at runtime. Sure, that's a pretty convenient thing at times. Right now in this case though, it would have been better to have the .dll files be more "statically" bound to each other.&lt;br /&gt;
&lt;br /&gt;
The problem with dynamic binding (or "dynamic references" might be a better phrase) is that you don't get the errors when you want them: at compile time. Rather, you get it at run time. &lt;span style="font-weight: bold;"&gt;However:&lt;/span&gt; what you &lt;span style="font-style: italic;"&gt;do&lt;/span&gt; get is that you get the error when you try the "Test Map" function in Visual Studio. Once again, clearly, this nice function can not be over-emphasized. :-) &lt;img src="http://geekswithblogs.net/plundberg/aggbug/127898.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>plundberg</dc:creator>
            <guid>http://geekswithblogs.net/plundberg/archive/2008/12/15/script-calling-external-assemblies---be-aware-that-it-uses.aspx</guid>
            <pubDate>Mon, 15 Dec 2008 19:48:57 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/plundberg/comments/127898.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/plundberg/archive/2008/12/15/script-calling-external-assemblies---be-aware-that-it-uses.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/plundberg/comments/commentRss/127898.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Remember to make callable orchestrations "public"</title>
            <link>http://geekswithblogs.net/plundberg/archive/2008/11/28/remember-to-make-callable-orchestrations-public.aspx</link>
            <description>&lt;p&gt;If my previous posting was kind of sophisticated, this one is a lot more down-to-earth and basic...&lt;/p&gt;
&lt;p&gt;I've been struggling during the morning trying to use the "Call Orchestration" feature of BizTalk. A pretty straightforward feature. But, I &lt;em&gt;couldn't&lt;/em&gt; just get it to work. If the called orchestration was in the same project as the call&lt;strong&gt;ing&lt;/strong&gt; orchestration, it worked Just Fine&amp;lt;tm&amp;gt;, but as soon as I tried to put the called orchestration in its proper place, it just failed.&lt;/p&gt;
&lt;p&gt;The solution? Well, I got the answer from someone who is much more experienced with BizTalk than me: &lt;em&gt;Make the called orchestration public&lt;/em&gt;. This is pretty straightforward if you think about: orchestrations are really standard CLR classes (even though not generated manually by writing C# or VB.NET code), and as such, they have visibility parameters just like classes usually have.&lt;/p&gt;
&lt;p&gt;If it doesn't immediately work after making sure the callee orchestration is public, try rebuilding the project that is &lt;strong&gt;referring&lt;/strong&gt; to the callee. Yes, you heard me right. Even thought it might fail (since you are likely to have a Call Orchestration shape that is unconfigured), something happens when you build it that sometimes makes it work.&lt;/p&gt;
&lt;p&gt;Restarting Visual Studio is also something that can be helpful. &lt;img alt="" src="/Providers/BlogEntryEditor/FCKeditor/editor/images/smiley/msn/regular_smile.gif" /&gt; For me, in this specific case, building the project didn't work straight away - one of the files was being locked. But when I restarted Visual Studio, it found the callee orchestration anyway, so - problem solved.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/plundberg/aggbug/127430.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>plundberg</dc:creator>
            <guid>http://geekswithblogs.net/plundberg/archive/2008/11/28/remember-to-make-callable-orchestrations-public.aspx</guid>
            <pubDate>Fri, 28 Nov 2008 16:09:40 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/plundberg/comments/127430.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/plundberg/archive/2008/11/28/remember-to-make-callable-orchestrations-public.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/plundberg/comments/commentRss/127430.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Weird problems with document with only one node, the root node (no content nodes)</title>
            <link>http://geekswithblogs.net/plundberg/archive/2008/11/28/weird-problems-with-document-with-only-a-root-node.aspx</link>
            <description>&lt;p&gt;I ran into a strange issue the other day with BizTalk Server 2006 R2. Imagine a map (.btm file) that takes multiple messages as its input. Imagine two of those messages being of the same document type, having the same schema. Now... make the first message be normal, like this (this is an excerpt from the full multipart input message to the map):&lt;/p&gt;
&lt;pre&gt;  &amp;lt;InputMessagePart_2&amp;gt;&lt;br /&gt;    &amp;lt;ns4:stock_warehouse_fetch_response xmlns:ns4="&lt;a href="http://stockwarehouse/"&gt;http://StockWarehouse&lt;/a&gt;"&amp;gt;&lt;br /&gt;      &amp;lt;ns4:stock_warehouse stock_warehouse_id="170A9532-BD20-11DD-85B6-3DFC55D89593" &lt;br /&gt;                           company_id="1EBB0C44-BD20-11DD-9025-69FC55D89593" &lt;br /&gt;                           &lt;em&gt;[... More attributes existed but have been removed to preserve &lt;br /&gt;                           the integrity of the customer ]&lt;/em&gt; /&amp;gt;&lt;br /&gt;    &amp;lt;/ns4:stock_warehouse_fetch_response&amp;gt;&lt;br /&gt;  &amp;lt;/InputMessagePart_2&amp;gt;&lt;br /&gt;  &amp;lt;InputMessagePart_3&amp;gt;&lt;br /&gt;    &amp;lt;ns4:stock_warehouse_fetch_response xmlns:ns4="&lt;a href="http://stockwarehouse/"&gt;http://StockWarehouse&lt;/a&gt;"&amp;gt;&lt;br /&gt;      &amp;lt;!-- This is the part that causes the problems --&amp;gt;&lt;br /&gt;    &amp;lt;/ns4:stock_warehouse_fetch_response&amp;gt;&lt;br /&gt;  &amp;lt;/InputMessagePart_3&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;
When I used the message above (with more messages in the multipart message and so forth), a &lt;strong&gt;very weird thing&lt;/strong&gt; occured: the map output was &lt;em&gt;completely empty&lt;/em&gt;, the only thing that remained was the root node! Obviously, many of the input elements existed in the input messages, so this is clearly a bug in BizTalk (IMO). The problem first occured when running the application in BizTalk Server 2006 R2, but was reproduced with the Visual Studio-integrated "test map" function.&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;The solution? Add a "content node" in the document, like below. It seems like BizTalk really, &lt;em&gt;really&lt;/em&gt; dislikes documents with only a root node. There must be at least one content node in &lt;strong&gt;all&lt;/strong&gt; the input documents to a map. Otherwise, the map output is completely eradicated, except for the root node.&lt;/font&gt;&lt;/p&gt;
&lt;pre&gt;  &amp;lt;InputMessagePart_3&amp;gt;&lt;br /&gt;    &amp;lt;ns4:stock_warehouse_fetch_response xmlns:ns4="&lt;a href="http://stockwarehouse/"&gt;http://StockWarehouse&lt;/a&gt;"&amp;gt;&lt;br /&gt;&lt;font color="#ff0000"&gt;&lt;strong&gt;      &amp;lt;ns4:stock_warehouse&amp;gt;&amp;lt;/ns4:stock_warehouse&amp;gt;&lt;/strong&gt;&lt;br /&gt;&lt;/font&gt;    &amp;lt;/ns4:stock_warehouse_fetch_response&amp;gt;&lt;br /&gt;  &amp;lt;/InputMessagePart_3&amp;gt; &lt;/pre&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Well, that's it for this time. I hope this helped you, it would have helped me. &lt;img alt="" src="/Providers/BlogEntryEditor/FCKeditor/editor/images/smiley/msn/regular_smile.gif" /&gt;&lt;/font&gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/plundberg/aggbug/127429.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>plundberg</dc:creator>
            <guid>http://geekswithblogs.net/plundberg/archive/2008/11/28/weird-problems-with-document-with-only-a-root-node.aspx</guid>
            <pubDate>Fri, 28 Nov 2008 15:47:15 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/plundberg/comments/127429.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/plundberg/archive/2008/11/28/weird-problems-with-document-with-only-a-root-node.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/plundberg/comments/commentRss/127429.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>
