| Setup Your Environment (5 Minutes) |
| Step | Task to Perform | Task Steps | Estimated Time |
| 1. | Create File Directories | - Create C:\BTSQuickStart.
- Create C:\BTSQuickStart\In.
- Create C:\BTSQuickStart\Out.
| 1 Minute |
| 2. | Set NTFS Permissions | - Give Everyone Full control to C:\BTSQuickStart.
| 1 Minute |
| 3. | Create a Strong Name Key File | - Open the Visual Studio .NET command prompt.
- Type sn -k C:\BTSQuickStart\BTSQuickStart.snk.
- Press Enter. The key pair will be written. You can close the command prompt.
| 1 Minute |
| 4. | Create and configure the BizTalk Project | - Open Visual Studio .NET.
- Create a new Empty BizTalk Server project and name it BTSQuickStart.
- Go to the project properties and click on the Assembly node.
- Set the Assembly Key File property to the path of your BTSQuickStart.snk file.
| 2 Minutes |
| Create Design Time Artifacts (20 Minutes) |
| Step | Task to Perform | Task Steps | Estimated Time |
| 1. | Create a Source Schema | - Right click on the BTSQuickStart project and Add New Item.
- Select the Schema template and call it Source.xsd.
- Rename the root node to Source.
- Create a new Child Record under Source.
- Name it BlogPost.
- Create a new Child Field Element under BlogPost.
- Name it Date.
- Set the Data Type property to xs:dateTime.
- Create a new Child Field Element under BlogPost.
- Name it Content.
- Leave the Data Type as xs:string.
- Create a new Child Record under BlogPost.
- Name it Author.
- Create a new Child Field Element under Author.
- Name it FirstName.
- Leave the Data Type as xs:string.
- Create a new Child Field Element under Author.
- Name it LastName.
- Leave the Data Type as xs:string.
- Save Source.xsd.
| 5 Minutes |
| 2. | Create a Destination Schema | - Right click on the BTSQuickStart project and Add New Item.
- Select the Schema template and call it Destination.xsd.
- Rename the root node to Destination.
- Create a new Child Record under Destination.
- Name it Post.
- Create a new Child Field Attribute under Post.
- Name it DatePosted.
- Set the Data Type property to xs:dateTime.
- Create a new Child Field Attribute under Post.
- Name it Author.
- Leave the Data Type as xs:string.
- Create a new Child Field Element under Post.
- Name it Content.
- Leave the Data Type as xs:string.
- Save Destination.xsd.
| 5 Minutes |
| 3. | Map the Schemas and add Functoid | - Right click on the BTSQuickStart project and Add New Item.
- Select the Map template and call it SchemaMap.btm.
- Click Open Source Schema.
- Choose Schemas, BTSQuickStart.Source.
- Click OK.
- Expand all the nodes of the schema.
- Click Open Destination Schema.
- Choose Schemas, BTSQuickStart.Destination.
- Click OK.
- Expand all the nodes of the schema.
- Drag the Date element of the source schema to the DatePosted attribute of the destination schema. A transform line will be drawn between the two.
- Drag the Content element of the source schema to the Content element of the destination schema. A transform line will be drawn between the two.
- Add a functoid.
- Open the VS.Net Toolbox and you will see a list of functoids.
- Drag the Scripting functoid into the middle of the transform map.
- Modify the Script Property of the Scripting Functoid.
- Choose Inline C# for the Script type.
- Erase the script buffer and type the following:
public string ConcatAuthorName(string FirstName, string LastName) { return LastName + ", " + FirstName; } - Click OK.
- Drag the FirstName element of the source schema to the Scripting functoid. A transform line will be drawn.
- Drag the LastName element of the source schema to the Scripting functoid. A transform line will be drawn.
- Drag a line from the Scripting functoid to the Author attribute of the destination schema.
- Save SchemaMap.btm.
| 10 Minutes |
| Build & Deploy Assembly (1 Minute) |
| Step | Task to Perform | Task Steps | Estimated Time |
| 1. | Build Assembly | - Click Build, Build BTSQuickStart.
| < 1 Minute |
| 2. | Deploy Assembly | - Click Build, Deploy BTSQuickStart.
| < 1 Minute |
| Create and Configure Ports (10 Minutes) |
| Step | Task to Perform | Task Steps | Estimated Time |
| 1. | Create Receive Port | - Open BizTalk Explorer (View, BizTalk Explorer).
- Right Click on Receive Ports, Choose Add Receive Port.
- Select One-Way Port and click OK.
- Name it BTSQuickStartReceivePort.
- Click OK.
| 1 Minute |
| 2. | Create Receive Location | - Under BTSQuickStartReceivePort you will see a Receive Locations node.
- Right click on Receive Locations, Choose Add Receive Location.
- Name it BTSQuickStartReceiveLocation.
- Select FILE for the transport type property.
- Type C:\BTSQuickStart\In\*.xml for the Address (URI) property.
- Choose BizTalkServerApplication for the Receive Handler property.
- Choose Microsoft.BizTalk.DefaultPipelines.XMLReceive for the Receive Pipeline property.
- Click OK.
| 2 Minutes |
| 3. | Create Send Port | - In BizTalk Explorer, Right Click the Send Ports node.
- Choose Add Send Port.
- Select Static One-Way Port and click OK.
- Name it BTSQuickStartSendPort.
- Select FILE for the transport type property.
- Type C:\BTSQuickStart\Out\%MessageID%.xml for the Address (URI) property.
- Click the Send Node.
- Choose Microsoft.BizTalk.DefaultPipelines.XMLTransmit for the Send Pipeline property.
- Under Filters & Maps, choose the Filters node.
- Choose BTS.ReceivePortName as the property.
- Leave the operator value as ==.
- Set the value to BTSQuickStartReceivePort.
- Click the Outbound Maps node.
- Select the BTSQuickStart.SchemaMap for the Map to apply property.
- Click OK.
| 5 Minutes |
| 4. | Enable Receive Location | - In BizTalk Explorer, Right click on BTSQuickStartReceiveLocation.
- Select Enable.
| < 1 Minute |
| 5. | Enlist Send Port | - In BizTalk Explorer, Right click on BTSQuickStartSendPort.
- Select Start.
| < 1 Minute |
| Test Application (2 Minutes) |
| Step | Task to Perform | Task Steps | Estimated Time |
| 1. | Create XML Instance | - In Solution Explorer, right click on Source.xsd.
- Choose properties.
- In the Output Instance Filename property, type C:\BTSQuickStart\Instance.xml.
- Click OK.
- Right click on Source.xsd again and choose Generate Instance.
| 1 Minute |
| 2. | Drop File | - Go to C:\BTSQuickStart.
- Drop Instance.xml into C:\BTSQuickStart\In.
- BizTalk will pickup the message, transform it and move it to C:\BTSQuickStart\Out.
- Examine the structure and content of both XML files.
| 1 Minute |