How to Validate your Schema in Biztalk?

How to Test your Schema?

There are three operations you can perform on your schema to validate it.

·         Instance generation. This operation generates an instance message from a schema, creating test data to accompany the XML elements and attributes specified by the schema.

·         Schema validation. This operation validates the internal consistency of a schema, assuring that it conforms to the XML Schema definition (XSD) language schema standard.

·         Instance validation. This operation validates a given instance message against a schema

How to Validate your schema in Visual Studio?

After you have constructed a schema, you can check your work by validating the schema itself in isolation.

1.       In Solution Explorer, right-click the schema that you want to validate, and then click Validate Schema.

2.       In the Output window, view the results. Success and error messages are displayed in this window

 

And here is how you will validate an instance message against your schema.

1.       In Solution Explorer, right-click the schema, and then click Properties.

2.       If necessary, in the Properties window, expand the General section of the General tab by clicking its plus (+) icon.

3.       In the Input Instance Filename property value field, either type the name of a file or use the ellipsis (...) button at the right end of the value field to browse for a file that contains the instance message to be validated against the schema, and then click Open.

4.       In Solution Explorer, right-click the schema name, and then click Validate Instance.

5.       In the Output window, view the results. Success and error messages are displayed in this window.

 

References:

1.       How to validate Instance Messages

2.       Testing Schemas