Microsoft BizTalk Server 2004: Creating Schemas - Exercise 5 Validating Schemas and Generating Instance Messages (Page 6 of 7 ) Scenario In this exercise, you will use the Validate Schema command to determine whether the schemas contain any internal inconsistencies, or have other issues that might prevent them from being used effectively for processing instance messages. You will also generate a sample instance message for each of the schemas. Tasks Detailed steps - Validate the schema file.
Validating the schema insures that an XML document could be created that would be well-formed and valid against this particular schema.
- In Solution Explorer, right-click CustomerOrder.xsd, and then select Validate Schema.
The results of the schema validation are displayed in the output window.
- Generate a sample instance message for the schemas.
Generating a sample instance provides a visual test, as well as a document to pass through the process for testing.
- Right-click the CustomerOrder.xsd, and then select Properties.
- In the CustomerOrder.xsd Property Pages dialog box, in the Output Instance Filename box, type C:\Labs\Work\GeneratedCustomer Order.xml and then click OK.
- Right-click the CustomerOrder.xsd schema, and then select Generate Instance.
A sample instance message is saved in C:\Labs\Work, and a link to the XML instance is shown in the Output window. Click the link while pressing Ctrl to open the resulting XML file.
- Validate the sample instance message.
The CustomerOrder.xml XML file is provided so that you can check for errors in the schema you just created.
- Right-click the CustomerOrder.xsd schema, and then select Properties.
- In the CustomerOrder.xsd Property Pages dialog box, in the Input Instance Filename box, type C:\Labs\Work\CustomerOrder.xml and then click OK.
- Right-click the CustomerOrder.xsd schema file, and then select Validate Instance.
The results of the instance validation are displayed in the output window. This step validates the schema against an actual XML file.
- Validate the flat file sample instance.
The CustomerOrder.txt flat file is provided so that you can check for errors in the schema you just created.
- a. Right-click CustomerOrderFlatFile.xsd, and then select Properties.
- In the CustomerOrderFlatFile.xsd Property Pages dialog box, set the following properties:
Property Value Input Instance Filename C:\Labs\Work\CustomerOrder.txt Validate Instance Input Type Native
|
- Click OK.
- Right-click the CustomerOrderFlatFile.xsd schema file, and then select Validate Instance.
The results of the instance validation are displayed in the output window. This step validates the schema against an actual flat file.
 | Take Microsoft software for a test drive. With MSDN Virtual Labs, you get full access to all available Microsoft products through 90-minute modules, each with its own downloadable manual. Try this lab out now. |
Next: Exercise 6 Assigning a Strong Name to the Assemblies >>
More BrainDump Articles More By MSDN Virtual Labs |