One Java guy asked me hey Sreeni , How come Microsoft very successful in Software Business ?
I told him You know what Microsoft Talk in Biztalk that is why?
In this post i am going to show you how to create new Biztalk application using VS.NET 2008
First Create a Empty Biztalk Server project and name as per your application
Next we need create the Schema (XSD) . This is nothing but the Biztalk Message structure.
here we are going to create a Schema called Contacts which has the following Fields.
1) Name -string
2) Phone string
3) Age -Integer
4) Email -string
To Add Schema to the project we need to right click on project name and select Schema Template
as shown below.
Here is the Schema [ here I am promoted the Age Field. I will explain What is Property Promotion? in Next Post.]
Once you have created the Schema you can Generate Instance of the Schema, Validate the schema ,Validate Instance of the Schema..
Here is the Instance of the above schema
- <ns0:Contact xmlns:ns0="http://SreeniSchema.SreeniContact">
<Name>Name_0</Name>
<Phone>Phone_0</Phone>
<Age>100</Age>
<Email>Email_0</Email>
</ns0:Contact>
Next Step we need to Add Strong Name to the project.
Why Strong Name?
If you want to deploy .NET assemblies in to GAC you need to give Strong name to that Assembly before deploying into GAC.
So All BizTalk projects are .NET assemblies, and they are deployed into the global assembly
cache (GAC).
Strong names help the .NET Framework(CLR) uniquely identify assemblies in the GAC.
Strong names require a strong name key. The strong name key is generated by the sn.exe
tool, which is part of the .NET Framework SDK.
To Create Strong Name key you can using SN.EXE from VS.NET command prompt or you can do it in VS.NET 2008 IDE itself.
Now compile and Deploy the project [ This will deploy the schema into Biztalk Message Box]
Here is the GAC location on Windows C:\windows\Assembly and you can see the schema is Installed in the GAC.
Now we need to Create Receive and Send ports. The Messages arrive into Biztalk Via Receive ports goes out via Send ports. Port is Mapped to a Location where Biztalk Service Application get message from. For example File , HTTP, MSMQ, WCF Service, etc...
Now time to Launch a Biztalk Admin Console to configure the PORTS as shown.
1) Creating Receive PORT
2) Configuring Receive Location as FILE Adapter where BTS will pickup a Message from ( Message type is the Schema we created).
3) Creating Send Ports And Configuring the Filters . In the beginning I mentioned that I promoted the AGE Filed element in our Schema. based on AGE I am filter the Message
Here i am configured the Send port to receive the message only if AGE is 50 .
This Type of Message Routing also called CBR - Content Based Message Routing .
If you promote the filed in Schema you can access that Filed content inside PORTS, Biztalk Orchestration, Pipeline etc.
Once you configured the Receive and Send ports now you can test the Application.
Now Take the Instance of the Schema Message XML file Drop into IN Folder after 2 to 3 second the file will disappeared from in folder and goes into Out Folder as shown below.
Please Make sure that Age is 50 other wise the message wont routed to OUT folder.
Sample Message
<ns0:Contact xmlns:ns0="http://SreeniSchema.SreeniContact">
<Name>Gandhi</Name>
<Phone>123453343</Phone>
<Age>50</Age>
<Email>India@KnowledgePower.com</Email>
</ns0:Contact>
One of my best friends working on OTM and BTS Integration Project . He is good in OTM Oracle but he is new to BTS server, so I thought of Blogging this small BTS Application HOL for HIM.
His name is Raghu and he working as Architect with HITACHI Consulting.
thanks
Sreenivasaragavan.
1 comment:
Hey Sreeni,
The top paragraph is awesome. Do you have such this kind of article on creating a sample BizTalk Server 2006 R2 application to talk with TCP client?
Post a Comment