<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/charliemott/category/9963.aspx</link>
        <description>BizTalk</description>
        <language>en-GB</language>
        <copyright>charlie.mott</copyright>
        <managingEditor>charlie.mott@hotmail.co.uk</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>ESB Toolkit Clients</title>
            <link>http://geekswithblogs.net/charliemott/archive/2011/07/25/esb-toolkit-clients.aspx</link>
            <description>&lt;p&gt;Article Source: &lt;a href="http://geekswithblogs.net/charliemott"&gt;&lt;font color="#000080"&gt;http://geekswithblogs.net/charliemott&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;What is the best approach for developing a WCF client application that sends messages to the WCF on-ramps exposed by the BizTalk ESB Toolkit?&lt;/p&gt;
&lt;p&gt;I had considered various approaches:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Generate an xml message from a string template using string replacements.  Then submit the message to the ESB endpoint using code similar to the &lt;a href="http://msdn.microsoft.com/en-us/library/ff699768(v=bts.70).aspx"&gt;Itinerary Test Client&lt;/a&gt; provided with the ESB Toolkit. Then for the response use XPath to get the required data.&lt;br /&gt;
    - This is obviously a lot of coding effort, inflexible and difficult to maintain.&lt;/li&gt;
    &lt;li&gt;Modifying the generic wsdl for the ESB WCF service as described &lt;a href="http://geekswithblogs.net/charliemott/archive/2010/12/20/creating-typed-wsdls-for-generic-wcf-services-of-the-esb.aspx"&gt;here&lt;/a&gt;.   &lt;br /&gt;
    - However, this is too much of an administrative nightmare.  You need to create a wsdl for each possible service method. In addition it does not support the catching of expected SOAP faults without additional effort.&lt;/li&gt;
    &lt;li&gt;Our team then considered an approach similar to that described &lt;a href="http://urikatsir.wordpress.com/2010/03/19/submitting-messages-to-biztalk-using-c-code"&gt;here&lt;/a&gt;.  This uses a generic ServiceContract interface that can take any object and serialise it to a System.ServiceModel.Channels.Message.&lt;br /&gt;
    - However, the problem is that developers will still need to manually generate the DTO classes using a tool such as svcutil (getting the schemas from the location specified in the wsdl).   As such, there is still a lot of effort required.&lt;/li&gt;
    &lt;li&gt;A colleague then asked "why don't you just add a service reference to the end service and then re-point the client endpoint config to the ESB on-ramp".  I had previously dismissed this idea because the end service exposes many methods\actions while the ESB on-ramps expose just one with a different name.  However, he suggested you should be able to alter the action.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Using a WCF Message Inspector&lt;/h2&gt;
