Wednesday, December 16, 2009

EDI - Schema Validation error while developing

Today I was trying few edi schema, On trying to validate in VS 2005 for the BizTalk Project, I found a error
../X12_BatchSchema.xsd: error BEC2004: Object reference not set to an instance of an object.
..\X12_BatchSchema.xsd: error BEC2004: Validate Schema failed for file: .
..\X12_BatchSchema.xsd: error BEC2004: Validate Instance failed for schema X12_BatchSchema.xsd, file: .
Component invocation succeeded
.


I tried to debug this issue, I found after lots of experiment. I removed my property schema, which I used for the schema. The error dissapeared and Validation succeeded. I am not sure why the error occured, Looks like the validation component not able to recognise the proper schema if there is property schema in the project.

Tip
So during development do your property promotion after validating you modified edi schema