BizUnit.XmlValidationStepEx with dependent schemas

Sep 13, 2010 at 4:55 AM

I have a schema that has Schema A that depends on Schema B for definition of xml types (i.e. in Schema A there is: <xs:import schemaLocation=".\schema_b.xsd" ...

I have found that unless I copy both the schemas to the "TestResults\user_MACHINE 2010-09-13 15_38_51\Out" folder, and specify Schema A in the XmlSchemaPath the test fails.  If I put both schemas in any another folder, the BizUnit.XmlValidationStepEx sees the first schema but not the dependent schema.

Looks like a bug.

I'm running BizUnit.BizTalkSteps.dll 3.1.1001.0

Error Message

Test method SomeTests.UnitTest1.TestMap threw exception:  BizUnit.ValidationStepExecutionException: BizUnit encountered an error executing a validation step --->  System.Xml.Schema.XmlSchemaException: Type 'some_namespace:some_type' is not declared..

 

 

Sep 13, 2010 at 9:31 AM

Hi,

Regarding the TestResults path issue:  Actually that path is where MSTest looks for artifacts. In general, this poses a lot of problems when working with different test frameworks because NUnit and others look in the 'normal' executable path whereas MSTest looks under the testResults folder.  Since the import location is .\schema_b.xsd, the schemas have to be co-located.

Regarding the second issue: can you try without the ".\" in the import path? There may be some namespace resolution quirk.

cheers,

benjy

Apr 5, 2011 at 11:39 AM
santoshbenjamin wrote:

Regarding the second issue: can you try without the ".\" in the import path? There may be some namespace resolution quirk.

I've tried this - still doesn't work.

Is there any other way to validate against schemas which include other schemas without copying all schemas to current folder?

Jan 4, 2012 at 8:06 AM

hello ,

I syour issue reolved .If yes then Please let me how did you tackle  from this?

Mar 5, 2013 at 2:22 PM
This is caused by the schemalocation of your includes. I managed to reverse engineer the code to test a possible solution, now the project owner has to include it in the code.

This thread is also about this issue:
http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/400c0a0c-967d-4670-8443-41fcf5cf8815