<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="http://www.codeplex.com/rss.xsl"?><rss version="2.0"><channel><title>bizunit Work Item Rss Feed</title><link>http://www.codeplex.com/bizunit/WorkItem/List.aspx</link><description>bizunit Work Item Rss Description</description><item><title>Created Issue: Source Code Project Types Incompatible in Visual Studio 2008 [10671]</title><link>http://bizunit.codeplex.com/WorkItem/View.aspx?WorkItemId=10671</link><description>I can&amp;#39;t open any of the source code projects nor any of the sample projects in VS 2008.&lt;br /&gt;</description><author>tolandmike</author><pubDate>Tue, 22 Sep 2009 14:22:57 GMT</pubDate><guid isPermaLink="false">Created Issue: Source Code Project Types Incompatible in Visual Studio 2008 [10671] 20090922022257P</guid></item><item><title>Created Issue: DBQueryStep - Validate Multiple Rows not working [10619]</title><link>http://bizunit.codeplex.com/WorkItem/View.aspx?WorkItemId=10619</link><description>DBQuery Step doesnt work for multiple row validation&lt;br /&gt;&lt;br /&gt;Row to validate is assigned the first row from DataSet in foreach loop&lt;br /&gt;&lt;br /&gt; Source&amp;#58; DBQueryStep.cs&lt;br /&gt;public void Execute&amp;#40;Context context&amp;#41;&lt;br /&gt;&amp;#9;    &amp;#123;&lt;br /&gt;&amp;#92;&amp;#92;&amp;#92;&lt;br /&gt;                      bamDBRow &amp;#61; ds.Tables&amp;#91;0&amp;#93;.Rows&amp;#91;0&amp;#93;&amp;#59;&lt;br /&gt;&amp;#92;&amp;#92;&amp;#92;&lt;br /&gt;                    &amp;#125;&lt;br /&gt;&lt;br /&gt;Need to assign correct row from the DataSet&lt;br /&gt;</description><author>sharathk</author><pubDate>Fri, 11 Sep 2009 00:17:34 GMT</pubDate><guid isPermaLink="false">Created Issue: DBQueryStep - Validate Multiple Rows not working [10619] 20090911121734A</guid></item><item><title>Commented Issue: XMLValidationStepEx ExecuteValidation throws NullReferenceException</title><link>http://bizunit.codeplex.com/WorkItem/View.aspx?WorkItemId=10243</link><description>private IList&amp;#60;Pair&amp;#62; xPathValidations gets never initialized. &lt;br /&gt;&lt;br /&gt;As a result method public void ExecuteValidation&amp;#40;Stream data, XmlNode validatorConfig, Context context&amp;#41; always throws NullReferenceException.&lt;br /&gt;Comments: ** Comment from web user: maakku ** &lt;p&gt;Sorry, not always, only if there are xpath expressions involved.&lt;/p&gt;</description><author>maakku</author><pubDate>Thu, 02 Jul 2009 13:20:27 GMT</pubDate><guid isPermaLink="false">Commented Issue: XMLValidationStepEx ExecuteValidation throws NullReferenceException 20090702012027P</guid></item><item><title>Created Issue: XMLValidationStepEx ExecuteValidation throws NullReferenceException</title><link>http://bizunit.codeplex.com/WorkItem/View.aspx?WorkItemId=10243</link><description>private IList&amp;#60;Pair&amp;#62; xPathValidations gets never initialized. &lt;br /&gt;&lt;br /&gt;As a result method public void ExecuteValidation&amp;#40;Stream data, XmlNode validatorConfig, Context context&amp;#41; always throws NullReferenceException.&lt;br /&gt;</description><author>maakku</author><pubDate>Thu, 02 Jul 2009 13:16:36 GMT</pubDate><guid isPermaLink="false">Created Issue: XMLValidationStepEx ExecuteValidation throws NullReferenceException 20090702011636P</guid></item><item><title>Commented Issue: The project type is not supported by this installation</title><link>http://bizunit.codeplex.com/WorkItem/View.aspx?WorkItemId=10223</link><description>When opening the solution file of version 3.0, I get the error &amp;#34;The project type is not supported by this installation&amp;#34; for 4 of the C&amp;#35; projects in the solution.&lt;br /&gt;For example BizUnit.UIAutomation.TestUI opens fine and BizUnit.Tests &amp;#40;both are C&amp;#35; projects&amp;#41; does not open.&lt;br /&gt;&lt;br /&gt;I downloaded version 2.3 of BizUnit and the problem is gone.&lt;br /&gt;Perhaps there is a prerequisite that I need to install&amp;#63;&lt;br /&gt;Comments: ** Comment from web user: twinpiloot ** &lt;p&gt;Meanwhile I found the problem. BizUnit depends on Visual Studio 2005 Team System.&lt;br /&gt;Some projects have the type &amp;#34;Test Project&amp;#34; and this is not included with VS 2005 Professional for example.&lt;/p&gt;</description><author>twinpiloot</author><pubDate>Wed, 01 Jul 2009 13:07:36 GMT</pubDate><guid isPermaLink="false">Commented Issue: The project type is not supported by this installation 20090701010736P</guid></item><item><title>Created Issue: The project type is not supported by this installation</title><link>http://bizunit.codeplex.com/WorkItem/View.aspx?WorkItemId=10223</link><description>When opening the solution file of version 3.0, I get the error &amp;#34;The project type is not supported by this installation&amp;#34; for 4 of the C&amp;#35; projects in the solution.&lt;br /&gt;For example BizUnit.UIAutomation.TestUI opens fine and BizUnit.Tests &amp;#40;both are C&amp;#35; projects&amp;#41; does not open.&lt;br /&gt;&lt;br /&gt;I downloaded version 2.3 of BizUnit and the problem is gone.&lt;br /&gt;Perhaps there is a prerequisite that I need to install&amp;#63;&lt;br /&gt;</description><author>twinpiloot</author><pubDate>Wed, 01 Jul 2009 09:57:36 GMT</pubDate><guid isPermaLink="false">Created Issue: The project type is not supported by this installation 20090701095736A</guid></item><item><title>Created Issue: Error in helpfile on BizUnitTestCase code example</title><link>http://bizunit.codeplex.com/WorkItem/View.aspx?WorkItemId=9734</link><description>Looking at the code example in the CHM file entry for BizUnitTestCase, it has an empty constructor, but it&amp;#39;s only got the ...  public BizUnitTestCase&amp;#40;string name&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#47;&amp;#47; Create the BizUnitTestCase&lt;br /&gt;BizUnitTestCase testCase &amp;#61; new BizUnitTestCase&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;</description><author>steveculshaw</author><pubDate>Sat, 11 Apr 2009 20:07:37 GMT</pubDate><guid isPermaLink="false">Created Issue: Error in helpfile on BizUnitTestCase code example 20090411080737P</guid></item><item><title>Created Issue: Minor point - correct home page content</title><link>http://bizunit.codeplex.com/WorkItem/View.aspx?WorkItemId=9733</link><description>It would be nice to correct the typename references on the home page to take account of v3.x ... &lt;br /&gt;&lt;br /&gt;&amp;#60;TestStep assemblyPath&amp;#61;&amp;#34;&amp;#34; typeName&amp;#61;&amp;#34;Microsoft.Services.BizTalkApplicationFramework.BizUnit.FileCreateStep&amp;#34;&amp;#62;&lt;br /&gt;</description><author>steveculshaw</author><pubDate>Sat, 11 Apr 2009 16:17:40 GMT</pubDate><guid isPermaLink="false">Created Issue: Minor point - correct home page content 20090411041740P</guid></item><item><title>Created Issue: Minor point - incorrect Assembly KeyFile</title><link>http://bizunit.codeplex.com/WorkItem/View.aspx?WorkItemId=9723</link><description>I installed and started on the SDK examples, but got an error w.r.t. the key file &lt;br /&gt;&lt;br /&gt;I think it should be ... C&amp;#58;&amp;#92;Program Files&amp;#92;BizUnit&amp;#92;BizUnit 3.0&amp;#92;Src&amp;#92;SDK&amp;#92;SampleSolution&amp;#92;src&amp;#92;BtsTestProj&amp;#92;key.snk &lt;br /&gt;&lt;br /&gt;but it&amp;#39;s installed with ... C&amp;#58;&amp;#92;Kevin&amp;#92;Code-Projects&amp;#92;BizUnit&amp;#92;BizUnit2.2&amp;#92;Src&amp;#92;BizUnit&amp;#92;BizUnit.snk&lt;br /&gt;</description><author>steveculshaw</author><pubDate>Fri, 10 Apr 2009 14:03:47 GMT</pubDate><guid isPermaLink="false">Created Issue: Minor point - incorrect Assembly KeyFile 20090410020347P</guid></item><item><title>Created Issue: FileDeleteStep takeFromCtx</title><link>http://bizunit.codeplex.com/WorkItem/View.aspx?WorkItemId=9676</link><description>I wanted to use this with this step and noticed it does not work that is why I&amp;#39;m putting it here as a suggestion to add to the step. I have already made the change myself in the source for the feature to work and attached the changed source file.&lt;br /&gt;</description><author>AlesDoganoc</author><pubDate>Fri, 03 Apr 2009 13:09:24 GMT</pubDate><guid isPermaLink="false">Created Issue: FileDeleteStep takeFromCtx 20090403010924P</guid></item><item><title>Created Issue: NullReferenceException when using Stream based constructor</title><link>http://bizunit.codeplex.com/WorkItem/View.aspx?WorkItemId=9593</link><description>When we use the Stream &amp;#40;representing the config&amp;#41; instead of the XmlNode, we get a null reference exception. It appears to be due to an issue with the logger object not being set correctly. &lt;br /&gt;Setting the logger to use the context logger explicitly &amp;#40;as discussed here&amp;#58; http&amp;#58;&amp;#47;&amp;#47;bizunit.codeplex.com&amp;#47;Thread&amp;#47;View.aspx&amp;#63;ThreadId&amp;#61;39393&amp;#41;  solves the problem&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;benjy&lt;br /&gt;</description><author>santoshbenjamin</author><pubDate>Tue, 24 Mar 2009 12:05:05 GMT</pubDate><guid isPermaLink="false">Created Issue: NullReferenceException when using Stream based constructor 20090324120505P</guid></item><item><title>Created Issue: BizUnit Object not using Injected Logger from Context</title><link>http://bizunit.codeplex.com/WorkItem/View.aspx?WorkItemId=9592</link><description>Please refer to the discussion and comment on this&lt;br /&gt;http&amp;#58;&amp;#47;&amp;#47;bizunit.codeplex.com&amp;#47;Thread&amp;#47;View.aspx&amp;#63;ThreadId&amp;#61;39393&lt;br /&gt;The context logger should be used to initialize the BizUnit logger.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Benjy&lt;br /&gt;</description><author>santoshbenjamin</author><pubDate>Tue, 24 Mar 2009 12:02:15 GMT</pubDate><guid isPermaLink="false">Created Issue: BizUnit Object not using Injected Logger from Context 20090324120215P</guid></item><item><title>Commented Issue: Problem with BizUnit.FileDeleteMultipleStep</title><link>http://bizunit.codeplex.com/WorkItem/View.aspx?WorkItemId=7875</link><description>when i pass the directoryPath using Context object as follows the files will not be deleted&lt;br /&gt;&lt;br /&gt;Context ctx &amp;#61; new Context&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;ctx.Add&amp;#40;&amp;#34;SalesReceiveLocation&amp;#34;, ConfigurationManager.AppSettings&amp;#91;&amp;#34;SalesReceiveLocation&amp;#34;&amp;#93;&amp;#41;&amp;#59;&lt;br /&gt; BizUnit.BizUnit bizUnit &amp;#61; new BizUnit.BizUnit&amp;#40;&amp;#64;&amp;#34;TestCases&amp;#92;ProcessSalesToFinanceOrchestrationWillCreateSalesResponsesFileWhenASalesFileIsReceived.xml&amp;#34;,ctx&amp;#41;&amp;#59;&lt;br /&gt;bizUnit.RunTest&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;i had to modify the Execute method in BizUnit code&amp;#40;FileDeleteMultipleStep.cs&amp;#41;&lt;br /&gt;&lt;br /&gt;public void Execute&amp;#40;XmlNode testConfig, Context context&amp;#41;&lt;br /&gt;&amp;#123;&lt;br /&gt;this.directory &amp;#61; context.ReadConfigAsString&amp;#40; testConfig, &amp;#34;Directory&amp;#34; &amp;#41;&amp;#59;&lt;br /&gt;this.searchPattern &amp;#61; context.ReadConfigAsString&amp;#40; testConfig, &amp;#34;SearchPattern&amp;#34; &amp;#41;&amp;#59;&lt;br /&gt;Execute&amp;#40;context&amp;#41;&amp;#59;&lt;br /&gt;&amp;#125;&lt;br /&gt;&lt;br /&gt;Arun&lt;br /&gt;Comments: ** Comment from web user: santoshbenjamin ** &lt;p&gt;This happens even for regular use &amp;#40;via the XML&amp;#41; because, as shown above, the Execute&amp;#40;context&amp;#41; is not being called.&lt;/p&gt;</description><author>santoshbenjamin</author><pubDate>Mon, 23 Mar 2009 16:02:54 GMT</pubDate><guid isPermaLink="false">Commented Issue: Problem with BizUnit.FileDeleteMultipleStep 20090323040254P</guid></item><item><title>Created Issue: Suggested Enhancement to WaitOnFileStep</title><link>http://www.codeplex.com/bizunit/WorkItem/View.aspx?WorkItemId=9069</link><description>Hello,&lt;br /&gt;I&amp;#39;ve enhanced the WaitOnFileStep class to specify the name of the context key under which to store the name of the file waited for &amp;#40;see discussion at http&amp;#58;&amp;#47;&amp;#47;www.codeplex.com&amp;#47;bizunit&amp;#47;Thread&amp;#47;View.aspx&amp;#63;ThreadId&amp;#61;45364&amp;#41;.&lt;br /&gt;&lt;br /&gt;The source code and the XML test case are attached. Please note that in order to get this working I have also implemented work item 7921 &amp;#40;http&amp;#58;&amp;#47;&amp;#47;www.codeplex.com&amp;#47;bizunit&amp;#47;WorkItem&amp;#47;View.aspx&amp;#63;WorkItemId&amp;#61;7921&amp;#41;.&lt;br /&gt;&lt;br /&gt;Hope you find it useful...&lt;br /&gt;&lt;br /&gt;Fabio&lt;br /&gt;</description><author>fabio_m</author><pubDate>Wed, 28 Jan 2009 11:40:09 GMT</pubDate><guid isPermaLink="false">Created Issue: Suggested Enhancement to WaitOnFileStep 20090128114009A</guid></item><item><title>Created Issue: Concurrent test steps bug</title><link>http://www.codeplex.com/bizunit/WorkItem/View.aspx?WorkItemId=7921</link><description>I have been writing some automated unit tests that include concurrent test steps, and I think there is a bug in the logging functionality when a concurrent test step completes. When I try and run the BizUnit unit test &amp;#34;Test_11_WaitOnFile&amp;#34;, I get the followign error&amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;Error&amp;#58; Exception caught&amp;#33;&lt;br /&gt;System.ApplicationException&amp;#58; This instance is not a concurrent test step&amp;#33;&lt;br /&gt;   at BizUnit.Logger.LogBufferedText&amp;#40;ILogger logger&amp;#41; in C&amp;#58;&amp;#92;Program Files&amp;#92;BizUnit&amp;#92;BizUnit 3.0&amp;#92;Src&amp;#92;BizUnit&amp;#92;Logger.cs&amp;#58;line 146&lt;br /&gt;   at BizUnit.BizUnit.FlushConcurrentQueue&amp;#40;Boolean waitingToFinish&amp;#41; in C&amp;#58;&amp;#92;Program Files&amp;#92;BizUnit&amp;#92;BizUnit 3.0&amp;#92;Src&amp;#92;BizUnit&amp;#92;BizUnit.cs&amp;#58;line 1015&lt;br /&gt;   at BizUnit.BizUnit.ExecuteSteps&amp;#40;XmlNodeList steps&amp;#41; in C&amp;#58;&amp;#92;Program Files&amp;#92;BizUnit&amp;#92;BizUnit 3.0&amp;#92;Src&amp;#92;BizUnit&amp;#92;BizUnit.cs&amp;#58;line 948&lt;br /&gt;   at BizUnit.BizUnit.Execute&amp;#40;&amp;#41; in C&amp;#58;&amp;#92;Program Files&amp;#92;BizUnit&amp;#92;BizUnit 3.0&amp;#92;Src&amp;#92;BizUnit&amp;#92;BizUnit.cs&amp;#58;line 862&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;I have traced the BizUnit source code as the test was running, and I think there is an error in the function Logger.LogBufferedText&amp;#40;ILogger logger&amp;#41;. The code throws an exception if &amp;#40;&amp;#33;this.concurrentExecutionMode&amp;#41; evaluates to true, but the &amp;#34;this&amp;#34; instance is for the main thread that is used for non-concurrent test steps. The code needs to check the concurrentExecutionMode for the ILogger parameter, like this&amp;#58;&lt;br /&gt;&lt;br /&gt;public void LogBufferedText&amp;#40;ILogger logger&amp;#41;&lt;br /&gt;&amp;#123;&lt;br /&gt;    &amp;#47;&amp;#47; CODE CHANGE&lt;br /&gt;    if &amp;#40; &amp;#33;logger.ConcurrentExecutionMode &amp;#41;&lt;br /&gt;    &amp;#123;&lt;br /&gt;        throw new ApplicationException&amp;#40;&amp;#34;This instance is not a concurrent test step&amp;#33;&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;    &amp;#125;&lt;br /&gt;&lt;br /&gt;    WriteLine&amp;#40;logger.BufferedText&amp;#41;&amp;#59;&lt;br /&gt;&amp;#125;&lt;br /&gt;&lt;br /&gt;Now the unit test works.&lt;br /&gt;</description><author>abramsmj</author><pubDate>Thu, 30 Oct 2008 12:33:57 GMT</pubDate><guid isPermaLink="false">Created Issue: Concurrent test steps bug 20081030123357P</guid></item><item><title>Created Issue: Problem with BizUnit.FileDeleteMultipleStep</title><link>http://www.codeplex.com/bizunit/WorkItem/View.aspx?WorkItemId=7875</link><description>when i pass the directoryPath using Context object as follows the files will not be deleted&lt;br /&gt;&lt;br /&gt;Context ctx &amp;#61; new Context&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;ctx.Add&amp;#40;&amp;#34;SalesReceiveLocation&amp;#34;, ConfigurationManager.AppSettings&amp;#91;&amp;#34;SalesReceiveLocation&amp;#34;&amp;#93;&amp;#41;&amp;#59;&lt;br /&gt; BizUnit.BizUnit bizUnit &amp;#61; new BizUnit.BizUnit&amp;#40;&amp;#64;&amp;#34;TestCases&amp;#92;ProcessSalesToFinanceOrchestrationWillCreateSalesResponsesFileWhenASalesFileIsReceived.xml&amp;#34;,ctx&amp;#41;&amp;#59;&lt;br /&gt;bizUnit.RunTest&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;i had to modify the Execute method in BizUnit code&amp;#40;FileDeleteMultipleStep.cs&amp;#41;&lt;br /&gt;&lt;br /&gt;public void Execute&amp;#40;XmlNode testConfig, Context context&amp;#41;&lt;br /&gt;&amp;#123;&lt;br /&gt;this.directory &amp;#61; context.ReadConfigAsString&amp;#40; testConfig, &amp;#34;Directory&amp;#34; &amp;#41;&amp;#59;&lt;br /&gt;this.searchPattern &amp;#61; context.ReadConfigAsString&amp;#40; testConfig, &amp;#34;SearchPattern&amp;#34; &amp;#41;&amp;#59;&lt;br /&gt;Execute&amp;#40;context&amp;#41;&amp;#59;&lt;br /&gt;&amp;#125;&lt;br /&gt;&lt;br /&gt;Arun&lt;br /&gt;</description><author>arungoPalam</author><pubDate>Fri, 24 Oct 2008 12:52:47 GMT</pubDate><guid isPermaLink="false">Created Issue: Problem with BizUnit.FileDeleteMultipleStep 20081024125247P</guid></item><item><title>Commented Issue: How to automate LoadGen using BizUnit - LoadGenExecuteStep</title><link>http://www.codeplex.com/bizunit/WorkItem/View.aspx?WorkItemId=5390</link><description>I thought it would be usefull to record my finding, as I spent sometime trying to get this working.&lt;br /&gt;&lt;br /&gt;Objective&amp;#58;&lt;br /&gt;Try to automate Load and perfomance testing throught the use of BizUnit.&lt;br /&gt;&lt;br /&gt;So I did the following&amp;#58;&lt;br /&gt;1. Create a &amp;#34;LoadGen&amp;#34; Test&amp;#58;&lt;br /&gt;    1. LoadGen Configuration file&lt;br /&gt;    2. Sample File &amp;#40;or template&amp;#41; to be used by LoadGen&lt;br /&gt;&amp;#40;to test this, I used the LoadGenConsole.exe&amp;#41;&lt;br /&gt;&lt;br /&gt;2. created a BizUnit XML configuration file that runs few steps, example&amp;#58;&lt;br /&gt;   Step 1&amp;#58; Clean MsgBox&lt;br /&gt;   Step 2&amp;#58; Restart Host&lt;br /&gt;   Step 3&amp;#58; ..&lt;br /&gt;   Step 4&amp;#58; sing LoadGenStep in BizUnit, try to run the LoadGenConfiguration file created in &amp;#35;1&lt;br /&gt;&lt;br /&gt;3. using VS Team System Testing tools, I crated the test class &amp;#40;you can use NUnit if you wish&amp;#41;, and followed the normal BizUnit creation steps...&lt;br /&gt;&lt;br /&gt;so easy... but .. does not work&amp;#33; some more work need to be done... &lt;br /&gt;&lt;br /&gt;-Notes &amp;#58;&lt;br /&gt;&amp;#9;&amp;#167; My Current System Configurations&amp;#58;&lt;br /&gt;&amp;#9;   &amp;#9633; VS team edition&lt;br /&gt;&amp;#9;   &amp;#9633; Load Gen &amp;#40;tried both&amp;#41;&lt;br /&gt;&amp;#9;   &amp;#9633; Virtual Machine  with normal BizTalk 2006 R2 standalone installation on windows 2003 server.&lt;br /&gt;&amp;#9;&amp;#167; LoadGen 2007 assemblies can not be GACed as it the assemblies are not strongly named&amp;#33;, use old LoadGen instead.&lt;br /&gt;&amp;#9;&amp;#167; LoadGen source code is not provided, very hard to debug and understand reasons for exception.&lt;br /&gt;&amp;#9;&amp;#167; LoadGen library consumer MUST be in the same folder as ALL LoadGen binaries &amp;#40;C&amp;#58;&amp;#92;Program Files&amp;#92;LoadGen&amp;#92;Bins&amp;#41;&lt;br /&gt;&amp;#9;&amp;#167; All LoadGen libraries are NOT GACed by default.&lt;br /&gt;&amp;#9;&amp;#167; I don&amp;#39;t think .NET framework 2 SDK is a required prerequisite for LoadGen if VS.Net is installed. &lt;br /&gt;&amp;#9;&amp;#167; If you used the default installation and configuration, you can get the following&amp;#58;&lt;br /&gt;&amp;#9;   &amp;#9633; If you try to start a BizUnit Test, VS send a message stating that a problem with &amp;#34;vstesthost.exe&amp;#34; or something similar, and the test ends&amp;#33;&lt;br /&gt;&amp;#9;   &amp;#9633; If you step through bizUnit.LoadGenSteps project, an exception &amp;#34;Null Object Reference&amp;#34; is raised after code calls loadGen.Start&amp;#40;&amp;#41; &amp;#40;the exception is thrown in a deferent thread&amp;#33;&amp;#41;.&lt;br /&gt;&amp;#9;   &amp;#9633; In the event log - 3 messages&amp;#58;&lt;br /&gt;&amp;#9;         &amp;#61;&amp;#62;Message &amp;#34;Cannot Load Transport  - HTTPTransport.dll&amp;#34;&lt;br /&gt;&amp;#9;         &amp;#61;&amp;#62; Message &amp;#34;Start&amp;#40;&amp;#41; Section &amp;#91;HttpSection&amp;#93; encountered the following exception&amp;#33;System.NullReferenceException&amp;#58; Object reference not set to an instance of an object.at LoadGen.NormalSectionThread.Start&amp;#40;&amp;#41;&amp;#34;&lt;br /&gt;&amp;#9;         &amp;#61;&amp;#62;Message&amp;#34;EventType clr20r3, P1 vstesthost.exe, P2 8.0.0.0, P3 4333df57, P4 loadgen, ... &amp;#34;&lt;br /&gt;&amp;#9;   &amp;#9633; LoadGen logging information &amp;#40;which is accessed through the Test Results&amp;#34;&amp;#41; shows that the LoadGen was Stopped without dropping any files.&lt;br /&gt;&amp;#9;&lt;br /&gt;What you need to do&amp;#58;&amp;#9;&amp;#9;&amp;#9;&lt;br /&gt;&amp;#9;- Procedures&amp;#58;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#167; LoadGen&amp;#58;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9633; Optional&amp;#58; uninstall LoadGen 2007 &amp;#40;you may need to restart windows&amp;#41;.&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9633; Install old version.&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9633; GAC all managed dlls in folder &amp;#40;C&amp;#58;&amp;#92;Program Files&amp;#92;LoadGen&amp;#92;Bins&amp;#41; &lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#167; BizUnit.LoadGenSteps&amp;#58;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9633; Change the build folder to &amp;#40;C&amp;#58;&amp;#92;Program Files&amp;#92;LoadGen&amp;#92;Bins&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9633; Sign the dll &amp;#40;try to use the key provided with BizUnit version 2.3&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9633; Remove the reference to LoadGen, and add a new reference to the GACed LoadGen.dll file.&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9633; Build the project&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9633; GAC the assembly &amp;#40;bizUnit.LoadGenSteps.dll&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#167; BizUnit XML  configuration files&amp;#58;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#60;TestStep &lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;assemblyPath&amp;#61;&amp;#34;C&amp;#58;&amp;#92;Program Files&amp;#92;LoadGen&amp;#92;Bins&amp;#92;...BizUnit.LoadGenSteps.dll&amp;#34; typeName&amp;#61;&amp;#34;Microsoft.Services.BizTalkApplicationFramework.BizUnit.LoadGenExecuteStep&amp;#34;&amp;#62;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#60;LoadGenTestConfig&amp;#62;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;...&amp;#92;LoadTest_Preparation_Success.xml&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#60;&amp;#47;LoadGenTestConfig&amp;#62;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#60;&amp;#47;TestStep&amp;#62;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Note that the assemblyPath and TypeName are not done using the documented way in bizUnit documenations&amp;#33;&lt;br /&gt;&lt;br /&gt;Hope that helps&amp;#33;&amp;#33;&lt;br /&gt;&lt;br /&gt;Ayman Dabees&lt;br /&gt;Comments: ** Comment from web user: conlyn ** &lt;p&gt;I got this to work in a few less steps that what was done above using LoadGen 2004.&lt;/p&gt;&lt;p&gt;I added the loadgen.dll to the GAC using gacutil.exe and made sure I used the full path in the loadgen config file when pointing to the FileTransport.dll &amp;#40;Or HTTPtransport and so on&amp;#41;.  I.E.&lt;br /&gt;&amp;#60;Section Name&amp;#61;&amp;#34;FileSection&amp;#34;&amp;#62;&lt;br /&gt;  &amp;#60;Transport Name&amp;#61;&amp;#34;File&amp;#34;&amp;#62;&lt;br /&gt;    &amp;#60;Assembly&amp;#62;C&amp;#58;&amp;#92;Program Files&amp;#92;LoadGen&amp;#92;Bins&amp;#92;FileTransport.dll&amp;#47;FileTransport.FileTransport&amp;#60;&amp;#47;Assembly&amp;#62;&lt;br /&gt;  &amp;#60;&amp;#47;Transport&amp;#62;&lt;/p&gt;&lt;p&gt;I left the loadgen call in the BizUnit TestStep in the default format&amp;#58;&lt;br /&gt;&amp;#60;TestStep assemblyPath&amp;#61;&amp;#34;&amp;#34; typeName&amp;#61;&amp;#34;BizUnit.LoadGenSteps.LoadGenExecuteStep, BizUnit.LoadGenSteps, Version&amp;#61;3.0.0.0, Culture&amp;#61;neutral, PublicKeyToken&amp;#61;7eb7d82981ae5162&amp;#34;&amp;#62;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#60;LoadGenTestConfig&amp;#62;.&amp;#92;LoadGen&amp;#92;BUTest.xml&amp;#60;&amp;#47;LoadGenTestConfig&amp;#62;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#60;&amp;#47;TestStep&amp;#62;&lt;/p&gt;&lt;p&gt;It still doesn&amp;#39;t work with Loadgen 2007, but getting it to work with 2004 isn&amp;#39;t quite the hassle as it might seem.&lt;/p&gt;&lt;p&gt;-Conlyn&lt;/p&gt;</description><author>conlyn</author><pubDate>Mon, 22 Sep 2008 15:59:36 GMT</pubDate><guid isPermaLink="false">Commented Issue: How to automate LoadGen using BizUnit - LoadGenExecuteStep 20080922035936P</guid></item><item><title>Commented Issue: How to automate LoadGen using BizUnit - LoadGenExecuteStep</title><link>http://www.codeplex.com/bizunit/WorkItem/View.aspx?WorkItemId=5390</link><description>I thought it would be usefull to record my finding, as I spent sometime trying to get this working.&lt;br /&gt;&lt;br /&gt;Objective&amp;#58;&lt;br /&gt;Try to automate Load and perfomance testing throught the use of BizUnit.&lt;br /&gt;&lt;br /&gt;So I did the following&amp;#58;&lt;br /&gt;1. Create a &amp;#34;LoadGen&amp;#34; Test&amp;#58;&lt;br /&gt;    1. LoadGen Configuration file&lt;br /&gt;    2. Sample File &amp;#40;or template&amp;#41; to be used by LoadGen&lt;br /&gt;&amp;#40;to test this, I used the LoadGenConsole.exe&amp;#41;&lt;br /&gt;&lt;br /&gt;2. created a BizUnit XML configuration file that runs few steps, example&amp;#58;&lt;br /&gt;   Step 1&amp;#58; Clean MsgBox&lt;br /&gt;   Step 2&amp;#58; Restart Host&lt;br /&gt;   Step 3&amp;#58; ..&lt;br /&gt;   Step 4&amp;#58; sing LoadGenStep in BizUnit, try to run the LoadGenConfiguration file created in &amp;#35;1&lt;br /&gt;&lt;br /&gt;3. using VS Team System Testing tools, I crated the test class &amp;#40;you can use NUnit if you wish&amp;#41;, and followed the normal BizUnit creation steps...&lt;br /&gt;&lt;br /&gt;so easy... but .. does not work&amp;#33; some more work need to be done... &lt;br /&gt;&lt;br /&gt;-Notes &amp;#58;&lt;br /&gt;&amp;#9;&amp;#167; My Current System Configurations&amp;#58;&lt;br /&gt;&amp;#9;   &amp;#9633; VS team edition&lt;br /&gt;&amp;#9;   &amp;#9633; Load Gen &amp;#40;tried both&amp;#41;&lt;br /&gt;&amp;#9;   &amp;#9633; Virtual Machine  with normal BizTalk 2006 R2 standalone installation on windows 2003 server.&lt;br /&gt;&amp;#9;&amp;#167; LoadGen 2007 assemblies can not be GACed as it the assemblies are not strongly named&amp;#33;, use old LoadGen instead.&lt;br /&gt;&amp;#9;&amp;#167; LoadGen source code is not provided, very hard to debug and understand reasons for exception.&lt;br /&gt;&amp;#9;&amp;#167; LoadGen library consumer MUST be in the same folder as ALL LoadGen binaries &amp;#40;C&amp;#58;&amp;#92;Program Files&amp;#92;LoadGen&amp;#92;Bins&amp;#41;&lt;br /&gt;&amp;#9;&amp;#167; All LoadGen libraries are NOT GACed by default.&lt;br /&gt;&amp;#9;&amp;#167; I don&amp;#39;t think .NET framework 2 SDK is a required prerequisite for LoadGen if VS.Net is installed. &lt;br /&gt;&amp;#9;&amp;#167; If you used the default installation and configuration, you can get the following&amp;#58;&lt;br /&gt;&amp;#9;   &amp;#9633; If you try to start a BizUnit Test, VS send a message stating that a problem with &amp;#34;vstesthost.exe&amp;#34; or something similar, and the test ends&amp;#33;&lt;br /&gt;&amp;#9;   &amp;#9633; If you step through bizUnit.LoadGenSteps project, an exception &amp;#34;Null Object Reference&amp;#34; is raised after code calls loadGen.Start&amp;#40;&amp;#41; &amp;#40;the exception is thrown in a deferent thread&amp;#33;&amp;#41;.&lt;br /&gt;&amp;#9;   &amp;#9633; In the event log - 3 messages&amp;#58;&lt;br /&gt;&amp;#9;         &amp;#61;&amp;#62;Message &amp;#34;Cannot Load Transport  - HTTPTransport.dll&amp;#34;&lt;br /&gt;&amp;#9;         &amp;#61;&amp;#62; Message &amp;#34;Start&amp;#40;&amp;#41; Section &amp;#91;HttpSection&amp;#93; encountered the following exception&amp;#33;System.NullReferenceException&amp;#58; Object reference not set to an instance of an object.at LoadGen.NormalSectionThread.Start&amp;#40;&amp;#41;&amp;#34;&lt;br /&gt;&amp;#9;         &amp;#61;&amp;#62;Message&amp;#34;EventType clr20r3, P1 vstesthost.exe, P2 8.0.0.0, P3 4333df57, P4 loadgen, ... &amp;#34;&lt;br /&gt;&amp;#9;   &amp;#9633; LoadGen logging information &amp;#40;which is accessed through the Test Results&amp;#34;&amp;#41; shows that the LoadGen was Stopped without dropping any files.&lt;br /&gt;&amp;#9;&lt;br /&gt;What you need to do&amp;#58;&amp;#9;&amp;#9;&amp;#9;&lt;br /&gt;&amp;#9;- Procedures&amp;#58;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#167; LoadGen&amp;#58;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9633; Optional&amp;#58; uninstall LoadGen 2007 &amp;#40;you may need to restart windows&amp;#41;.&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9633; Install old version.&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9633; GAC all managed dlls in folder &amp;#40;C&amp;#58;&amp;#92;Program Files&amp;#92;LoadGen&amp;#92;Bins&amp;#41; &lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#167; BizUnit.LoadGenSteps&amp;#58;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9633; Change the build folder to &amp;#40;C&amp;#58;&amp;#92;Program Files&amp;#92;LoadGen&amp;#92;Bins&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9633; Sign the dll &amp;#40;try to use the key provided with BizUnit version 2.3&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9633; Remove the reference to LoadGen, and add a new reference to the GACed LoadGen.dll file.&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9633; Build the project&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9633; GAC the assembly &amp;#40;bizUnit.LoadGenSteps.dll&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#167; BizUnit XML  configuration files&amp;#58;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#60;TestStep &lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;assemblyPath&amp;#61;&amp;#34;C&amp;#58;&amp;#92;Program Files&amp;#92;LoadGen&amp;#92;Bins&amp;#92;...BizUnit.LoadGenSteps.dll&amp;#34; typeName&amp;#61;&amp;#34;Microsoft.Services.BizTalkApplicationFramework.BizUnit.LoadGenExecuteStep&amp;#34;&amp;#62;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#60;LoadGenTestConfig&amp;#62;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;...&amp;#92;LoadTest_Preparation_Success.xml&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#60;&amp;#47;LoadGenTestConfig&amp;#62;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#60;&amp;#47;TestStep&amp;#62;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Note that the assemblyPath and TypeName are not done using the documented way in bizUnit documenations&amp;#33;&lt;br /&gt;&lt;br /&gt;Hope that helps&amp;#33;&amp;#33;&lt;br /&gt;&lt;br /&gt;Ayman Dabees&lt;br /&gt;Comments: ** Comment from web user: sarunprasath ** &lt;p&gt;So LoadGen 2007 version cannot be used with BizUnit. so how to go about the WCF Performance testing&lt;/p&gt;</description><author>sarunprasath</author><pubDate>Mon, 08 Sep 2008 12:44:51 GMT</pubDate><guid isPermaLink="false">Commented Issue: How to automate LoadGen using BizUnit - LoadGenExecuteStep 20080908124451P</guid></item><item><title>Created Issue: Improved SOAPHTTPRequestResponse</title><link>http://www.codeplex.com/bizunit/WorkItem/View.aspx?WorkItemId=7233</link><description>Improved to include any imports within the wsdl.&lt;br /&gt;&lt;br /&gt;&amp;#47;&amp;#47;---------------------------------------------------------------------&lt;br /&gt;&amp;#47;&amp;#47; File&amp;#58; SOAPHTTPRequestResponseStep.cs&lt;br /&gt;&amp;#47;&amp;#47; &lt;br /&gt;&amp;#47;&amp;#47; Summary&amp;#58; &lt;br /&gt;&amp;#47;&amp;#47;&lt;br /&gt;&amp;#47;&amp;#47;---------------------------------------------------------------------&lt;br /&gt;&amp;#47;&amp;#47; Copyright &amp;#40;c&amp;#41; 2004-2008, Kevin B. Smith. All rights reserved.&lt;br /&gt;&amp;#47;&amp;#47;&lt;br /&gt;&amp;#47;&amp;#47; THIS CODE AND INFORMATION ARE PROVIDED &amp;#34;AS IS&amp;#34; WITHOUT WARRANTY OF ANY&lt;br /&gt;&amp;#47;&amp;#47; KIND, WHETHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE&lt;br /&gt;&amp;#47;&amp;#47; IMPLIED WARRANTIES OF MERCHANTABILITY AND&amp;#47;OR FITNESS FOR A PARTICULAR&lt;br /&gt;&amp;#47;&amp;#47; PURPOSE.&lt;br /&gt;&amp;#47;&amp;#47;---------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;namespace BizUnit&lt;br /&gt;&amp;#123;&lt;br /&gt;    using System&amp;#59;&lt;br /&gt;    using System.IO&amp;#59;&lt;br /&gt;    using System.Xml&amp;#59;&lt;br /&gt;    using System.Net&amp;#59;&lt;br /&gt;    using System.Reflection&amp;#59;&lt;br /&gt;    using System.Xml.Serialization&amp;#59;&lt;br /&gt;    using Microsoft.CSharp&amp;#59;&lt;br /&gt;    using System.CodeDom&amp;#59;&lt;br /&gt;    using System.CodeDom.Compiler&amp;#59;&lt;br /&gt;    using System.Web.Services.Description&amp;#59;&lt;br /&gt;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;summary&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; The SOAPHTTPRequestResponseStep test step may be used to call a Web Service and optionally validate it&amp;#39;s response.&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;summary&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;remarks&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; The following shows an example of the Xml representation of this test step.&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;code escaped&amp;#61;&amp;#34;true&amp;#34;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#60;TestStep assemblyPath&amp;#61;&amp;#34;&amp;#34; typeName&amp;#61;&amp;#34;BizUnit.SOAPHTTPRequestResponseStep&amp;#34;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;WebServiceWSDLURL&amp;#62;http&amp;#58;&amp;#47;&amp;#47;machine&amp;#47;virdir&amp;#47;StockQuoteService.aspx&amp;#63;wsdl&amp;#60;&amp;#47;WebServiceWSDLURL&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;ServiceName&amp;#62;Samples_StockQuoteService&amp;#60;&amp;#47;ServiceName&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;WebMethod&amp;#62;GetQuote&amp;#60;&amp;#47;WebMethod&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;InputMessageTypeName&amp;#62;QuoteRequest&amp;#60;&amp;#47;InputMessageTypeName&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;MessagePayload&amp;#62;.&amp;#92;TestData&amp;#92;RequestMSFTQuote.xml&amp;#60;&amp;#47;MessagePayload&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;&amp;#33;-- Note&amp;#58; ContextLoader Step could be any generic validation step --&amp;#62;&amp;#9;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;    &amp;#60;ContextLoaderStep assemblyPath&amp;#61;&amp;#34;&amp;#34; typeName&amp;#61;&amp;#34;BizUnit.XmlContextLoader&amp;#34;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;    &amp;#60;XPath contextKey&amp;#61;&amp;#34;PoNumber&amp;#34;&amp;#62;&amp;#47;Po&amp;#47;Header&amp;#47;Id&amp;#60;&amp;#47;XPath&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;    &amp;#60;XPath contextKey&amp;#61;&amp;#34;Sender&amp;#34;&amp;#62;&amp;#47;Po&amp;#47;Header&amp;#47;Id&amp;#60;&amp;#47;XPath&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;    &amp;#60;XPath contextKey&amp;#61;&amp;#34;Amount&amp;#34;&amp;#62;&amp;#47;Po&amp;#47;Header&amp;#47;Id&amp;#60;&amp;#47;XPath&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;    &amp;#60;XPath contextKey&amp;#61;&amp;#34;Description&amp;#34;&amp;#62;&amp;#47;Po&amp;#47;Header&amp;#47;Detail&amp;#47;Description&amp;#60;&amp;#47;XPath&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;    &amp;#60;&amp;#47;ContextLoaderStep&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;&amp;#33;-- Note&amp;#58; Validation step could be any generic validation step --&amp;#62;&amp;#9;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;ValidationStep assemblyPath&amp;#61;&amp;#34;&amp;#34; typeName&amp;#61;&amp;#34;BizUnit.XmlValidationStep&amp;#34;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;XPathList&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#60;XPathValidation query&amp;#61;&amp;#34;&amp;#47;StockQuote&amp;#47;Symbol&amp;#34;&amp;#62;MSFT&amp;#60;&amp;#47;XPathValidation&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#60;XPathValidation query&amp;#61;&amp;#34;&amp;#47;StockQuote&amp;#47;LastPrice&amp;#34;&amp;#62;35.36&amp;#60;&amp;#47;XPathValidation&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;&amp;#47;XPathList&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;&amp;#47;ValidationStep&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#60;&amp;#47;TestStep&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#60;&amp;#47;code&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#60;list type&amp;#61;&amp;#34;table&amp;#34;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;listheader&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;term&amp;#62;Tag&amp;#60;&amp;#47;term&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;description&amp;#62;Description&amp;#60;&amp;#47;description&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;&amp;#47;listheader&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;term&amp;#62;WebServiceWSDLURL&amp;#60;&amp;#47;term&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;description&amp;#62;The Url where the WSDL maybe obtained&amp;#60;&amp;#47;description&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;&amp;#47;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;term&amp;#62;ServiceName&amp;#60;&amp;#47;term&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;description&amp;#62;The name of the Web Service to invoke&amp;#60;&amp;#47;description&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;&amp;#47;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;term&amp;#62;WebMethod&amp;#60;&amp;#47;term&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;description&amp;#62;The Web Method &amp;#40;opperation&amp;#41; to invoke.&amp;#60;&amp;#47;description&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;&amp;#47;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;term&amp;#62;InputMessageTypeName&amp;#47;ContextProperty&amp;#60;&amp;#47;term&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;description&amp;#62;The type of the input message.&amp;#60;&amp;#47;description&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;&amp;#47;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;term&amp;#62;MessagePayload&amp;#60;&amp;#47;term&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;description&amp;#62;The path to the input data, note, this is the serialized object.&amp;#60;&amp;#47;description&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;&amp;#47;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;term&amp;#62;ContextLoaderStep&amp;#60;&amp;#47;term&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;description&amp;#62;The configuration for the context loader step used to load data into the BizUnit context which may be used by subsequent test steps&amp;#60;para&amp;#62;&amp;#40;optional&amp;#41;&amp;#60;&amp;#47;para&amp;#62;&amp;#60;&amp;#47;description&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;&amp;#47;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;term&amp;#62;ValidationStep&amp;#60;&amp;#47;term&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;description&amp;#62;Optional validation step.&amp;#60;&amp;#47;description&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;&amp;#47;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#60;&amp;#47;list&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;para&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; The example below illustrates the calling of the this step for a web service which takes &lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; and returns no paramters&amp;#58;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;code escaped&amp;#61;&amp;#34;true&amp;#34;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;TestStep assemblyPath&amp;#61;&amp;#34;&amp;#34; typeName&amp;#61;&amp;#34;BizUnit.SOAPHTTPRequestResponseStep&amp;#34;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#9;&amp;#60;WebServiceWSDLURL&amp;#62;http&amp;#58;&amp;#47;&amp;#47;localhost&amp;#47;StockQuoteService&amp;#47;StockQuoteService.asmx&amp;#63;wsdl&amp;#60;&amp;#47;WebServiceWSDLURL&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#9;&amp;#60;ServiceName&amp;#62;StockQuoteService&amp;#60;&amp;#47;ServiceName&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#9;&amp;#60;WebMethod&amp;#62;VoidMethod&amp;#60;&amp;#47;WebMethod&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;TestStep&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;code&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;para&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;para&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; The following example illustrates the use of this step in order to invoke a stock quote web service&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; exposed via BizTalk.&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; An example HTTP request packet is shown below&amp;#58;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;code escaped&amp;#61;&amp;#34;true&amp;#34;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; POST &amp;#47;StockQuoteService_Proxy&amp;#47;StockQuoteService_QuoteService_Port_1.asmx HTTP&amp;#47;1.1&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; Host&amp;#58; localhost&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; Content-Type&amp;#58; application&amp;#47;soap&amp;#43;xml&amp;#59; charset&amp;#61;utf-8&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; Content-Length&amp;#58; length&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#63;xml version&amp;#61;&amp;#34;1.0&amp;#34; encoding&amp;#61;&amp;#34;utf-8&amp;#34;&amp;#63;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;soap12&amp;#58;Envelope xmlns&amp;#58;xsi&amp;#61;&amp;#34;http&amp;#58;&amp;#47;&amp;#47;www.w3.org&amp;#47;2001&amp;#47;XMLSchema-instance&amp;#34; xmlns&amp;#58;xsd&amp;#61;&amp;#34;http&amp;#58;&amp;#47;&amp;#47;www.w3.org&amp;#47;2001&amp;#47;XMLSchema&amp;#34; xmlns&amp;#58;soap12&amp;#61;&amp;#34;http&amp;#58;&amp;#47;&amp;#47;www.w3.org&amp;#47;2003&amp;#47;05&amp;#47;soap-envelope&amp;#34;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;   &amp;#60;soap12&amp;#58;Body&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;     &amp;#60;Operation_1 xmlns&amp;#61;&amp;#34;http&amp;#58;&amp;#47;&amp;#47;StockQuoteService.StockQuote&amp;#34;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;       &amp;#60;StockQuote&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;         &amp;#60;Symbol xmlns&amp;#61;&amp;#34;&amp;#34;&amp;#62;MSFT&amp;#60;&amp;#47;Symbol&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;         &amp;#60;LastPrice xmlns&amp;#61;&amp;#34;&amp;#34;&amp;#62;&amp;#60;&amp;#47;LastPrice&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;       &amp;#60;&amp;#47;StockQuote&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;     &amp;#60;&amp;#47;Operation_1&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;   &amp;#60;&amp;#47;soap12&amp;#58;Body&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;soap12&amp;#58;Envelope&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;code&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;para&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;para&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; An example HTTP response packet is shown below&amp;#58;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;code escaped&amp;#61;&amp;#34;true&amp;#34;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; HTTP&amp;#47;1.1 200 OK&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; Content-Type&amp;#58; application&amp;#47;soap&amp;#43;xml&amp;#59; charset&amp;#61;utf-8&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; Content-Length&amp;#58; length&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#63;xml version&amp;#61;&amp;#34;1.0&amp;#34; encoding&amp;#61;&amp;#34;utf-8&amp;#34;&amp;#63;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;soap12&amp;#58;Envelope xmlns&amp;#58;xsi&amp;#61;&amp;#34;http&amp;#58;&amp;#47;&amp;#47;www.w3.org&amp;#47;2001&amp;#47;XMLSchema-instance&amp;#34; xmlns&amp;#58;xsd&amp;#61;&amp;#34;http&amp;#58;&amp;#47;&amp;#47;www.w3.org&amp;#47;2001&amp;#47;XMLSchema&amp;#34; xmlns&amp;#58;soap12&amp;#61;&amp;#34;http&amp;#58;&amp;#47;&amp;#47;www.w3.org&amp;#47;2003&amp;#47;05&amp;#47;soap-envelope&amp;#34;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;   &amp;#60;soap12&amp;#58;Body&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;     &amp;#60;Operation_1Response xmlns&amp;#61;&amp;#34;http&amp;#58;&amp;#47;&amp;#47;StockQuoteService.StockQuote&amp;#34;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;       &amp;#60;StockQuote&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;         &amp;#60;Symbol xmlns&amp;#61;&amp;#34;&amp;#34;&amp;#62;MSFT&amp;#60;&amp;#47;Symbol&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;         &amp;#60;LastPrice xmlns&amp;#61;&amp;#34;&amp;#34;&amp;#62;29.29&amp;#60;&amp;#47;LastPrice&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;       &amp;#60;&amp;#47;StockQuote&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;     &amp;#60;&amp;#47;Operation_1Response&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;   &amp;#60;&amp;#47;soap12&amp;#58;Body&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;soap12&amp;#58;Envelope&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;code&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;para&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;para&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; An example test step for this web service is shown below&amp;#58;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;code escaped&amp;#61;&amp;#34;true&amp;#34;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;TestStep assemblyPath&amp;#61;&amp;#34;&amp;#34; typeName&amp;#61;&amp;#34;BizUnit.SOAPHTTPRequestResponseStep&amp;#34;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#9;&amp;#60;WebServiceWSDLURL&amp;#62;http&amp;#58;&amp;#47;&amp;#47;localhost&amp;#47;StockQuoteService_Proxy&amp;#47;StockQuoteService_QuoteService_Port_1.asmx&amp;#63;wsdl&amp;#60;&amp;#47;WebServiceWSDLURL&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#9;&amp;#60;ServiceName&amp;#62;StockQuoteService_QuoteService_Port_1&amp;#60;&amp;#47;ServiceName&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#9;&amp;#60;WebMethod&amp;#62;Operation_1&amp;#60;&amp;#47;WebMethod&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#9;&amp;#60;InputMessageTypeName&amp;#62;Operation_1StockQuote&amp;#60;&amp;#47;InputMessageTypeName&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#9;&amp;#60;MessagePayload&amp;#62;..&amp;#92;..&amp;#92;..&amp;#92;Test&amp;#92;BizUnit.Tests&amp;#92;Data&amp;#92;SOAPHTTPRequestResponse-RequestInput001.xml&amp;#60;&amp;#47;MessagePayload&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#9;&amp;#60;ValidationStep assemblyPath&amp;#61;&amp;#34;&amp;#34; typeName&amp;#61;&amp;#34;BizUnit.XmlValidationStep&amp;#34;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#9;&amp;#9;&amp;#60;XPathList&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#9;&amp;#9;&amp;#9;&amp;#60;XPathValidation query&amp;#61;&amp;#34;&amp;#47;Operation_1ResponseStockQuote&amp;#47;Symbol&amp;#34;&amp;#62;MSFT&amp;#60;&amp;#47;XPathValidation&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#9;&amp;#9;&amp;#9;&amp;#60;XPathValidation query&amp;#61;&amp;#34;&amp;#47;Operation_1ResponseStockQuote&amp;#47;LastPrice&amp;#34;&amp;#62;29.29&amp;#60;&amp;#47;XPathValidation&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#9;&amp;#9;&amp;#60;&amp;#47;XPathList&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#9;&amp;#60;&amp;#47;ValidationStep&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;TestStep&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;code&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;para&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;para&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; The contents of the input file SOAPHTTPRequestResponse-RequestInput001.xml is show below&amp;#58;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;code escaped&amp;#61;&amp;#34;true&amp;#34;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;Operation_1StockQuote xmlns&amp;#61;&amp;#34;http&amp;#58;&amp;#47;&amp;#47;StockQuoteService.StockQuote&amp;#34;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#9;&amp;#60;Symbol xmlns&amp;#61;&amp;#34;&amp;#34;&amp;#62;MSFT&amp;#60;&amp;#47;Symbol&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#9;&amp;#60;LastPrice xmlns&amp;#61;&amp;#34;&amp;#34;&amp;#62;&amp;#60;&amp;#47;LastPrice&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;Operation_1StockQuote&amp;#62;    &lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;code&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;para&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#60;&amp;#47;remarks&amp;#62;&amp;#9;&lt;br /&gt;    public class SOAPHTTPRequestResponseStep &amp;#58; ITestStep&lt;br /&gt;    &amp;#123;&lt;br /&gt;        &amp;#47;&amp;#47;&amp;#47; &amp;#60;summary&amp;#62;&lt;br /&gt;        &amp;#47;&amp;#47;&amp;#47; ITestStep.Execute&amp;#40;&amp;#41; implementation&lt;br /&gt;        &amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;summary&amp;#62;&lt;br /&gt;        &amp;#47;&amp;#47;&amp;#47; &amp;#60;param name&amp;#61;&amp;#39;testConfig&amp;#39;&amp;#62;The Xml fragment containing the configuration for this test step&amp;#60;&amp;#47;param&amp;#62;&lt;br /&gt;        &amp;#47;&amp;#47;&amp;#47; &amp;#60;param name&amp;#61;&amp;#39;context&amp;#39;&amp;#62;The context for the test, this holds state that is passed beteen tests&amp;#60;&amp;#47;param&amp;#62;&lt;br /&gt;        public void Execute&amp;#40;XmlNode testConfig, Context context&amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;            const string SOAPPROXYNAMESPACE &amp;#61; &amp;#34;BizUnit.Proxy&amp;#34;&amp;#59;&lt;br /&gt;            Stream request &amp;#61; null&amp;#59;&lt;br /&gt;            Stream response &amp;#61; null&amp;#59;&lt;br /&gt;&lt;br /&gt;            &amp;#47;&amp;#47; Turn on shadow copying of asseblies for the current appdomain. &lt;br /&gt;            AppDomain.CurrentDomain.SetShadowCopyFiles&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;            try&lt;br /&gt;            &amp;#123;&lt;br /&gt;                string wsdlFile &amp;#61; context.ReadConfigAsString&amp;#40;testConfig, &amp;#34;WebServiceWSDLURL&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                string soapMessagePath &amp;#61; context.ReadConfigAsString&amp;#40;testConfig, &amp;#34;MessagePayload&amp;#34;, true&amp;#41;&amp;#59;&lt;br /&gt;                string inputMessageTypeName &amp;#61; context.ReadConfigAsString&amp;#40;testConfig, &amp;#34;InputMessageTypeName&amp;#34;, true&amp;#41;&amp;#59;&lt;br /&gt;                string webMethod &amp;#61; context.ReadConfigAsString&amp;#40;testConfig, &amp;#34;WebMethod&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                string serviceName &amp;#61; context.ReadConfigAsString&amp;#40;testConfig, &amp;#34;ServiceName&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;                Assembly proxyAssembly &amp;#61; GetProxyAssembly&amp;#40;wsdlFile, SOAPPROXYNAMESPACE&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;                object objInputMessage &amp;#61; null&amp;#59;&lt;br /&gt;                if &amp;#40;null &amp;#33;&amp;#61; inputMessageTypeName &amp;#38;&amp;#38; null &amp;#33;&amp;#61; soapMessagePath&amp;#41;&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    objInputMessage &amp;#61;&lt;br /&gt;                        LoadMessage&amp;#40;proxyAssembly, SOAPPROXYNAMESPACE &amp;#43; &amp;#34;.&amp;#34; &amp;#43; inputMessageTypeName, soapMessagePath&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;                    if &amp;#40;null &amp;#33;&amp;#61; objInputMessage&amp;#41;&lt;br /&gt;                    &amp;#123;&lt;br /&gt;                        request &amp;#61; GetOutputStream&amp;#40;objInputMessage&amp;#41;&amp;#59;&lt;br /&gt;                        context.LogData&amp;#40;&amp;#34;SOAPHTTPRequestResponseStep request data&amp;#34;, request&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#125;&lt;br /&gt;                &amp;#125;&lt;br /&gt;&lt;br /&gt;                object proxy &amp;#61; Activator.CreateInstance&amp;#40;proxyAssembly.GetType&amp;#40;SOAPPROXYNAMESPACE &amp;#43; &amp;#34;.&amp;#34; &amp;#43; serviceName&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;                MethodInfo mi &amp;#61; proxy.GetType&amp;#40;&amp;#41;.GetMethod&amp;#40;webMethod&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;                context.LogInfo&amp;#40;&amp;#34;SOAPHTTPRequestResponseStep about to post data from File&amp;#58; &amp;#123;0&amp;#125; to the Service&amp;#58; &amp;#123;1&amp;#125; defined in WSDL&amp;#58; &amp;#123;2&amp;#125;&amp;#34;, soapMessagePath, serviceName, wsdlFile&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;                object outputMessage&amp;#59;&lt;br /&gt;                if &amp;#40;null &amp;#33;&amp;#61; inputMessageTypeName &amp;#38;&amp;#38; null &amp;#33;&amp;#61; soapMessagePath&amp;#41;&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    outputMessage &amp;#61; mi.Invoke&amp;#40;proxy, new object&amp;#91;&amp;#93; &amp;#123; objInputMessage &amp;#125;&amp;#41;&amp;#59;&lt;br /&gt;                &amp;#125;&lt;br /&gt;                else&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    outputMessage &amp;#61; mi.Invoke&amp;#40;proxy, null&amp;#41;&amp;#59;&lt;br /&gt;                &amp;#125;&lt;br /&gt;&lt;br /&gt;                if &amp;#40;null &amp;#33;&amp;#61; outputMessage&amp;#41;&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    response &amp;#61; GetOutputStream&amp;#40;outputMessage&amp;#41;&amp;#59;&lt;br /&gt;                    context.LogData&amp;#40;&amp;#34;SOAPHTTPRequestResponseStep response data&amp;#34;, response&amp;#41;&amp;#59;&lt;br /&gt;                &amp;#125;&lt;br /&gt;&lt;br /&gt;                &amp;#47;&amp;#47; Execute ctx loader step if present...&lt;br /&gt;                if &amp;#40;null &amp;#33;&amp;#61; response&amp;#41;&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    context.ExecuteContextLoader&amp;#40;response, testConfig.SelectSingleNode&amp;#40;&amp;#34;ContextLoaderStep&amp;#34;&amp;#41;, true&amp;#41;&amp;#59;&lt;br /&gt;                &amp;#125;&lt;br /&gt;&lt;br /&gt;                &amp;#47;&amp;#47; Validate the response...&lt;br /&gt;                try&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    context.ExecuteValidator&amp;#40;response, testConfig.SelectSingleNode&amp;#40;&amp;#34;ValidationStep&amp;#34;&amp;#41;, true&amp;#41;&amp;#59;&lt;br /&gt;                &amp;#125;&lt;br /&gt;                catch &amp;#40;Exception e&amp;#41;&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    throw new ApplicationException&amp;#40;&amp;#34;SOAPHTTPRequestResponseStep response stream was not correct&amp;#33;&amp;#34;, e&amp;#41;&amp;#59;&lt;br /&gt;                &amp;#125;&lt;br /&gt;            &amp;#125;&lt;br /&gt;            catch &amp;#40;Exception ex&amp;#41;&lt;br /&gt;            &amp;#123;&lt;br /&gt;                context.LogError&amp;#40;&amp;#34;SOAPHTTPRequestResponseStep Failed&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                context.LogException&amp;#40;ex&amp;#41;&amp;#59;&lt;br /&gt;                throw&amp;#59;&lt;br /&gt;            &amp;#125;&lt;br /&gt;            finally&lt;br /&gt;            &amp;#123;&lt;br /&gt;                if &amp;#40;null &amp;#33;&amp;#61; response&amp;#41;&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    response.Close&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;                &amp;#125;&lt;br /&gt;&lt;br /&gt;                if &amp;#40;null &amp;#33;&amp;#61; request&amp;#41;&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    request.Close&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;                &amp;#125;&lt;br /&gt;            &amp;#125;&lt;br /&gt;        &amp;#125;&lt;br /&gt;&lt;br /&gt;        internal static Assembly GetProxyAssembly&amp;#40;string wsdlURI, string codeNamespace&amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;            CSharpCodeProvider provider &amp;#61; new CSharpCodeProvider&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;            WebClient client&amp;#59;&lt;br /&gt;            Stream wsdlStream&amp;#59;&lt;br /&gt;            client &amp;#61; new WebClient&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;            string&amp;#91;&amp;#93; referenceAssemblies &amp;#61; new string&amp;#91;&amp;#93; &amp;#123; &amp;#34;system.dll&amp;#34;, &amp;#34;System.Xml.dll&amp;#34;, &amp;#34;System.Web.Services.dll&amp;#34; &amp;#125;&amp;#59;&lt;br /&gt;            wsdlStream &amp;#61; client.OpenRead&amp;#40;wsdlURI&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;            ServiceDescription wsdl &amp;#61; ServiceDescription.Read&amp;#40;wsdlStream&amp;#41;&amp;#59;&lt;br /&gt;            ServiceDescriptionImporter wsdlImport &amp;#61; new ServiceDescriptionImporter&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;            wsdlImport.AddServiceDescription&amp;#40;wsdl, null, null&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;            &amp;#47;&amp;#47; Add any imported files&lt;br /&gt;            foreach &amp;#40;System.Xml.Schema.XmlSchema wsdlSchema in wsdl.Types.Schemas&amp;#41;&lt;br /&gt;            &amp;#123;&lt;br /&gt;                foreach &amp;#40;System.Xml.Schema.XmlSchemaObject externalSchema in wsdlSchema.Includes&amp;#41;&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    if &amp;#40;externalSchema is System.Xml.Schema.XmlSchemaImport&amp;#41;&lt;br /&gt;                    &amp;#123;&lt;br /&gt;                        Uri baseUri &amp;#61; new Uri&amp;#40;wsdlURI&amp;#41;&amp;#59;&lt;br /&gt;                        Uri schemaUri &amp;#61; new Uri&amp;#40;baseUri, &amp;#40;&amp;#40;System.Xml.Schema.XmlSchemaExternal&amp;#41;externalSchema&amp;#41;.SchemaLocation&amp;#41;&amp;#59;&lt;br /&gt;                        wsdlStream &amp;#61; client.OpenRead&amp;#40;schemaUri&amp;#41;&amp;#59;&lt;br /&gt;                        System.Xml.Schema.XmlSchema schema &amp;#61; System.Xml.Schema.XmlSchema.Read&amp;#40;wsdlStream, null&amp;#41;&amp;#59;&lt;br /&gt;                        wsdlImport.Schemas.Add&amp;#40;schema&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#125;&lt;br /&gt;                &amp;#125;&lt;br /&gt;            &amp;#125;&lt;br /&gt;&lt;br /&gt;            CodeNamespace proxyClassNamespace &amp;#61; new CodeNamespace&amp;#40;codeNamespace&amp;#41;&amp;#59;&lt;br /&gt;            CodeCompileUnit codeCompileUnit &amp;#61; new CodeCompileUnit&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;            codeCompileUnit.Namespaces.Add&amp;#40;proxyClassNamespace&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;            ServiceDescriptionImportWarnings warnings &amp;#61; wsdlImport.Import&amp;#40;proxyClassNamespace, codeCompileUnit&amp;#41;&amp;#59;&lt;br /&gt;            if &amp;#40;warnings &amp;#33;&amp;#61; 0&amp;#41;&lt;br /&gt;            &amp;#123;&lt;br /&gt;                throw new ApplicationException&amp;#40;&amp;#34;SOAPHTTPRequestResponseStep experienced problems while importing the WSDL&amp;#33;&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;            &amp;#125;&lt;br /&gt;&lt;br /&gt;            CompilerParameters compileParam &amp;#61; new CompilerParameters&amp;#40;referenceAssemblies&amp;#41;&amp;#59;&lt;br /&gt;            compileParam.GenerateInMemory &amp;#61; false&amp;#59;&lt;br /&gt;&lt;br /&gt;            compileParam.OutputAssembly &amp;#61; GetProxyFileName&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;            CompilerResults compilerResults &amp;#61; provider.CompileAssemblyFromDom&amp;#40;compileParam, codeCompileUnit&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;            if &amp;#40;compilerResults.Errors.HasErrors&amp;#41;&lt;br /&gt;            &amp;#123;&lt;br /&gt;                throw new ApplicationException&amp;#40;&amp;#34;SOAPHTTPRequestResponseStep experienced problems while executing CompileAssemblyFromDom&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;            &amp;#125;&lt;br /&gt;&lt;br /&gt;            provider.Dispose&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;            return compilerResults.CompiledAssembly&amp;#59;&lt;br /&gt;        &amp;#125;&lt;br /&gt;&lt;br /&gt;        &amp;#47;&amp;#47;&amp;#47; &amp;#60;summary&amp;#62;&lt;br /&gt;        &amp;#47;&amp;#47;&amp;#47; Returns a name that can be used for the proxy assembly.&lt;br /&gt;        &amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;summary&amp;#62;&lt;br /&gt;        &amp;#47;&amp;#47;&amp;#47; &amp;#60;returns&amp;#62;&amp;#60;&amp;#47;returns&amp;#62;&lt;br /&gt;        internal static string GetProxyFileName&amp;#40;&amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;            int max &amp;#61; 20&amp;#59;&lt;br /&gt;            string baseName &amp;#61; &amp;#34;TestFrameWorkProxy&amp;#34;&amp;#59;&lt;br /&gt;            string fname &amp;#61; &amp;#34;TestFrameWorkProxy.dll&amp;#34;&amp;#59;&lt;br /&gt;&lt;br /&gt;            for &amp;#40;int i &amp;#61; 0&amp;#59; i &amp;#60;&amp;#61; max&amp;#59; i&amp;#43;&amp;#43;&amp;#41;&lt;br /&gt;            &amp;#123;&lt;br /&gt;                fname &amp;#61; baseName &amp;#43; i &amp;#43; &amp;#34;.dll&amp;#34;&amp;#59;&lt;br /&gt;&lt;br /&gt;                &amp;#47;&amp;#47; try to delete the file if it exists&lt;br /&gt;                try&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    File.Delete&amp;#40;fname&amp;#41;&amp;#59;&lt;br /&gt;                &amp;#125;&lt;br /&gt;                catch&lt;br /&gt;                &amp;#123;&lt;br /&gt;                &amp;#125;&lt;br /&gt;&lt;br /&gt;                if &amp;#40;&amp;#33;File.Exists&amp;#40;fname&amp;#41;&amp;#41;&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    return fname&amp;#59;&lt;br /&gt;                &amp;#125;&lt;br /&gt;            &amp;#125;&lt;br /&gt;&lt;br /&gt;            return fname&amp;#59;&lt;br /&gt;        &amp;#125;&lt;br /&gt;&lt;br /&gt;        internal static MemoryStream GetOutputStream&amp;#40;object outputMessage&amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;            MemoryStream ms &amp;#61; new MemoryStream&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;            XmlSerializer outputSerializer &amp;#61; new XmlSerializer&amp;#40;outputMessage.GetType&amp;#40;&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;            outputSerializer.Serialize&amp;#40;ms, outputMessage&amp;#41;&amp;#59;&lt;br /&gt;            ms.Seek&amp;#40;0, SeekOrigin.Begin&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;            return ms&amp;#59;&lt;br /&gt;        &amp;#125;&lt;br /&gt;&lt;br /&gt;        internal static string GetDefaultNamespace&amp;#40;Assembly assembly, string msgTypeName&amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;            Type t &amp;#61; assembly.GetType&amp;#40;msgTypeName&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;            string ret &amp;#61; &amp;#34;&amp;#34;&amp;#59;&lt;br /&gt;            object&amp;#91;&amp;#93; attributes &amp;#61; t.GetCustomAttributes&amp;#40;false&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;            for &amp;#40;int i &amp;#61; 0&amp;#59; i &amp;#60; attributes.Length&amp;#59; i&amp;#43;&amp;#43;&amp;#41;&lt;br /&gt;            &amp;#123;&lt;br /&gt;                Attribute att &amp;#61; &amp;#40;Attribute&amp;#41;attributes&amp;#91;i&amp;#93;&amp;#59;&lt;br /&gt;&lt;br /&gt;                if &amp;#40;att.ToString&amp;#40;&amp;#41;.Equals&amp;#40;&amp;#34;System.Xml.Serialization.XmlTypeAttribute&amp;#34;&amp;#41;&amp;#41;&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    System.Xml.Serialization.XmlTypeAttribute typeAtt &amp;#61; &amp;#40;System.Xml.Serialization.XmlTypeAttribute&amp;#41;att&amp;#59;&lt;br /&gt;                    ret &amp;#61; typeAtt.Namespace&amp;#59;&lt;br /&gt;                    break&amp;#59;&lt;br /&gt;                &amp;#125;&lt;br /&gt;            &amp;#125;&lt;br /&gt;&lt;br /&gt;            return ret&amp;#59;&lt;br /&gt;        &amp;#125;&lt;br /&gt;&lt;br /&gt;        internal static object LoadMessage&amp;#40;Assembly assembly, string msgTypeName, string messagePath&amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;            XmlReader messageReader &amp;#61; null&amp;#59;&lt;br /&gt;            object objMessage&amp;#59;&lt;br /&gt;&lt;br /&gt;            try&lt;br /&gt;            &amp;#123;&lt;br /&gt;                &amp;#47;&amp;#47; This object requires CreateInstanceFrom...however the proxy object instantiation &lt;br /&gt;                &amp;#47;&amp;#47; does not require CreateInstancefrom&lt;br /&gt;                Activator.CreateInstanceFrom&amp;#40;assembly.Location, msgTypeName&amp;#41;&amp;#59;&lt;br /&gt;                messageReader &amp;#61; new XmlTextReader&amp;#40;messagePath&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;                string defNamespace &amp;#61; GetDefaultNamespace&amp;#40;assembly, msgTypeName&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;                XmlSerializer serializer&amp;#59;&lt;br /&gt;&lt;br /&gt;                if &amp;#40;null &amp;#33;&amp;#61; defNamespace &amp;#38;&amp;#38; defNamespace.Length &amp;#62; 0&amp;#41;&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    serializer &amp;#61; new XmlSerializer&amp;#40;assembly.GetType&amp;#40;msgTypeName&amp;#41;, defNamespace&amp;#41;&amp;#59;&lt;br /&gt;                &amp;#125;&lt;br /&gt;                else&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    serializer &amp;#61; new XmlSerializer&amp;#40;assembly.GetType&amp;#40;msgTypeName&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;                &amp;#125;&lt;br /&gt;&lt;br /&gt;                objMessage &amp;#61; serializer.Deserialize&amp;#40;messageReader&amp;#41;&amp;#59;&lt;br /&gt;            &amp;#125;&lt;br /&gt;            finally&lt;br /&gt;            &amp;#123;&lt;br /&gt;                if &amp;#40;messageReader &amp;#33;&amp;#61; null&amp;#41;&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    messageReader.Close&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;                &amp;#125;&lt;br /&gt;            &amp;#125;&lt;br /&gt;&lt;br /&gt;            return objMessage&amp;#59;&lt;br /&gt;        &amp;#125;&lt;br /&gt;    &amp;#125;&lt;br /&gt;&amp;#125;&lt;br /&gt;</description><author>BVeldhoen</author><pubDate>Thu, 07 Aug 2008 15:46:36 GMT</pubDate><guid isPermaLink="false">Created Issue: Improved SOAPHTTPRequestResponse 20080807034636P</guid></item><item><title>Commented Issue: Improved XmlValidationStepEx</title><link>http://www.codeplex.com/bizunit/WorkItem/View.aspx?WorkItemId=7153</link><description>- Removed use of deprecated XmlValidatingReader.&lt;br /&gt;- Added support for multiple schemas&lt;br /&gt;&lt;br /&gt;&amp;#47;&amp;#47;---------------------------------------------------------------------&lt;br /&gt;&amp;#47;&amp;#47; File&amp;#58; XmlValidationStepEx.cs&lt;br /&gt;&amp;#47;&amp;#47; &lt;br /&gt;&amp;#47;&amp;#47; Summary&amp;#58; &lt;br /&gt;&amp;#47;&amp;#47;&lt;br /&gt;&amp;#47;&amp;#47;---------------------------------------------------------------------&lt;br /&gt;&amp;#47;&amp;#47; Copyright &amp;#40;c&amp;#41; 2004-2008, Kevin B. Smith. All rights reserved.&lt;br /&gt;&amp;#47;&amp;#47;&lt;br /&gt;&amp;#47;&amp;#47; THIS CODE AND INFORMATION ARE PROVIDED &amp;#34;AS IS&amp;#34; WITHOUT WARRANTY OF ANY&lt;br /&gt;&amp;#47;&amp;#47; KIND, WHETHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE&lt;br /&gt;&amp;#47;&amp;#47; IMPLIED WARRANTIES OF MERCHANTABILITY AND&amp;#47;OR FITNESS FOR A PARTICULAR&lt;br /&gt;&amp;#47;&amp;#47; PURPOSE.&lt;br /&gt;&amp;#47;&amp;#47;---------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;namespace BizUnit&lt;br /&gt;&amp;#123;&lt;br /&gt;&amp;#9;using System&amp;#59;&lt;br /&gt;&amp;#9;using System.IO&amp;#59;&lt;br /&gt;&amp;#9;using System.Xml&amp;#59;&lt;br /&gt;&amp;#9;using System.Xml.Schema&amp;#59;&lt;br /&gt;&amp;#9;using System.Xml.XPath&amp;#59;&lt;br /&gt;&amp;#9;using System.Collections.Generic&amp;#59;&lt;br /&gt;&amp;#9;using System.Web.UI&amp;#59;&lt;br /&gt;&amp;#9;using BizUnitOM&amp;#59;&lt;br /&gt;using System.Text&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47; &amp;#60;summary&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47; The XmlValidationStepEx validates an Xml document, it may validate against a given schema, and also evaluate XPath queries.&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47; The Xpath query is extended from XmlValidationStep to allow Xpath functions to be used which may not return a node set.&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;summary&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47; &lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47; &amp;#60;remarks&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47; The following shows an example of the Xml representation of this test step.&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47; &lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47; &amp;#60;code escaped&amp;#61;&amp;#34;true&amp;#34;&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#60;ValidationStep assemblyPath&amp;#61;&amp;#34;&amp;#34; typeName&amp;#61;&amp;#34;BizUnit.XmlValidationStepEx&amp;#34;&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;XmlSchemaList&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;XmlSchema path&amp;#61;&amp;#34;.&amp;#92;TestData&amp;#92;PurchaseOrder.xsd&amp;#34; namespace&amp;#61;&amp;#34;urn&amp;#58;bookstore-schema&amp;#34; &amp;#47;&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;&amp;#47;XmlSchemaList&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;XPathList&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;XPathValidation query&amp;#61;&amp;#34;&amp;#47;&amp;#42;&amp;#91;local-name&amp;#40;&amp;#41;&amp;#61;&amp;#39;PurchaseOrder&amp;#39; and namespace-uri&amp;#40;&amp;#41;&amp;#61;&amp;#39;http&amp;#58;&amp;#47;&amp;#47;SendMail.PurchaseOrder&amp;#39;&amp;#93;&amp;#47;&amp;#42;&amp;#91;local-name&amp;#40;&amp;#41;&amp;#61;&amp;#39;PONumber&amp;#39; and namespace-uri&amp;#40;&amp;#41;&amp;#61;&amp;#39;&amp;#39;&amp;#93;&amp;#34;&amp;#62;PONumber_0&amp;#60;&amp;#47;XPathValidation&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;&amp;#47;XPathList&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#60;&amp;#47;ValidationStep&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#60;&amp;#47;code&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#60;list type&amp;#61;&amp;#34;table&amp;#34;&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;listheader&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;term&amp;#62;Tag&amp;#60;&amp;#47;term&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;description&amp;#62;Description&amp;#60;&amp;#47;description&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;&amp;#47;listheader&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;item&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;term&amp;#62;XmlSchemaPath&amp;#60;&amp;#47;term&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;description&amp;#62;The XSD schema to use to validate the XML data &amp;#40;optional&amp;#41;&amp;#60;&amp;#47;description&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;&amp;#47;item&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;item&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;term&amp;#62;XmlSchemaNameSpace&amp;#60;&amp;#47;term&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;description&amp;#62;The XSD schema namespace to validate the XML data against &amp;#40;optional&amp;#41;&amp;#60;&amp;#47;description&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;&amp;#47;item&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;item&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;term&amp;#62;XPathList&amp;#47;XPathValidation&amp;#60;&amp;#47;term&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#9;&amp;#60;description&amp;#62;XPath expression to evaluate against the XML document &amp;#40;optional&amp;#41;&amp;#40;repeating&amp;#41;.&amp;#60;&amp;#47;description&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#9;&amp;#60;&amp;#47;item&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#60;&amp;#47;list&amp;#62;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;&amp;#47;&amp;#9;&amp;#60;&amp;#47;remarks&amp;#62;&amp;#9;&lt;br /&gt;&amp;#9;public class XmlValidationStepEx &amp;#58; IValidationStepOM&lt;br /&gt;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;private IList&amp;#60;Pair&amp;#62; _xmlSchemas &amp;#61; new System.Collections.Generic.List&amp;#60;Pair&amp;#62;&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;public IList&amp;#60;Pair&amp;#62; XmlSchemas&lt;br /&gt;&amp;#9;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;get &amp;#123; return _xmlSchemas&amp;#59; &amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;private set &amp;#123; _xmlSchemas &amp;#61; value&amp;#59; &amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;private IList&amp;#60;Pair&amp;#62; xPathValidations &amp;#61; new System.Collections.Generic.List&amp;#60;Pair&amp;#62;&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;public IList&amp;#60;Pair&amp;#62; XPathValidations&lt;br /&gt;&amp;#9;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;get &amp;#123; return this.xPathValidations&amp;#59; &amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;private set &amp;#123; this.xPathValidations &amp;#61; value&amp;#59; &amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;private List&amp;#60;string&amp;#62; _errors &amp;#61; new List&amp;#60;string&amp;#62;&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;public List&amp;#60;string&amp;#62; Errors&lt;br /&gt;&amp;#9;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;get &amp;#123; return _errors&amp;#59; &amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;set &amp;#123; _errors &amp;#61; value&amp;#59; &amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;private List&amp;#60;string&amp;#62; _warnings &amp;#61; new List&amp;#60;string&amp;#62;&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;public List&amp;#60;string&amp;#62; Warnings&lt;br /&gt;&amp;#9;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;get &amp;#123; return _warnings&amp;#59; &amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;set &amp;#123; _warnings &amp;#61; value&amp;#59; &amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#47;&amp;#47;&amp;#47; &amp;#60;summary&amp;#62;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#47;&amp;#47;&amp;#47; ITestStep.Execute&amp;#40;&amp;#41; implementation&lt;br /&gt;&amp;#9;&amp;#9;&amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;summary&amp;#62;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#47;&amp;#47;&amp;#47; &amp;#60;param name&amp;#61;&amp;#39;data&amp;#39;&amp;#62;The stream cintaining the data to be validated.&amp;#60;&amp;#47;param&amp;#62;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#47;&amp;#47;&amp;#47; &amp;#60;param name&amp;#61;&amp;#39;validatorConfig&amp;#39;&amp;#62;The Xml fragment containing the configuration for the test step&amp;#60;&amp;#47;param&amp;#62;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#47;&amp;#47;&amp;#47; &amp;#60;param name&amp;#61;&amp;#39;context&amp;#39;&amp;#62;The context for the test, this holds state that is passed beteen tests&amp;#60;&amp;#47;param&amp;#62;&lt;br /&gt;&amp;#9;&amp;#9;public void ExecuteValidation&amp;#40;Stream data, XmlNode validatorConfig, Context context&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;XmlNodeList xmlSchemaList &amp;#61; validatorConfig.SelectNodes&amp;#40;&amp;#34;XmlSchemaList&amp;#47;&amp;#42;&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;foreach &amp;#40;XmlNode xmlSchema in xmlSchemaList&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;string schemaPath &amp;#61; context.ReadConfigAsString&amp;#40;xmlSchema, &amp;#34;&amp;#64;path&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;string schemaNamespace &amp;#61; context.ReadConfigAsString&amp;#40;xmlSchema, &amp;#34;&amp;#64;namespace&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;this.XmlSchemas.Add&amp;#40;new Pair&amp;#40;schemaNamespace, schemaPath&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;XmlNodeList xPathList &amp;#61; validatorConfig.SelectNodes&amp;#40;&amp;#34;XPathList&amp;#47;&amp;#42;&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;foreach &amp;#40;XmlNode xpath in xPathList&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;string xpathExp &amp;#61; xpath.SelectSingleNode&amp;#40;&amp;#34;&amp;#64;query&amp;#34;&amp;#41;.Value&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;string expectedValue &amp;#61; context.ReadConfigAsString&amp;#40;xpath, &amp;#34;.&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;this.xPathValidations.Add&amp;#40;new Pair&amp;#40;xpathExp, expectedValue&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;ExecuteValidation&amp;#40;data, context&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#47;&amp;#47;&amp;#47; &amp;#60;summary&amp;#62;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#47;&amp;#47;&amp;#47; ITestStep.Execute&amp;#40;&amp;#41; implementation&lt;br /&gt;&amp;#9;&amp;#9;&amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;summary&amp;#62;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#47;&amp;#47;&amp;#47; &amp;#60;param name&amp;#61;&amp;#39;data&amp;#39;&amp;#62;The stream cintaining the data to be validated.&amp;#60;&amp;#47;param&amp;#62;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#47;&amp;#47;&amp;#47; &amp;#60;param name&amp;#61;&amp;#39;context&amp;#39;&amp;#62;The context for the test, this holds state that is passed beteen tests&amp;#60;&amp;#47;param&amp;#62;&lt;br /&gt;&amp;#9;&amp;#9;public void ExecuteValidation&amp;#40;Stream data, Context context&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;XmlReaderSettings readerSettings &amp;#61; new XmlReaderSettings&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;foreach &amp;#40;Pair schema in this.XmlSchemas&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;readerSettings.Schemas.Add&amp;#40;&amp;#40;string&amp;#41;schema.First, &amp;#40;string&amp;#41;schema.Second&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;readerSettings.ValidationFlags &amp;#124;&amp;#61; XmlSchemaValidationFlags.ReportValidationWarnings&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;readerSettings.ValidationEventHandler &amp;#43;&amp;#61; new ValidationEventHandler&amp;#40;this.ValidationHandler&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;readerSettings.CheckCharacters &amp;#61; true&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;this.Errors.Clear&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;this.Warnings.Clear&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;data.Seek&amp;#40;0, SeekOrigin.Begin&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;XmlReader reader &amp;#61; XmlReader.Create&amp;#40;data, readerSettings&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;while &amp;#40;reader.Read&amp;#40;&amp;#41;&amp;#41; &amp;#123; &amp;#125;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;if &amp;#40;this.Warnings.Count &amp;#62; 0&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;context.LogInfo&amp;#40;&amp;#34;Xml Validation warnings&amp;#58;&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;foreach &amp;#40;string warning in this.Warnings&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;context.LogInfo&amp;#40;warning&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;if &amp;#40;this.Errors.Count &amp;#62; 0&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;StringBuilder errorBuilder &amp;#61; new StringBuilder&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;errorBuilder.AppendLine&amp;#40;&amp;#34;Xml Validation errors&amp;#58;&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;foreach &amp;#40;string error in this.Errors&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;errorBuilder.AppendLine&amp;#40;error&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;throw new ApplicationException&amp;#40;errorBuilder.ToString&amp;#40;&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;data.Seek&amp;#40;0, SeekOrigin.Begin&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;XmlDocument doc &amp;#61; new XmlDocument&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;doc.Load&amp;#40;data&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;foreach &amp;#40;Pair validation in this.xPathValidations&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;string xpathExp &amp;#61; &amp;#40;string&amp;#41;validation.First&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;string expectedValue &amp;#61; &amp;#40;string&amp;#41;validation.Second&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;context.LogInfo&amp;#40;&amp;#34;XmlValidationStepEx evaluating XPath &amp;#123;0&amp;#125; equals &amp;#92;&amp;#34;&amp;#123;1&amp;#125;&amp;#92;&amp;#34;&amp;#34;, xpathExp, expectedValue&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;XPathNavigator xpn &amp;#61; doc.CreateNavigator&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;object result &amp;#61; xpn.Evaluate&amp;#40;xpathExp&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;string checkValue &amp;#61; null&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;if &amp;#40;result.GetType&amp;#40;&amp;#41;.Name &amp;#61;&amp;#61; &amp;#34;XPathSelectionIterator&amp;#34;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;XPathNodeIterator xpi &amp;#61; result as XPathNodeIterator&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;xpi.MoveNext&amp;#40;&amp;#41;&amp;#59; &amp;#47;&amp;#47; BUGBUG&amp;#33;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;if &amp;#40;null &amp;#33;&amp;#61; xpi&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;checkValue &amp;#61; xpi.Current.ToString&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;else&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;checkValue &amp;#61; result.ToString&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;if &amp;#40;0 &amp;#33;&amp;#61; expectedValue.CompareTo&amp;#40;checkValue&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;throw new ApplicationException&amp;#40;string.Format&amp;#40;&amp;#34;XmlValidationStepEx failed, compare &amp;#123;0&amp;#125; &amp;#33;&amp;#61; &amp;#123;1&amp;#125;, xpath query used&amp;#58; &amp;#123;2&amp;#125;&amp;#34;, expectedValue, checkValue, xpathExp&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;private void ValidationHandler&amp;#40;object sender, ValidationEventArgs args&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;switch &amp;#40;args.Severity&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;case XmlSeverityType.Warning&amp;#58;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;this.Warnings.Add&amp;#40;args.Message&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;break&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;case XmlSeverityType.Error&amp;#58;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;this.Errors.Add&amp;#40;args.Message&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;break&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;default&amp;#58;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;&amp;#9;break&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;public void Validate&amp;#40;Context context&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#47;&amp;#47; xPathValidations - optional&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;if &amp;#40;null &amp;#61;&amp;#61; this.XmlSchemas &amp;#124;&amp;#124; 0 &amp;#61;&amp;#61; this.XmlSchemas.Count&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;throw new ArgumentNullException&amp;#40;&amp;#34;XmlSchemas is either null or of zero length&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;foreach &amp;#40;Pair schema in this.XmlSchemas&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;schema.First &amp;#61; context.SubstituteWildCards&amp;#40;&amp;#40;string&amp;#41;schema.First&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;schema.Second &amp;#61; context.SubstituteWildCards&amp;#40;&amp;#40;string&amp;#41;schema.Second&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#125;&lt;br /&gt;Comments: ** Comment from web user: scox_nz ** &lt;p&gt;The following code will support validating the XML against the schema and logging the error if it doesn&amp;#39;t comply&lt;/p&gt;&lt;p&gt;&amp;#47;&amp;#47;---------------------------------------------------------------------&lt;br /&gt;&amp;#47;&amp;#47; File&amp;#58; XmlValidationStepEx.cs&lt;br /&gt;&amp;#47;&amp;#47; &lt;br /&gt;&amp;#47;&amp;#47; Summary&amp;#58; &lt;br /&gt;&amp;#47;&amp;#47;&lt;br /&gt;&amp;#47;&amp;#47;---------------------------------------------------------------------&lt;br /&gt;&amp;#47;&amp;#47; Copyright &amp;#40;c&amp;#41; 2004-2008, Kevin B. Smith. All rights reserved.&lt;br /&gt;&amp;#47;&amp;#47;&lt;br /&gt;&amp;#47;&amp;#47; THIS CODE AND INFORMATION ARE PROVIDED &amp;#34;AS IS&amp;#34; WITHOUT WARRANTY OF ANY&lt;br /&gt;&amp;#47;&amp;#47; KIND, WHETHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE&lt;br /&gt;&amp;#47;&amp;#47; IMPLIED WARRANTIES OF MERCHANTABILITY AND&amp;#47;OR FITNESS FOR A PARTICULAR&lt;br /&gt;&amp;#47;&amp;#47; PURPOSE.&lt;br /&gt;&amp;#47;&amp;#47;---------------------------------------------------------------------&lt;/p&gt;&lt;p&gt;namespace BizUnit&lt;br /&gt;&amp;#123;&lt;br /&gt;    using System&amp;#59;&lt;br /&gt;    using System.IO&amp;#59;&lt;br /&gt;    using System.Xml&amp;#59;&lt;br /&gt;    using System.Xml.Schema&amp;#59;&lt;br /&gt;    using System.Xml.XPath&amp;#59;&lt;br /&gt;    using System.Collections.Generic&amp;#59;&lt;br /&gt;    using System.Web.UI&amp;#59;&lt;br /&gt;    using BizUnitOM&amp;#59;&lt;br /&gt;    using System.Text&amp;#59;&lt;/p&gt;&lt;p&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;summary&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; The XmlValidationStepEx validates an Xml document, it may validate against a given schema, and also evaluate XPath queries.&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; The Xpath query is extended from XmlValidationStep to allow Xpath functions to be used which may not return a node set.&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;summary&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;             &amp;#60;remarks&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;               The following shows an example of the Xml representation of this test step.&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;               &amp;#60;code escaped&amp;#61;&amp;#34;true&amp;#34;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                 &amp;#60;ValidationStep assemblyPath&amp;#61;&amp;#34;&amp;#34; typeName&amp;#61;&amp;#34;BizUnit.XmlValidationStepEx, BizUnit&amp;#34;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                   &amp;#60;XmlSchemaList&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                     &amp;#60;XmlSchema path&amp;#61;&amp;#34;.&amp;#92;TestData&amp;#92;PurchaseOrder.xsd&amp;#34; namespace&amp;#61;&amp;#34;urn&amp;#58;bookstore-schema&amp;#34; &amp;#47;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                   &amp;#60;&amp;#47;XmlSchemaList&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                   &amp;#60;XPathList&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                     &amp;#60;XPathValidation query&amp;#61;&amp;#34;&amp;#47;&amp;#42;&amp;#91;local-name&amp;#40;&amp;#41;&amp;#61;&amp;#39;PurchaseOrder&amp;#39; and namespace-uri&amp;#40;&amp;#41;&amp;#61;&amp;#39;http&amp;#58;&amp;#47;&amp;#47;SendMail.PurchaseOrder&amp;#39;&amp;#93;&amp;#47;&amp;#42;&amp;#91;local-name&amp;#40;&amp;#41;&amp;#61;&amp;#39;PONumber&amp;#39; and namespace-uri&amp;#40;&amp;#41;&amp;#61;&amp;#39;&amp;#39;&amp;#93;&amp;#34;&amp;#62;PONumber_0&amp;#60;&amp;#47;XPathValidation&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                   &amp;#60;&amp;#47;XPathList&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                 &amp;#60;&amp;#47;ValidationStep&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;               &amp;#60;&amp;#47;code&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47; &lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;               &amp;#60;list type&amp;#61;&amp;#34;table&amp;#34;&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                 &amp;#60;listheader&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                   &amp;#60;term&amp;#62;Tag&amp;#60;&amp;#47;term&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                   &amp;#60;description&amp;#62;Description&amp;#60;&amp;#47;description&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                 &amp;#60;&amp;#47;listheader&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                 &amp;#60;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                   &amp;#60;term&amp;#62;XmlSchemaList&amp;#47;XmlSchema&amp;#60;&amp;#47;term&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                   &amp;#60;description&amp;#62;The XSD schema to use to validate the XML data &amp;#40;optional&amp;#41;&amp;#40;repeating&amp;#41;.&amp;#60;&amp;#47;description&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                 &amp;#60;&amp;#47;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                 &amp;#60;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                   &amp;#60;term&amp;#62;XmlSchemaList&amp;#47;XmlSchema&amp;#47;&amp;#64;path&amp;#60;&amp;#47;term&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                   &amp;#60;description&amp;#62;The path to an XSD schema to use to validate the XML data &amp;#40;optional&amp;#41;&amp;#40;repeating&amp;#41;.&amp;#60;&amp;#47;description&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                 &amp;#60;&amp;#47;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                 &amp;#60;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                   &amp;#60;term&amp;#62;XmlSchemaList&amp;#47;XmlSchema&amp;#47;&amp;#64;namespace&amp;#60;&amp;#47;term&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                   &amp;#60;description&amp;#62;The XSD schema namespace to use to validate the XML data &amp;#40;optional&amp;#41;&amp;#40;repeating&amp;#41;.&amp;#60;&amp;#47;description&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                 &amp;#60;&amp;#47;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                 &amp;#60;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                   &amp;#60;term&amp;#62;XPathList&amp;#47;XPathValidation&amp;#60;&amp;#47;term&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                   &amp;#60;description&amp;#62;XPath expression to evaluate against the XML document &amp;#40;optional&amp;#41;&amp;#40;repeating&amp;#41;.&amp;#60;&amp;#47;description&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                 &amp;#60;&amp;#47;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                 &amp;#60;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                   &amp;#60;term&amp;#62;XPathList&amp;#47;XPathValidation&amp;#47;&amp;#64;query&amp;#60;&amp;#47;term&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                   &amp;#60;description&amp;#62;XPath expression to evaluate against the XML document &amp;#40;optional&amp;#41;&amp;#40;repeating&amp;#41;.&amp;#60;&amp;#47;description&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;                 &amp;#60;&amp;#47;item&amp;#62;&lt;br /&gt;    &amp;#47;&amp;#47;&amp;#47;               &amp;#60;&amp;#47;list&amp;#62;&lt;br /&gt;     &amp;#47;&amp;#47;&amp;#47;            &amp;#60;&amp;#47;remarks&amp;#62;&amp;#9;&lt;br /&gt;    public class XmlValidationStepEx &amp;#58; IValidationStepOM&lt;br /&gt;    &amp;#123;&lt;br /&gt;        private IList&amp;#60;Pair&amp;#62; _xmlSchemas &amp;#61; new System.Collections.Generic.List&amp;#60;Pair&amp;#62;&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;        public IList&amp;#60;Pair&amp;#62; XmlSchemas&lt;br /&gt;        &amp;#123;&lt;br /&gt;            get &amp;#123; return _xmlSchemas&amp;#59; &amp;#125;&lt;br /&gt;            private set &amp;#123; _xmlSchemas &amp;#61; value&amp;#59; &amp;#125;&lt;br /&gt;        &amp;#125;&lt;/p&gt;&lt;p&gt;        private IList&amp;#60;Pair&amp;#62; xPathValidations &amp;#61; new System.Collections.Generic.List&amp;#60;Pair&amp;#62;&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;        public IList&amp;#60;Pair&amp;#62; XPathValidations&lt;br /&gt;        &amp;#123;&lt;br /&gt;            get &amp;#123; return this.xPathValidations&amp;#59; &amp;#125;&lt;br /&gt;            private set &amp;#123; this.xPathValidations &amp;#61; value&amp;#59; &amp;#125;&lt;br /&gt;        &amp;#125;&lt;/p&gt;&lt;p&gt;        private List&amp;#60;string&amp;#62; _errors &amp;#61; new List&amp;#60;string&amp;#62;&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;        public List&amp;#60;string&amp;#62; Errors&lt;br /&gt;        &amp;#123;&lt;br /&gt;            get &amp;#123; return _errors&amp;#59; &amp;#125;&lt;br /&gt;            set &amp;#123; _errors &amp;#61; value&amp;#59; &amp;#125;&lt;br /&gt;        &amp;#125;&lt;/p&gt;&lt;p&gt;        private List&amp;#60;string&amp;#62; _warnings &amp;#61; new List&amp;#60;string&amp;#62;&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;        public List&amp;#60;string&amp;#62; Warnings&lt;br /&gt;        &amp;#123;&lt;br /&gt;            get &amp;#123; return _warnings&amp;#59; &amp;#125;&lt;br /&gt;            set &amp;#123; _warnings &amp;#61; value&amp;#59; &amp;#125;&lt;br /&gt;        &amp;#125;&lt;/p&gt;&lt;p&gt;        &amp;#47;&amp;#47;&amp;#47; &amp;#60;summary&amp;#62;&lt;br /&gt;        &amp;#47;&amp;#47;&amp;#47; ITestStep.Execute&amp;#40;&amp;#41; implementation&lt;br /&gt;        &amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;summary&amp;#62;&lt;br /&gt;        &amp;#47;&amp;#47;&amp;#47; &amp;#60;param name&amp;#61;&amp;#39;data&amp;#39;&amp;#62;The stream cintaining the data to be validated.&amp;#60;&amp;#47;param&amp;#62;&lt;br /&gt;        &amp;#47;&amp;#47;&amp;#47; &amp;#60;param name&amp;#61;&amp;#39;validatorConfig&amp;#39;&amp;#62;The Xml fragment containing the configuration for the test step&amp;#60;&amp;#47;param&amp;#62;&lt;br /&gt;        &amp;#47;&amp;#47;&amp;#47; &amp;#60;param name&amp;#61;&amp;#39;context&amp;#39;&amp;#62;The context for the test, this holds state that is passed beteen tests&amp;#60;&amp;#47;param&amp;#62;&lt;br /&gt;        public void ExecuteValidation&amp;#40;Stream data, XmlNode validatorConfig, Context context&amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;            XmlNodeList xmlSchemaList &amp;#61; validatorConfig.SelectNodes&amp;#40;&amp;#34;XmlSchemaList&amp;#47;&amp;#42;&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;            foreach &amp;#40;XmlNode xmlSchema in xmlSchemaList&amp;#41;&lt;br /&gt;            &amp;#123;&lt;br /&gt;                string schemaPath &amp;#61; context.ReadConfigAsString&amp;#40;xmlSchema, &amp;#34;&amp;#64;path&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                string schemaNamespace &amp;#61; context.ReadConfigAsString&amp;#40;xmlSchema, &amp;#34;&amp;#64;namespace&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                this.XmlSchemas.Add&amp;#40;new Pair&amp;#40;schemaNamespace, schemaPath&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;            &amp;#125;&lt;/p&gt;&lt;p&gt;            XmlNodeList xPathList &amp;#61; validatorConfig.SelectNodes&amp;#40;&amp;#34;XPathList&amp;#47;&amp;#42;&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;            foreach &amp;#40;XmlNode xpath in xPathList&amp;#41;&lt;br /&gt;            &amp;#123;&lt;br /&gt;                string xpathExp &amp;#61; xpath.SelectSingleNode&amp;#40;&amp;#34;&amp;#64;query&amp;#34;&amp;#41;.Value&amp;#59;&lt;br /&gt;                string expectedValue &amp;#61; context.ReadConfigAsString&amp;#40;xpath, &amp;#34;.&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                this.xPathValidations.Add&amp;#40;new Pair&amp;#40;xpathExp, expectedValue&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;            &amp;#125;&lt;/p&gt;&lt;p&gt;            ExecuteValidation&amp;#40;data, context&amp;#41;&amp;#59;&lt;br /&gt;        &amp;#125;&lt;/p&gt;&lt;p&gt;        &amp;#47;&amp;#47;&amp;#47; &amp;#60;summary&amp;#62;&lt;br /&gt;        &amp;#47;&amp;#47;&amp;#47; ITestStep.Execute&amp;#40;&amp;#41; implementation&lt;br /&gt;        &amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;summary&amp;#62;&lt;br /&gt;        &amp;#47;&amp;#47;&amp;#47; &amp;#60;param name&amp;#61;&amp;#39;data&amp;#39;&amp;#62;The stream cintaining the data to be validated.&amp;#60;&amp;#47;param&amp;#62;&lt;br /&gt;        &amp;#47;&amp;#47;&amp;#47; &amp;#60;param name&amp;#61;&amp;#39;context&amp;#39;&amp;#62;The context for the test, this holds state that is passed beteen tests&amp;#60;&amp;#47;param&amp;#62;&lt;br /&gt;        public void ExecuteValidation&amp;#40;Stream data, Context context&amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;            XmlReaderSettings readerSettings &amp;#61; new XmlReaderSettings&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;            foreach &amp;#40;Pair schema in this.XmlSchemas&amp;#41;&lt;br /&gt;            &amp;#123;&lt;br /&gt;                readerSettings.Schemas.Add&amp;#40;&amp;#40;string&amp;#41;schema.First, &amp;#40;string&amp;#41;schema.Second&amp;#41;&amp;#59;&lt;br /&gt;                readerSettings.ValidationFlags &amp;#124;&amp;#61; XmlSchemaValidationFlags.ReportValidationWarnings&amp;#59;&lt;br /&gt;                readerSettings.ValidationEventHandler &amp;#43;&amp;#61; new ValidationEventHandler&amp;#40;this.ValidationHandler&amp;#41;&amp;#59;&lt;br /&gt;                readerSettings.CheckCharacters &amp;#61; true&amp;#59;&lt;br /&gt;                readerSettings.ValidationType &amp;#61; ValidationType.Schema&amp;#59;&lt;br /&gt;            &amp;#125;&lt;/p&gt;&lt;p&gt;            this.Errors.Clear&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;            this.Warnings.Clear&amp;#40;&amp;#41;&amp;#59;&lt;/p&gt;&lt;p&gt;            data.Seek&amp;#40;0, SeekOrigin.Begin&amp;#41;&amp;#59;&lt;br /&gt;            XmlReader reader &amp;#61; XmlReader.Create&amp;#40;data, readerSettings&amp;#41;&amp;#59;&lt;br /&gt;            &lt;br /&gt;            try &amp;#123;&lt;br /&gt;                while &amp;#40;reader.Read&amp;#40;&amp;#41;&amp;#41; &amp;#123; &amp;#125;&lt;br /&gt;            &amp;#125;&lt;br /&gt;            catch &amp;#40;XmlSchemaValidationException ex&amp;#41;&lt;br /&gt;            &amp;#123;&lt;br /&gt;                context.LogError&amp;#40;ex.Message&amp;#41;&amp;#59;&lt;br /&gt;            &amp;#125;&lt;/p&gt;&lt;p&gt;            if &amp;#40;this.Warnings.Count &amp;#62; 0&amp;#41;&lt;br /&gt;            &amp;#123;&lt;br /&gt;                context.LogInfo&amp;#40;&amp;#34;Xml Validation warnings&amp;#58;&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                foreach &amp;#40;string warning in this.Warnings&amp;#41;&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    context.LogInfo&amp;#40;warning&amp;#41;&amp;#59;&lt;br /&gt;                &amp;#125;&lt;br /&gt;            &amp;#125;&lt;/p&gt;&lt;p&gt;            if &amp;#40;this.Errors.Count &amp;#62; 0&amp;#41;&lt;br /&gt;            &amp;#123;&lt;br /&gt;                StringBuilder errorBuilder &amp;#61; new StringBuilder&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;                errorBuilder.AppendLine&amp;#40;&amp;#34;Xml Validation errors&amp;#58;&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                foreach &amp;#40;string error in this.Errors&amp;#41;&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    errorBuilder.AppendLine&amp;#40;error&amp;#41;&amp;#59;&lt;br /&gt;                &amp;#125;&lt;br /&gt;                throw new ApplicationException&amp;#40;errorBuilder.ToString&amp;#40;&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;            &amp;#125;&lt;/p&gt;&lt;p&gt;            data.Seek&amp;#40;0, SeekOrigin.Begin&amp;#41;&amp;#59;&lt;br /&gt;            XmlDocument doc &amp;#61; new XmlDocument&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;            doc.Load&amp;#40;data&amp;#41;&amp;#59;&lt;/p&gt;&lt;p&gt;            foreach &amp;#40;Pair validation in this.xPathValidations&amp;#41;&lt;br /&gt;            &amp;#123;&lt;br /&gt;                string xpathExp &amp;#61; &amp;#40;string&amp;#41;validation.First&amp;#59;&lt;br /&gt;                string expectedValue &amp;#61; &amp;#40;string&amp;#41;validation.Second&amp;#59;&lt;/p&gt;&lt;p&gt;                context.LogInfo&amp;#40;&amp;#34;XmlValidationStepEx evaluating XPath &amp;#123;0&amp;#125; equals &amp;#92;&amp;#34;&amp;#123;1&amp;#125;&amp;#92;&amp;#34;&amp;#34;, xpathExp, expectedValue&amp;#41;&amp;#59;&lt;/p&gt;&lt;p&gt;                XPathNavigator xpn &amp;#61; doc.CreateNavigator&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;                object result &amp;#61; xpn.Evaluate&amp;#40;xpathExp&amp;#41;&amp;#59;&lt;/p&gt;&lt;p&gt;                string checkValue &amp;#61; null&amp;#59;&lt;br /&gt;                if &amp;#40;result.GetType&amp;#40;&amp;#41;.Name &amp;#61;&amp;#61; &amp;#34;XPathSelectionIterator&amp;#34;&amp;#41;&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    XPathNodeIterator xpi &amp;#61; result as XPathNodeIterator&amp;#59;&lt;br /&gt;                    xpi.MoveNext&amp;#40;&amp;#41;&amp;#59; &amp;#47;&amp;#47; BUGBUG&amp;#33;&lt;br /&gt;                    if &amp;#40;null &amp;#33;&amp;#61; xpi&amp;#41;&lt;br /&gt;                    &amp;#123;&lt;br /&gt;                        checkValue &amp;#61; xpi.Current.ToString&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#125;&lt;br /&gt;                &amp;#125;&lt;br /&gt;                else&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    checkValue &amp;#61; result.ToString&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;                &amp;#125;&lt;/p&gt;&lt;p&gt;                if &amp;#40;0 &amp;#33;&amp;#61; expectedValue.CompareTo&amp;#40;checkValue&amp;#41;&amp;#41;&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    throw new ApplicationException&amp;#40;string.Format&amp;#40;&amp;#34;XmlValidationStepEx failed, compare &amp;#123;0&amp;#125; &amp;#33;&amp;#61; &amp;#123;1&amp;#125;, xpath query used&amp;#58; &amp;#123;2&amp;#125;&amp;#34;, expectedValue, checkValue, xpathExp&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;                &amp;#125;&lt;br /&gt;            &amp;#125;&lt;br /&gt;        &amp;#125;&lt;/p&gt;&lt;p&gt;        &amp;#47;&amp;#47; Display any validation errors.&lt;br /&gt;        private static void ValidationCallBack&amp;#40;object sender, ValidationEventArgs e&amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;            XmlValidationStepEx validator &amp;#61; &amp;#40;XmlValidationStepEx&amp;#41;sender&amp;#59;&lt;br /&gt;            &amp;#47;&amp;#47;context.LogInfo&amp;#40;&amp;#34;Validation Error&amp;#58; &amp;#123;0&amp;#125;&amp;#34;, e.Message&amp;#41;&amp;#59;&lt;br /&gt;        &amp;#125;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;        private void ValidationHandler&amp;#40;object sender, ValidationEventArgs args&amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;            switch &amp;#40;args.Severity&amp;#41;&lt;br /&gt;            &amp;#123;&lt;br /&gt;                case XmlSeverityType.Warning&amp;#58;&lt;br /&gt;                    this.Warnings.Add&amp;#40;args.Message&amp;#41;&amp;#59;&lt;br /&gt;                    break&amp;#59;&lt;br /&gt;                case XmlSeverityType.Error&amp;#58;&lt;br /&gt;                    this.Errors.Add&amp;#40;args.Message&amp;#41;&amp;#59;&lt;br /&gt;                    break&amp;#59;&lt;br /&gt;                default&amp;#58;&lt;br /&gt;                    break&amp;#59;&lt;br /&gt;            &amp;#125;&lt;br /&gt;        &amp;#125;&lt;/p&gt;&lt;p&gt;        public void Validate&amp;#40;Context context&amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;            &amp;#47;&amp;#47; xPathValidations - optional&lt;/p&gt;&lt;p&gt;            if &amp;#40;null &amp;#61;&amp;#61; this.XmlSchemas &amp;#124;&amp;#124; 0 &amp;#61;&amp;#61; this.XmlSchemas.Count&amp;#41;&lt;br /&gt;            &amp;#123;&lt;br /&gt;                throw new ArgumentNullException&amp;#40;&amp;#34;XmlSchemas is either null or of zero length&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;            &amp;#125;&lt;br /&gt;            foreach &amp;#40;Pair schema in this.XmlSchemas&amp;#41;&lt;br /&gt;            &amp;#123;&lt;br /&gt;                schema.First &amp;#61; context.SubstituteWildCards&amp;#40;&amp;#40;string&amp;#41;schema.First&amp;#41;&amp;#59;&lt;br /&gt;                schema.Second &amp;#61; context.SubstituteWildCards&amp;#40;&amp;#40;string&amp;#41;schema.Second&amp;#41;&amp;#59;&lt;br /&gt;            &amp;#125;&lt;br /&gt;        &amp;#125;&lt;br /&gt;    &amp;#125;&lt;br /&gt;&amp;#125;&lt;/p&gt;</description><author>scox_nz</author><pubDate>Thu, 07 Aug 2008 02:23:54 GMT</pubDate><guid isPermaLink="false">Commented Issue: Improved XmlValidationStepEx 20080807022354A</guid></item></channel></rss>