Published on : May 15, 2007
Category : BizTalk Server
Step #1:
Within Visual Studio copy the schema (.xsd file) and Paste it. Rename the file to appropriate name.
Step #2:
Click on the <Schema> node and change the “Target Namespace” property in the properties window as shown below. (NOTE: This step is required only if you want to change the target namespace, else you can ignore and go to Step #3)
Step #3:
Click on the Root node and change “Node Name” property in the properties window as shown below. Changing the “Node Name” property will automatically change “RootNode TypeName”. Make sure they are the same.
Step #4:
Click on the .xsd file in the solution explorer and click F4 (or make sure the properties window is visible, when you select the .xsd file). Set Appropriate name (usually the root node of your schema) to the “Type Name” as shown in the below figure. This is crucial, since all the schemas contained inside the project will be compiled into typed objects, derived from corresponding BizTalk artifact classes. (Example: If you look at the compiled “dll” of this sample project, using
Reflector, the class definition will be
public sealed class PO_Target : SchemaBase).
That’s all, your new schema is ready to be used now. Apart from all the properties windows we have seen there is one more property window for the schemas (can be seen by right clicking on the .xsd file and selecting “Properties” from the context menu) as shown in the below figure
You configure things like “Output Instance filename” which will be used when you generate a sample file from schema, “Input Instance file” which will be used when you want to validate a message against a schema etc.
Nandri!
Saravana