Sunday, December 21, 2008

BizTalk Flat File Schema Wizard.

 

BizTalk 2006 has new Template called  Flat File Schema Wizard , In this post I am going to show how we can use this Template  to converting Flat File to  XML message which BizTalk can  understand.

Basically Inside the BizTalk only XML message are allowed.  now let say we have Flat File which contains Customer profile information as shown below

Sreeni,35,232232323,sragavan@hotmail.com   now we need to convert this text file to XML  XSD Schema.

Steps needed to convert Flat File to  XML Schema  (XSD).

1) First Use Flat File Schema Wizard  to Create XML Schema instance.

2) Create a Receive custom pipeline to disassemble the  Flat File into XML file

3) Create strong name and then add SN key file to the BizTalk  project, now build and deploy the project into BizTalk Message Box[ DB].

4) Configure Receive and Send ports.

5) Test the Application.

 

First Create a Empty BizTalk Project  and Add  Flat File Schema Wizard to it.

image

Follow the Wizard Dialog.

 image

Please select the  Flat file which needs to convert to XML Schema.

image

 

image

Here you edit the Element name and select the data type of each element.

image

 

Finally the Selected  Flat File instance is created as the XSD Schema as shown below.

image

 

Now we need to create Receive custom pipeline to Disassemble the Flat File , Drag and drop the  Flat File Disassembler from left side Toolbox in to  Disassemble Stage of the Pipeline.

image

Configure the  Receive Location with Custom Pipeline which we created.

image

Configure the Send port Filters as shown below.

image

Now drop the  Flat File instance  in  Receive Location (IN folder) after 1 or 2 seconds BizTalk Will Get that file and push to Receive  pipeline.

Input File :

image

Out put XML file:

image

 

thanks

Sreenivasaragavan.

1 comment:

Ravi Ramadas Blog said...

Hi Sreeni,

Thanks, this is realy good post. Is there any way to convert XML to Flat file, Guess I have to use XML Disassembler for this. Need your help in this..

Thanks
Ravi