&lt;p&gt;Option 4 is the best option I think.  You can modify the Action header using a custom behaviour with a custom Message Inspector following the approach described &lt;a href="http://social.msdn.microsoft.com/Forums/en/wcf/thread/0e9874a5-ce16-4d69-936c-4af46d6a02a2"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The modified message inspector code for the request-response on-ramp would be as follows:&lt;br /&gt;
 &lt;br /&gt;
        public object BeforeSendRequest(ref System.ServiceModel.Channels.Message request, IClientChannel channel)&lt;br /&gt;
        {&lt;br /&gt;
            request.Headers.Action = "http://microsoft.practices.esb/ProcessRequestResponse";&lt;br /&gt;
            return null;&lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
The client service code would be something like this:&lt;/p&gt;
&lt;p&gt;        public int FindProducts (ProductSearchCommand searchCommand)&lt;br /&gt;
        {&lt;br /&gt;
            var client = new ProductServiceClient(this.EsbOnRampRequestResponseEndpointConfig);&lt;br /&gt;
            client.Endpoint.Behaviors.Add(new OnRampRequestResponseBehavior()); &lt;span style="color: #339966"&gt;&lt;span style="background-color: #ffffff"&gt;// this could be done via endpoint config (see &lt;a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.dispatcher.clientruntime.messageinspectors.aspx"&gt;here&lt;/a&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span style="background-color: #339966"&gt;&lt;br /&gt;
&lt;/span&gt;            ProductsDocument products = client.Find(searchCommand);&lt;br /&gt;
            client.Close();&lt;br /&gt;
            return products;&lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
The client direct call endpoint config would be modified to something like this to point to the ESB:&lt;br /&gt;
 &lt;br /&gt;
      &amp;lt;endpoint address="https://MyMachine/ESB.ItineraryServices.Generic.Response.WCF/ProcessItinerary.svc"&lt;br /&gt;
                binding="wsHttpBinding"&lt;br /&gt;
                bindingConfiguration="&lt;em&gt;WSHttpBinding_ITwoWayAsync&lt;/em&gt;"&lt;br /&gt;
                contract="ProductService.ProductService"&lt;br /&gt;
                name="&lt;em&gt;EsbOnRamp_RequestResponse&lt;/em&gt;"&amp;gt;&lt;br /&gt;
        &amp;lt;identity&amp;gt;&lt;br /&gt;
          &amp;lt;userPrincipalName value="MyMachine\BizTalkUser" /&amp;gt;&lt;br /&gt;
        &amp;lt;/identity&amp;gt;&lt;br /&gt;
      &amp;lt;/endpoint&amp;gt;&lt;/p&gt;
&lt;h2&gt;Notes&lt;/h2&gt;
&lt;ul&gt;
    &lt;li&gt;In BizTalk, for the WCF receive location for the default ESB on-ramp has been modified so that the WCF adapter Message “UseBodyPath” settings use "Body" for the "Inbound BizTalk message body" and "Outbound WCF message body".&lt;/li&gt;
    &lt;li&gt;The default on-ramp uses wsHttpbinding.  This binding is based on SOAP 1.2.  As such, soap faults will be returned using a soap 1.2 namespaces.  If the end service uses basicHttpBinding, then the client code will not be able to catch the soap 1.1 fault.  As such, mixing soap versions for the on-ramp and services called by an itinerary would require some additional research.&lt;/li&gt;
&lt;/ul&gt; &lt;img src="http://geekswithblogs.net/charliemott/aggbug/146320.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>charlie.mott</dc:creator>
            <guid>http://geekswithblogs.net/charliemott/archive/2011/07/25/esb-toolkit-clients.aspx</guid>
            <pubDate>Mon, 25 Jul 2011 22:50:53 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/charliemott/comments/146320.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/charliemott/archive/2011/07/25/esb-toolkit-clients.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/charliemott/comments/commentRss/146320.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/charliemott/services/trackbacks/146320.aspx</trackback:ping>
        </item>
        <item>
            <title>Sending header details in messages to Dynamics AX 2012 WCF services from BizTalk</title>
            <link>http://geekswithblogs.net/charliemott/archive/2011/05/06/sending-call-context-in-header-message-to-ax-2012-services.aspx</link>
            <description>&lt;p&gt;Article Source: &lt;a href="http://geekswithblogs.net/charliemott"&gt;&lt;font color="#000080"&gt;http://geekswithblogs.net/charliemott&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;How do you send "Call Context" information in the header message to Dynamics AX 2012 WCF services from BizTalk? &lt;/h2&gt;
&lt;p&gt;One difference between AX 2009 and AX 2012 services, is that you no longer always need to provide destination endpoint context information. This is described &lt;a href="http://technet.microsoft.com/en-us/library/gg751352(AX.60).aspx"&gt;here&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;In previous releases, each AIF endpoint was associated with a specific company. Microsoft Dynamics AX 2012 does not require that you associate integration ports with a specific company. You can use the integration port functionality to restrict service calls to a specific company. For an inbound message, the services framework obtains the company from the message header. If the message header does not contain a company context, the services framework uses the default company for the submitting user.&lt;/blockquote&gt;
&lt;h2&gt;Adding WCF.OutboundCustomHeaders&lt;/h2&gt;
&lt;p&gt;In my requirement, I did need to send the Company code.&lt;/p&gt;
&lt;p&gt;There is a very good article &lt;a href="http://blogs.msdn.com/b/bizintegration1/archive/2011/03/11/making-biztalk-2010-talk-to-ax-2009-using-aif-based-wcf-services.aspx"&gt;here&lt;/a&gt; about making BizTalk send header information to AX 2009 using WCF Services.&lt;/p&gt;
&lt;p&gt;However, the implementation is slightly different with AX 2012. The schema namespace you need is http://schemas.microsoft.com/dynamics/2010/01/datacontracts&lt;/p&gt;
&lt;p&gt;So the code will look like this. Notice I have only provided the header context information needed:&lt;/p&gt;
&lt;blockquote&gt;&lt;span style="font-family: Courier New"&gt;wcfHeader = System.String.Format(@"&amp;lt;headers&amp;gt;&amp;lt;CallContext xmlns=""http://schemas.microsoft.com/dynamics/2010/01/datacontracts""&amp;gt;&amp;lt;Company&amp;gt;{0}&amp;lt;/Company&amp;gt;&amp;lt;/CallContext&amp;gt;&amp;lt;/headers&amp;gt;", companyCode);&lt;br /&gt;
&lt;br /&gt;
msgRequest(WCF.OutboundCustomHeaders) = wcfHeader;&lt;/span&gt;&lt;/blockquote&gt;
&lt;h2&gt;Other Tips&lt;/h2&gt;
&lt;p&gt;You may need to increase the size of the WCF-NetTcp adapter "Maximum receive message size". Otherwise, if the responses are large, you may get a System.ServiceModel.CommunicationException: The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/charliemott/aggbug/145210.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>charlie.mott</dc:creator>
            <guid>http://geekswithblogs.net/charliemott/archive/2011/05/06/sending-call-context-in-header-message-to-ax-2012-services.aspx</guid>
            <pubDate>Fri, 06 May 2011 16:04:50 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/charliemott/comments/145210.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/charliemott/archive/2011/05/06/sending-call-context-in-header-message-to-ax-2012-services.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/charliemott/comments/commentRss/145210.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/charliemott/services/trackbacks/145210.aspx</trackback:ping>
        </item>
        <item>
            <title>Catching Faults from Dynamics AX 2012 WCF services</title>
            <link>http://geekswithblogs.net/charliemott/archive/2011/04/04/catching-faults-from-dynamics-2012-wcf-services.aspx</link>
            <description>&lt;p&gt;Article Source: &lt;a href="http://geekswithblogs.net/charliemott"&gt;http://geekswithblogs.net/charliemott&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I hit problems in an orchestration consuming WCF services exposed by Microsoft Dynamics AX 2012 (AX6). When attempting to catch a fault response, I was getting the error "received unexpected message type 'http://www.w3.org/2003/05/soap-envelope#fault'"&lt;/p&gt;
&lt;p&gt;In order to fix this, I needed to change the schema for the fault message in the port type that had been created using "Add Generated Items." I changed it to the SOAP 1.2 fault type.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Select Soap 1.2 Fault Schema" style="width: 452px; height: 368px" src="/images/geekswithblogs_net/charliemott/Catch%20Ax%202012%20Faults/soap1-2(1).png" /&gt;&lt;/p&gt;
&lt;p&gt;Thanks to this blog for pointing me in this direction: &lt;br /&gt;
&lt;a href="http://masteringbiztalkserver.wordpress.com/2010/11/21/catching-soap-faults-from-wcf-service-in-biztalk-orchestration/"&gt;http://masteringbiztalkserver.wordpress.com/2010/11/21/catching-soap-faults-from-wcf-service-in-biztalk-orchestration/&lt;/a&gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/charliemott/aggbug/144693.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>charlie.mott</dc:creator>
            <guid>http://geekswithblogs.net/charliemott/archive/2011/04/04/catching-faults-from-dynamics-2012-wcf-services.aspx</guid>
            <pubDate>Mon, 04 Apr 2011 23:54:45 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/charliemott/comments/144693.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/charliemott/archive/2011/04/04/catching-faults-from-dynamics-2012-wcf-services.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/charliemott/comments/commentRss/144693.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/charliemott/services/trackbacks/144693.aspx</trackback:ping>
        </item>
        <item>
            <title>Test Categories with BizUnit tests</title>
            <link>http://geekswithblogs.net/charliemott/archive/2011/04/01/test-categories-with-bizunit-tests.aspx</link>
            <description>&lt;p&gt;Article Source: &lt;a href="http://geekswithblogs.net/charliemott"&gt;http://geekswithblogs.net/charliemott&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Often it is handy to organise BizUnit tests into test lists.  This way longer running tests and edge case tests can be removed from check-in builds keep them running a bit more quickly. However, updating a .vsmdi test lists for each individual test method is time consuming.&lt;/p&gt;
&lt;p&gt;A better solution is to use the new &lt;a href="http://msdn.microsoft.com/en-us/library/dd286595.aspx"&gt;Category&lt;/a&gt; attribute that comes with MSTest in .NET4 (nUnit  has supported a categories feature for a while).  In the TFS build processes, the mstest command line can make use of the &lt;a href="http://msdn.microsoft.com/en-us/library/ms182489%28VS.100%29.aspx"&gt;/category&lt;/a&gt; flag. The check-in build will run tests categorised as Happy Flow.  A Full build (nightly build) will run the lot. (Note, it is possible to do specify multiple categories).&lt;br /&gt;
&lt;br /&gt;
In my solution, I have created constants for the followoing categories:&lt;/p&gt;
&lt;p style="margin-left: 40px;"&gt;Acme.TestCategory.TestType.WakeUpBizTalk &lt;br /&gt;
&lt;span style="font-size: smaller;"&gt;(e.g tests where we just fire messages through biztalk without checking the results.)&lt;br /&gt;
&lt;/span&gt;  &lt;br /&gt;
Acme.TestCategory.SourceSystem.DyanmicsAx&lt;br /&gt;
Acme.TestCategory.SourceSystem.DynamicsCrm&lt;br /&gt;
Acme.TestCategory.SourceSystem.Maximo&lt;br /&gt;
etc&lt;br /&gt;
  &lt;br /&gt;
Acme.TestCategory.TargetSystem.DyanmicsAx&lt;br /&gt;
Acme.TestCategory.TargetSystem.Icon&lt;br /&gt;
etc&lt;br /&gt;
  &lt;br /&gt;
Acme.TestCategory.UseCase.HappyFlow&lt;br /&gt;
Acme.TestCategory.UseCase.AlternativeFlow &lt;span style="font-size: smaller;"&gt;(e.g. fault scenarios)&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;Acme.TestCategory.DataType.CustomerServices&lt;br /&gt;
Acme.TestCategory.DataType.Journal&lt;br /&gt;
etc&lt;/p&gt;
&lt;p&gt;So a sample test method with these attributes would be as follows.  Notice the multiple target systems.&lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; color: rgb(150, 150, 150); font-family: Calibri; font-size: 11pt;"&gt;&lt;span style="font-size: smaller;"&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;
&lt;span style="color: rgb(150, 150, 150);"&gt;&lt;span style="mso-spacerun: yes;"&gt; &lt;/span&gt;/// &lt;/span&gt;&lt;span style="color: rgb(51, 153, 102);"&gt;Test valid Tax Codes message from Dynamics AX&lt;br /&gt;
&lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt; &lt;/span&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;
&lt;span style="mso-spacerun: yes;"&gt; &lt;/span&gt;[&lt;span style="color: teal;"&gt;TestMethod&lt;/span&gt;]&lt;br /&gt;
&lt;span style="mso-spacerun: yes;"&gt; &lt;/span&gt;[&lt;span style="color: teal;"&gt;TestTimer&lt;/span&gt;(5, 0)]&lt;br /&gt;
&lt;span style="mso-spacerun: yes;"&gt; &lt;/span&gt;[&lt;span style="color: teal;"&gt;TestCategory&lt;/span&gt;(&lt;span style="color: teal;"&gt;SourceSystem&lt;/span&gt;.DynamicsAx)]&lt;br /&gt;
&lt;span style="mso-spacerun: yes;"&gt; &lt;/span&gt;[&lt;span style="color: teal;"&gt;TestCategory&lt;/span&gt;(&lt;span style="color: teal;"&gt;TargetSystem&lt;/span&gt;.Maximo)]&lt;br /&gt;
&lt;span style="mso-spacerun: yes;"&gt; &lt;/span&gt;[&lt;span style="color: teal;"&gt;TestCategory&lt;/span&gt;(&lt;span style="color: teal;"&gt;TargetSystem&lt;/span&gt;.Oms)]&lt;br /&gt;
&lt;span style="mso-spacerun: yes;"&gt; &lt;/span&gt;[&lt;span style="color: teal;"&gt;TestCategory&lt;/span&gt;(&lt;span style="color: teal;"&gt;DataType&lt;/span&gt;.TaxCodes)]&lt;br /&gt;
&lt;span style="mso-spacerun: yes;"&gt; &lt;/span&gt;[&lt;span style="color: teal;"&gt;TestCategory&lt;/span&gt;(&lt;span style="color: teal;"&gt;UseCase&lt;/span&gt;.HappyFlow)]&lt;br /&gt;
&lt;span style="mso-spacerun: yes;"&gt; &lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;public void &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;DynamicsAx_TaxCodes_Valid_Success()&lt;br /&gt;
&lt;span style="mso-spacerun: yes;"&gt; &lt;/span&gt;{&lt;br /&gt;
&lt;/span&gt;       ...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Note: For details of the TestTimer attribute, see &lt;a href="http://callumhibbert.blogspot.com/2008/01/extending-mstest.html"&gt;here&lt;/a&gt;. This is also a handy feature for BizUnit tests to validate performance.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/charliemott/aggbug/144648.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>charlie.mott</dc:creator>
            <guid>http://geekswithblogs.net/charliemott/archive/2011/04/01/test-categories-with-bizunit-tests.aspx</guid>
            <pubDate>Fri, 01 Apr 2011 22:06:32 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/charliemott/comments/144648.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/charliemott/archive/2011/04/01/test-categories-with-bizunit-tests.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/charliemott/comments/commentRss/144648.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/charliemott/services/trackbacks/144648.aspx</trackback:ping>
        </item>
        <item>
            <title>Creating typed WSDL’s for generic WCF services of the ESB Toolkit</title>
            <link>http://geekswithblogs.net/charliemott/archive/2010/12/20/creating-typed-wsdls-for-generic-wcf-services-of-the-esb.aspx</link>
            <description>&lt;p&gt;source: &lt;a href="http://geekswithblogs.net/charliemott"&gt;http://geekswithblogs.net/charliemott&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #ff0000"&gt;Update (10/06/2011):&lt;/span&gt; I no longer recommend the approach below.  It is too much of an administrative nightmare to create a wsdl for each possible service method call.  See new advise here: &lt;a href="http://geekswithblogs.net/charliemott/archive/2011/07/25/esb-toolkit-clients.aspx"&gt;http://geekswithblogs.net/charliemott/archive/2011/07/25/esb-toolkit-clients.aspx&lt;/a&gt;.&lt;/p&gt;
&lt;h1&gt;&lt;strong&gt;Question&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;How do you make it easy for client systems to consume the generic WCF services exposed by the ESB Toolkit using messages that conform to agreed schemas\contracts? &lt;/p&gt;
&lt;p&gt;Usually the developer of a system consuming a web service adds a service reference using a WSDL. However, the WSDL’s for the generic services exposed by the ESB Toolkit use messages with &lt;em&gt;type="xsd:anyType". &lt;/em&gt; Using these do not make it easy for the client system to use the input\output messages that conform to agreed schemas\contracts.&lt;/p&gt;
&lt;h1&gt;&lt;strong&gt;Recommendation&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Take a copy of the generic WSDL’s and modify it to use the proper contracts.&lt;/p&gt;
&lt;p&gt;This is very easy.  It will work with the generic on ramps &lt;span style="color: #0000ff"&gt;&lt;strong&gt;so long as&lt;/strong&gt;&lt;/span&gt; the &amp;lt;part&amp;gt;?&amp;lt;/part&amp;gt; wrapping is removed from the WCF adapter configuration in the BizTalk receive locations. &lt;/p&gt;
&lt;table border="1" width="100%"&gt;
    &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td&gt;Attempting to create a WSDL where the input and output messages are sent/returned with a &amp;lt;part&amp;gt; wrapper is a nightmare.  I have not managed it. &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;h1&gt;&lt;strong&gt;Consequences&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;I can only see the following consequences of removing the &amp;lt;part&amp;gt; wrapper:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;ESB Management Portal - unless you intend to modify the MessageResubmitter.cs code and bindings, do not implement the above change to the "OnRamp.Itinerary.WCF" receive location.  This is used by the portal to resubmit messages using WCF.&lt;/li&gt;
    &lt;li&gt;ESB Test Client – I needed to modify the out-of-the-box ESB Test Client source code to make it send non-wrapped messages. &lt;/li&gt;
    &lt;li&gt;Flat file formatted messages – the endpoint will no longer support flat file message formats.  However, even if you needed to support this integration pattern through WCF, you would most-likely want to create a separate receive location anyway with its’ own independently configured XML disassembler pipeline component.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;&lt;strong&gt;Instructions&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;These steps show how to implement a request-response implementation of this.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;WCF Receive Locations&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;In BizTalk, for the WCF receive location for the ESB on-ramp, set the adapter Message settings\bindings to “UseBodyPath”: &lt;br /&gt;
    &lt;br /&gt;
    &lt;ul&gt;
        &lt;li&gt;Inbound BizTalk message body  = Body&lt;/li&gt;
        &lt;li&gt;Outbound WCF message body = Body&lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Create a WSDL’s for each supported integration use-case&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Save a copy of the WSDL for the WCF generic receive location above that you intend the client system to use. Give it a name that mirrors the interface agreement (e.g. Esb_SuppliersSearchCommand_wsHttpBinding.wsdl).&lt;br /&gt;
     &lt;/li&gt;
    &lt;li&gt;Add any xsd schemas files imported below to this same folder.&lt;br /&gt;
     &lt;/li&gt;
    &lt;li&gt;Edit the WSDL to import schemas&lt;br /&gt;
    &lt;br /&gt;
    For example, this:&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="margin-left: 40px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;xsd:schema targetNamespace=http://microsoft.practices.esb/Imports /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-left: 40px"&gt;… would become something like:&lt;/p&gt;
&lt;p style="margin-left: 40px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;xsd:schema targetNamespace="http://microsoft.practices.esb/Imports"&amp;gt;&lt;br /&gt;
    &amp;lt;xsd:import schemaLocation="SupplierSearchCommand_V1.xsd" &lt;br /&gt;
                          namespace="http://schemas.acme.co.uk/suppliersearchcommand/1.0"/&amp;gt;&lt;br /&gt;
    &amp;lt;xsd:import  schemaLocation="SuppliersDocument_V1.xsd" &lt;br /&gt;
                            namespace="http://schemas.acme.co.uk/suppliersdocument/1.0"/&amp;gt;&lt;br /&gt;
&amp;lt;/xsd:schema&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Modify the Input and Output message&lt;br /&gt;
    &lt;br /&gt;
    For example, this:&lt;br /&gt;
    &lt;br /&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;wsdl:message name="ProcessRequestResponse_SubmitRequestResponse_InputMessage"&amp;gt;&lt;br /&gt;
      &amp;lt;wsdl:part name="part" type="xsd:anyType"/&amp;gt;&lt;br /&gt;
    &amp;lt;/wsdl:message&amp;gt;&lt;br /&gt;
    &amp;lt;wsdl:message name="ProcessRequestResponse_SubmitRequestResponse_OutputMessage"&amp;gt;&lt;br /&gt;
      &amp;lt;wsdl:part name="part" type="xsd:anyType"/&amp;gt;&lt;br /&gt;
    &amp;lt;/wsdl:message&amp;gt;&lt;br /&gt;
    &lt;/span&gt;&lt;br /&gt;
    … would become something like:&lt;br /&gt;
    &lt;br /&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;wsdl:message name="ProcessRequestResponse_SubmitRequestResponse_InputMessage"&amp;gt;&lt;br /&gt;
      &amp;lt;wsdl:part name="part" &lt;br /&gt;
                          element="ssc:SupplierSearchCommand"  &lt;br /&gt;
                          xmlns:ssc="http://schemas.acme.co.uk/suppliersearchcommand/1.0" /&amp;gt;&lt;br /&gt;
    &amp;lt;/wsdl:message&amp;gt;&lt;br /&gt;
    &amp;lt;wsdl:message name="ProcessRequestResponse_SubmitRequestResponse_OutputMessage"&amp;gt;&lt;br /&gt;
      &amp;lt;wsdl:part name="part" &lt;br /&gt;
                         element="sd:SuppliersDocument" &lt;br /&gt;
                         xmlns:sd="http://schemas.acme.co.uk/suppliersdocument/1.0"/&amp;gt;&lt;br /&gt;
    &amp;lt;/wsdl:message&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This WSDL can now be added as a service reference in client solutions.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/charliemott/aggbug/143181.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>charlie.mott</dc:creator>
            <guid>http://geekswithblogs.net/charliemott/archive/2010/12/20/creating-typed-wsdls-for-generic-wcf-services-of-the-esb.aspx</guid>
            <pubDate>Mon, 20 Dec 2010 22:48:01 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/charliemott/comments/143181.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/charliemott/archive/2010/12/20/creating-typed-wsdls-for-generic-wcf-services-of-the-esb.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/charliemott/comments/commentRss/143181.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/charliemott/services/trackbacks/143181.aspx</trackback:ping>
        </item>
        <item>
            <title>Naming Standards for BizUnit Integration Tests</title>
            <link>http://geekswithblogs.net/charliemott/archive/2010/07/05/naming-standards-for-bizunit-integration-tests.aspx</link>
            <description>&lt;p&gt;source: &lt;a href="http://geekswithblogs.net/charliemott"&gt;http://geekswithblogs.net/charliemott&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Roy Osherove on his &lt;a href="http://osherove.com/blog/2005/4/3/naming-standards-for-unit-tests.html"&gt;blog&lt;/a&gt; and in his &lt;a href="http://artofunittesting.com/"&gt;book&lt;/a&gt; gives guidance on the naming of unit test methods. For use with BizUnit end-to-end integration tests, I have extended these recommendations below. Implementing these conventions has the following benefits:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Makes it easily to understand the purpose of the test.&lt;/li&gt;
    &lt;li&gt;Make it easier to find specific tests.&lt;/li&gt;
    &lt;li&gt;Gives a visual feel for integration use case test coverage.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Hub-and-Spoke Solutions&lt;/h2&gt;
&lt;p&gt;For hub-and-spoke solutions, an integration use case can typically be identified by the source system and the message type.  As such, the following pattern is recommended.&lt;/p&gt;
&lt;p style="margin-left: 40px"&gt;Format:   SourceSystem_MessageType_MessageScenarioProperties_ExpectedBehaviour()&lt;/p&gt;
&lt;p style="margin-left: 40px"&gt;Sample:   Maximo_Invoice_Valid_Success()&lt;br /&gt;
Sample:   Maximo_Invoice_InvalidStructure_ValidationExceptionHandled()&lt;/p&gt;
&lt;p&gt;Integration use cases that implement a convoy pattern may need a slightly different structure. There may be different source systems and\or different message types.  If the source system is different, replace with the orchestration name.  If the message types are different, exclude message type details.&lt;/p&gt;
&lt;p style="margin-left: 40px"&gt;Format:   ConvoyOrchestrationName_Scenario_ExpectedBehaviour()&lt;/p&gt;
&lt;p style="margin-left: 40px"&gt;Sample:   JournalConvoy_Valid_Success()&lt;br /&gt;
Sample:   JournalConvoy_SingleValidHeaderMessage_TimeoutExceptionHandled()&lt;/p&gt;
&lt;h2&gt;ESB Toolkit Solutions&lt;/h2&gt;
&lt;p&gt;In ESB Toolkit solutions, an integration use case can typically be identified by the rules that are used to select which itinerary to use. A rule might evaluate: an xpath value (message type, status value, message type version); receive location (WCF, File); etc.&lt;/p&gt;
&lt;p&gt;This variety makes it more difficult to enforce consistency in test names. As such, the following is recommended. The test method names are prefixed with the message type for the same reasons as above. Rules are delimited by  "And". The rule list excludes the prefixed source system and message type. Try to be consistent in the ordering of the rules. e.g. (1) Version (2) Status.&lt;/p&gt;
&lt;p style="margin-left: 40px"&gt;Format:    MessageType_Action_OnRampLocationType_MessageStatus_ExpectedBehaviour&lt;/p&gt;
&lt;p style="margin-left: 40px"&gt;Sample:   Customer_Create_WsHttp_Valid_Success()&lt;br /&gt;
&lt;br /&gt;
Remember, you can write more fine-grained BizUnit tests for the BRE itinerary selection rules without re-testing the whole itinerary. See the &lt;a href="http://bizunitbre.codeplex.com/"&gt;Business Rule Engine BizUnit Test Steps&lt;/a&gt; codeplex project for guidance here.  Also see Mike Stepheson's &lt;a href="http://geekswithblogs.net/michaelstephenson/archive/2010/06/13/140388.aspx"&gt;blog &lt;/a&gt;article on XPath query testing.&lt;/p&gt;
&lt;h2&gt;Code Analysis&lt;/h2&gt;
&lt;p&gt;I realise that the above recommended conventions breech the Microsoft Code Analysis Naming rule "&lt;a href="http://msdn.microsoft.com/en-us/library/ms182245.aspx"&gt;CA1707: Identifiers should not contain underscores&lt;/a&gt;". However, I feel it is worth disabling this rule for test projects to gain the benefits described above.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/charliemott/aggbug/140771.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>charlie.mott</dc:creator>
            <guid>http://geekswithblogs.net/charliemott/archive/2010/07/05/naming-standards-for-bizunit-integration-tests.aspx</guid>
            <pubDate>Mon, 05 Jul 2010 18:45:34 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/charliemott/comments/140771.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/charliemott/archive/2010/07/05/naming-standards-for-bizunit-integration-tests.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/charliemott/comments/commentRss/140771.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/charliemott/services/trackbacks/140771.aspx</trackback:ping>
        </item>
        <item>
            <title>BizTalk Cross Reference Data Management Strategy</title>
            <link>http://geekswithblogs.net/charliemott/archive/2010/03/14/biztalk-cross-reference-data-management-strategy.aspx</link>
            <description>&lt;p&gt;Article Source: &lt;a href="http://geekswithblogs.net/charliemott"&gt;http://geekswithblogs.net/charliemott&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This article describes an approach to the management of cross reference data for BizTalk.  Some articles about the BizTalk Cross Referencing features can be found here:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href="http://home.comcast.net/~sdwoodgate/xrefseed.zip"&gt;http://home.comcast.net/~sdwoodgate/xrefseed.zip&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://geekswithblogs.net/michaelstephenson/archive/2006/12/24/101995.aspx"&gt;http://geekswithblogs.net/michaelstephenson/archive/2006/12/24/101995.aspx&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://geekswithblogs.net/charliemott/archive/2009/04/20/value-vs.id-cross-referencing-in-biztalk.aspx"&gt;http://geekswithblogs.net/charliemott/archive/2009/04/20/value-vs.id-cross-referencing-in-biztalk.aspx&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Options&lt;/h1&gt;
&lt;p&gt;Current options to managing this data include:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Maintaining xml files in the format that can be used by the out-of-the-box &lt;a href="http://msdn.microsoft.com/en-us/library/aa578674(BTS.20).aspx"&gt;BTSXRefImport.exe&lt;/a&gt; utility.&lt;/li&gt;
    &lt;li&gt;Use of user interfaces that have been developed to manage this data:
    &lt;ul&gt;
        &lt;li&gt;&lt;a href="http://biztalkxref.codeplex.com"&gt;BizTalk Cross Referencing Tool&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://blog.biztalk-info.com/archive/2007/02/12/XRef_XML_Creation_Tool.aspx"&gt;XRef XML Creation Tool&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;However, there are the following issues with the above options:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;The 'BizTalk Cross Referencing Tool' requires a separate database to manage.  The 'XRef XML Creation' tool has no means of persisting the data.&lt;/li&gt;
    &lt;li&gt;The 'BizTalk Cross Referencing tool' generates integers in the common id field. I prefer to use a string (e.g. acme.petshop.country.uk). This is more readable. (see naming conventions below).&lt;/li&gt;
    &lt;li&gt;Both UI tools continue to use BTSXRefImport.exe.  This utility replaces all xref data. This can be a problem in continuous integration environments that support multiple target BizTalk groups (even different clients).  If you upload the data for one client/group it would destroy the data for another client/group.  Yet in TFS, where builds run concurrently, this would break unit tests.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Alternative Approach&lt;/h1&gt;
&lt;p&gt;In response to these issues, I instead use simple SQL scripts to directly populate the BizTalkMgmtDb xref tables combined with a data namepacing strategy to isolate client data.&lt;/p&gt;
&lt;h2&gt;Naming Conventions&lt;/h2&gt;
&lt;p&gt;All data keys use namespace prefixing.  The pattern will be &amp;lt;company name&amp;gt;.&amp;lt;biztalk group&amp;gt;.&amp;lt;data type&amp;gt;.  The data must follow this pattern to isolate it from other company\group cross-reference data.  The naming convention I use is lower casing for all items. &lt;/p&gt;
&lt;p&gt;The table below shows some sample data.  (Note: this data uses the 'ID' cross-reference tables.  The same principles apply for the 'value' cross-referencing tables).&lt;/p&gt;
&lt;table border="1" cellspacing="1" cellpadding="1" width="100%"&gt;
    &lt;thead&gt;
        &lt;tr&gt;
            &lt;th scope="col"&gt;Table.Field&lt;/th&gt;
            &lt;th scope="col"&gt;Description&lt;/th&gt;
            &lt;th scope="col"&gt;Sample Data&lt;/th&gt;
        &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td&gt;xref_AppType.appType&lt;/td&gt;
            &lt;td&gt;Application Types&lt;/td&gt;
            &lt;td&gt;acme.petshop.erp&lt;br /&gt;
            acme.petshop.portal&lt;br /&gt;
            acme.petshop.assetmanagement&lt;br /&gt;
            acme.petshop.ordermanagement&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;xref_AppInstance.appInstance&lt;/td&gt;
            &lt;td&gt;Application Instances &lt;br /&gt;
            (each will have a corresponding application type).&lt;/td&gt;
            &lt;td&gt;acme.petshop.dynamics.ax&lt;br /&gt;
            acme.petshop.dynamics.crm&lt;br /&gt;
            acme.petshop.sharepoint&lt;br /&gt;
            acme.petshop.maximo&lt;br /&gt;
            acme.petshop.oms&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;xref_IDXRef.idXRef&lt;/td&gt;
            &lt;td&gt;Holds the cross reference data types.&lt;/td&gt;
            &lt;td&gt;acme.petshop.vatcode&lt;br /&gt;
            acme.petshop.country&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;xref_IDXRefData.CommonID&lt;/td&gt;
            &lt;td&gt;Holds each cross reference type value used by the canonical schemas.&lt;/td&gt;
            &lt;td&gt;acme.petshop.vatcode.exmpt&lt;br /&gt;
            acme.petshop.vatcode.std&lt;br /&gt;
            acme.petshop.country.usa&lt;br /&gt;
            acme.petshop.country.uk&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;xref_IDXRefData.AppID&lt;/td&gt;
            &lt;td&gt;This holds the value for each application instance and each xref type.&lt;/td&gt;
            &lt;td&gt;UK&lt;br /&gt;
            GB&lt;br /&gt;
            44&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;SQL Scripts&lt;/h2&gt;
&lt;p&gt;The data to be stored in the BizTalkMgmtDb xref tables will be managed by SQL scripts stored in a database project in the visual studio solution.&lt;/p&gt;
&lt;table border="1" cellspacing="1" cellpadding="1" width="100%"&gt;
    &lt;thead&gt;
        &lt;tr&gt;
            &lt;th scope="col"&gt;File(s)&lt;/th&gt;
            &lt;th scope="col"&gt;Description&lt;/th&gt;
        &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td&gt;Build.cmd&lt;/td&gt;
            &lt;td&gt;A sqlcmd script to deploy data by running the SQL scripts below. (This can be run as part of the MSBuild process).&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;acme.petshop.purgexref.sql&lt;/td&gt;
            &lt;td&gt;SQL script to clear acme.petshop.* data from the xref tables.  As such, this will not impact data for any other client/group.&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;acme.petshop.applicationInstances.sql  &lt;/td&gt;
            &lt;td&gt;SQL script to insert application type and application instance data.&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;acme.petshop.vatcode.sql&lt;br /&gt;
            acme.petshop.country.sql&lt;br /&gt;
            etc ... &lt;/td&gt;
            &lt;td&gt;There will be a separate SQL script to insert each cross-reference data type and application specific values for these types.&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt; &lt;img src="http://geekswithblogs.net/charliemott/aggbug/138509.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>charlie.mott</dc:creator>
            <guid>http://geekswithblogs.net/charliemott/archive/2010/03/14/biztalk-cross-reference-data-management-strategy.aspx</guid>
            <pubDate>Mon, 15 Mar 2010 00:32:49 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/charliemott/comments/138509.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/charliemott/archive/2010/03/14/biztalk-cross-reference-data-management-strategy.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/charliemott/comments/commentRss/138509.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/charliemott/services/trackbacks/138509.aspx</trackback:ping>
        </item>
        <item>
            <title>XSD Validation from BizTalk Orchestrations</title>
            <link>http://geekswithblogs.net/charliemott/archive/2010/02/16/xsd-validation-from-biztalk-orchestrations.aspx</link>
            <description>&lt;p&gt;Article Source: http://geekswithblogs.net/charliemott&lt;/p&gt;
&lt;p&gt;There are various blog articles that give sample .NET code that can be used to validate a message against a schema from a BizTalk orchestration.  These include: &lt;a href="http://msdn.microsoft.com/en-us/library/system.xml.xmlreadersettings.validationtype.aspx"&gt;msdn&lt;/a&gt;, &lt;a href="http://www.haloscan.com/comments/bropa09/109551568375443515"&gt;haloscan.com&lt;/a&gt;, &lt;a href="http://www.biztalkgurus.com/forums/t/1879.aspx"&gt;biztalkgurus.com&lt;/a&gt;, &lt;a href="http://www.eggheadcafe.com/software/aspnet/30848777/xmlschemavalidationexcept.aspx"&gt;eggheadcafe.com&lt;/a&gt; and &lt;a href="http://sujant.spaces.live.com/blog/cns!61B9CE11DC9962C3!200.entry"&gt;Sujan Turlapaty&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Many of these blogs have subsequent comments about problems.  Under high loads, I too began to see these classes return “false positives” in my test environment.  (i.e. An XmlSchemaValidationException is being thrown against valid messages. When the messages are re-submitted individually, they pass validation without problems.)&lt;/p&gt;
&lt;p&gt;Doing a bit more research into this, I found this &lt;a href="http://blogs.msdn.com/xmlteam/archive/2009/04/27/xmlschemaset-thread-safety.aspx"&gt;Microsoft XML Team's WebLog&lt;/a&gt; article about the lack of thread safety of the XmlSchema and XmlSchemaSet classes. &lt;/p&gt;
&lt;p&gt;This article also states that "for some reason, this "breaks" more on 64-bit machines, but it's unsafe on all architectures".  This would explain why I only began to see the problem when we started testing on 64-bit servers.  I never experienced the problems on my 32-bit development or build machines.  Nor could I break the code in a unit test using Roy Osherove's &lt;a href="http://weblogs.asp.net/rosherove/archive/2007/06/22/multi-threaded-unit-tests-with-osherove-threadtester.aspx"&gt;ThreadTester&lt;/a&gt;.  So, another lesson learnt - always develop on the same OS type as the target machines.&lt;/p&gt;
&lt;p&gt;To circumvent this problem, I am now calling a validation pipeline from the orchestrations. (I am using a pipeline with &lt;span class="fn n"&gt;&lt;span class="given-name"&gt;Saravana&lt;/span&gt; &lt;span class="family-name"&gt;Kumar&lt;/span&gt;&lt;/span&gt;'s &lt;a href="http://www.digitaldeposit.net/saravana/post/2008/04/05/Extended-XmlValidation-Pipeline-Component.aspx"&gt;Extended XML Validation Pipeline Component&lt;/a&gt; so that exceptions report all the validation errors, not just the first). This is working well. However, it does mean that I have had to set the orchestrations to run as long-running transactions.&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #ff0000"&gt;Update (19/02/2010):&lt;/span&gt; Both the out-of-the-box validation pipeline component and &lt;span class="fn n"&gt;&lt;span class="given-name"&gt;Saravana&lt;/span&gt; &lt;span class="family-name"&gt;Kumar&lt;/span&gt;&lt;/span&gt;'s &lt;a href="http://www.digitaldeposit.net/saravana/post/2008/04/05/Extended-XmlValidation-Pipeline-Component.aspx"&gt;Extended XML Validation Pipeline Component&lt;/a&gt;, use the &lt;a href="http://msdn.microsoft.com/en-us/library/system.xml.schema.xmlschemacollection.aspx"&gt;deprecated XmlSchemaCollection class&lt;/a&gt;. This class is more thread safe than the replacement XmlSchemaSet class.  As such, rather than the above solution of calling a pipeline from an orchestration, another solution would be to modify the validation method to use the XmlSchemaCollection instead of the XmlSchemaSet class.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/charliemott/aggbug/137990.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>charlie.mott</dc:creator>
            <guid>http://geekswithblogs.net/charliemott/archive/2010/02/16/xsd-validation-from-biztalk-orchestrations.aspx</guid>
            <pubDate>Tue, 16 Feb 2010 16:49:11 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/charliemott/comments/137990.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/charliemott/archive/2010/02/16/xsd-validation-from-biztalk-orchestrations.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/charliemott/comments/commentRss/137990.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/charliemott/services/trackbacks/137990.aspx</trackback:ping>
        </item>
        <item>
            <title>BizTalk Map Documenter</title>
            <link>http://geekswithblogs.net/charliemott/archive/2009/07/23/biztalk-map-documenter.aspx</link>
            <description>&lt;p&gt;Article Source: http://geekswithblogs.net/charliemott&lt;br /&gt;
&lt;br /&gt;
The "HTML Generator StyleSheet for BizTalk Maps" originally posted by &lt;a href="http://www.hartsteve.com/2006/02/20/biztalk-map-documenter/"&gt;Steve Hart&lt;/a&gt; is now on CodePlex.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://biztalkmapdoc.codeplex.com"&gt;http://biztalkmapdoc.codeplex.com&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I have uploaded a new version that includes the following updates (not all of this was developed by me):&lt;br /&gt;
 &lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;output of label data.&lt;/li&gt;
    &lt;li&gt;output of constants used.&lt;/li&gt;
    &lt;li&gt;updated table layout.&lt;/li&gt;
    &lt;li&gt;separate tables for each BizTalk page.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I've also included details of how this can be run in an MSBuild process.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/charliemott/aggbug/133669.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>charlie.mott</dc:creator>
            <guid>http://geekswithblogs.net/charliemott/archive/2009/07/23/biztalk-map-documenter.aspx</guid>
            <pubDate>Thu, 23 Jul 2009 20:34:17 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/charliemott/comments/133669.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/charliemott/archive/2009/07/23/biztalk-map-documenter.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/charliemott/comments/commentRss/133669.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/charliemott/services/trackbacks/133669.aspx</trackback:ping>
        </item>
        <item>
            <title>Stub of Dynamics AX for BizTalk Development and BizUnit Testing</title>
            <link>http://geekswithblogs.net/charliemott/archive/2009/05/13/stub-of-dynamics-ax-for-biztalk-development-and-bizunit-testing.aspx</link>
            <description>&lt;p&gt;Article Source: http://geekswithblogs.net/charliemott&lt;br /&gt;
&lt;br /&gt;
This article describes our approach to testing BizTalk integration with Dynamics AX 2009.  It builds on the "Alternative Bindings" approach as described by &lt;a href="http://geekswithblogs.net/michaelstephenson/archive/2009/05/12/132052.aspx"&gt;Mike Stephenson&lt;/a&gt;.   &lt;br /&gt;
 &lt;/p&gt;
&lt;h2&gt;Alternative Bindings&lt;/h2&gt;
&lt;p&gt;We are communicating asynchronous with Dynamics.  As such, in our developer / unit test bindings, we have replaced use of the AIF Adapter with the MSMQ Adapter.   If you are communicating synchronously, you could use the WCF Adapter.&lt;br /&gt;
 &lt;/p&gt;
&lt;h2&gt;Mimic the Dynamics AIF Adapter&lt;/h2&gt;
&lt;p&gt;We also need to mimic the actions of the AIF Adapter.  To do this, we have used 2 test pipelines and a test schema in our developer bindings: &lt;br /&gt;
 &lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;We created a test implementation of the AX envelope schema (AxEnvelope.xsd).  This has the same namespace and structure as the actual AX schema.  The difference is that our test schema has all the Header fields as promoted properties. &lt;/li&gt;
&lt;/ul&gt;
&lt;div style="margin-left: 40px"&gt;&lt;img alt="Test AX Envelope Schema with Promoted Properties" width="461" height="281" src="/images/geekswithblogs_net/charliemott/Stub of Dynamics AX for BizTalk Development and BizUnit Testing/AxEnvelopeSchema.PNG" /&gt;&lt;/div&gt;
&lt;ul&gt;
    &lt;li&gt;On the send side, our send ports use our &lt;span style="font-style: italic"&gt;MimicDynammicsAifAdapterSend &lt;/span&gt;pipeline.  This has an XML Assembler component.  This wraps the outbound messages in the AxEnvelope envelope.  With &lt;a href="http://geekswithblogs.net/sthomas/archive/2004/10/07/12285.aspx"&gt;property demotion&lt;/a&gt;, the header fields are set from the context properties (as set in our orchestrations). This enables us to test these values in our BizUnit validation steps.&lt;br /&gt;
     &lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
    &lt;li&gt;On the receive side, our &lt;span style="font-style: italic"&gt;MimicDynamicsAifAdapterReceive &lt;/span&gt;pipeline has an XML Disassembler that strips off the envelope.  The header fields are prompted to the message context properties.  In particular, the MessageId envelope header field is required to be added to the message context so the response messages can be correlated to the message sent to Dynamics. The dissassember references the schemas: DynamicsAx5.Fault, DynamicsAx5.EntityKeyList, DynamicsAx5.EntityKey and all other message types we are expecting from Dynamics.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Stub Dynamics&lt;/h2&gt;
&lt;p&gt;In order to mimic Dynamics sending a response to messages we send to Dynamics, we also built a custom BizUnit test step (AxSendResponseStep).  &lt;br /&gt;
&lt;br /&gt;
The response message can be a valid response (DynamicsAx5.EntityKeyList) or an invalid response (DynamicsAx5.Fault) as specified in the step parameters.  In the Dynamics response message, the MessageId is replaced with the same MessageId in the received message.  This ensures the Dynamics response messages can be correlated by BizTalk orchestrations.&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: #ffffff"&gt;&lt;span style="color: #ff0000"&gt;Update: 03/04/2011 &lt;/span&gt;&lt;/span&gt;- This approach only applies to integration with AX4 and AX5.  These versions provide the AIF Adapter.  In AX6 (AX2012), services are exposed as WCF services.  As such, regular approaches to stubbing out WCF services can be used.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/charliemott/aggbug/132080.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>charlie.mott</dc:creator>
            <guid>http://geekswithblogs.net/charliemott/archive/2009/05/13/stub-of-dynamics-ax-for-biztalk-development-and-bizunit-testing.aspx</guid>
            <pubDate>Wed, 13 May 2009 21:26:40 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/charliemott/comments/132080.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/charliemott/archive/2009/05/13/stub-of-dynamics-ax-for-biztalk-development-and-bizunit-testing.aspx#feedback</comments>
            <slash:comments>7</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/charliemott/comments/commentRss/132080.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/charliemott/services/trackbacks/132080.aspx</trackback:ping>
        </item>
    </channel>
</rss>
