Tuesday, March 10, 2009

BizTalk 2009 :Generate XSD Schema from XML , DTD,XDR files

Most of the time we have provided with  XML document to create BizTalk XSD schema in this case we can Generate XSD from given XML files.

here is the steps we need to follow.

1) First we need to execute the following script which comes with  BTS 2009 and BTS 2006 this is located in the following Directory.

C:\Program Files (x86)\Microsoft BizTalk Server 2009\sdk\Utilities\Schema Generator ( for 64 bit machine).

C:\Program Files\Microsoft BizTalk Server 2009\sdk\Utilities\Schema Generator (32 bit machine).

with out executing this script if you try to Generate XSD schema you get the following error which is self explanatory.

image

Now fire up the VS.NET 2008 Right click the BizTalk project and select Add –>Add Generated Items as shown below.

image

Select the  Generate Schemas from the list.

image

Now you need to select the  Input Document type  in my case i am going to use  Well-Formed XML file.

image

 

image

Here is my sample XML  Input

<Contacts>

          <Contact>

               <Name />

                 <Age />

                <Phone />

            </Contact>

</Contacts>

Here is  Generated XSD as output

image

Nandri

Sreenivasaragavan.

No comments: