Step 4: Configure Bindings File

Parent Previous Next

You should now have the HelloWorld solution from C:\BTDF\Walkthrough1 open in Visual Studio and successfully built, with the Deployment Framework for BizTalk project files added to Solution Explorer.  Your project file should now be customized to point to HelloWorld.dll.  The next step is to deploy the application for the first time and set up a port bindings XML file.


Step 1: Deploy the application for the first time

Now that you have indicated to the Deployment Framework what you want to deploy (properties in the PropertyGroup) and where your application file(s) are located (the Schemas ItemGroup), you are ready to deploy your application for the first time.  Since you have not yet defined the bindings for the application, the application cannot start, but it can be deployed.


1a. On the Visual Studio main menu bar, open Tools > Deployment Framework for BizTalk and choose the "Deploy BizTalk Solution" command.


1b. Watch the deployment script execute by opening the Visual Studio Output window.  (You can find a link in the main menu bar's View menu.)


1c. The build will fail due to the incomplete port bindings.  You should see the message:


Starting HelloWorld application...

C:\Program Files\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1831,5): error : Could not enlist orchestration 'Microsoft.Samples.BizTalk.HelloWorld.HelloSchedule,HelloWorld, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd2d694226bed292'. Could not enlist orchestration 'Microsoft.Samples.BizTalk.HelloWorld.HelloSchedule'. All orchestration ports must be bound and the host must be set. [C:\BTDF\Walkthrough1\HelloWorld.Deployment\Deployment.btdfproj]

Done Building Project "C:\BTDF\Walkthrough1\HelloWorld.Deployment\Deployment.btdfproj" (Deploy target(s)) -- FAILED.


Step 2: Configure bindings in BizTalk Server Administration tool

The application is now fully deployed into BizTalk and is almost ready to go.  Before the deployment can be fully automated, you need to manually configure all of the port bindings using the BizTalk Server Administration tool, then export the completed bindings into your deployment project folder.


2a. Open the BizTalk Server Administration Console, then expand the BizTalk Group and Applications nodes.  Locate an application named HelloWorld.


2b. Right-click the HelloWorld application and select the Configure... command.  In the Configure Application dialog, select the HelloSchedule node.


2c. In the Host drop-down, choose BizTalkServerApplication (assuming a default BizTalk configuration).


2d. Create and configure a receive port and location:

  1. Under Receive Ports, choose <New receive port...> from the drop-down.  In the receive port dialog, change the Name to HWReceivePort.
  2. Select the "Receive Locations" node from the left pane.  Click the New... button to create a receive location.  In the receive location dialog, change the name to HWReceiveLocation.
  3. Choose the FILE adapter from the Type drop-down list.  Click the Configure... button, then enter "C:\BTDF\Walkthrough1\In" as the Receive Folder.  Click OK.
  4. In the Receive Pipeline drop-down, choose the XmlReceive pipeline.  Click OK.
  5. Click OK again to complete the creation of the receive port and location.


2e. Create and configure a send port:

  1. Under Send Ports, choose <New send port...> from the drop-down.  In the send port dialog, change the Name to HWSendPort.
  2. Choose the FILE adapter from the Type drop-down list.  Click the Configure... button, then enter "C:\BTDF\Walkthrough1\Out" as the Destination Folder.  Click OK.
  3. Click OK again to complete the creation of the send port.


2f. Click the OK button to complete configuration of the application.


2g. Right-click the HelloWorld application and select the Start... command.  Click the Start button to start the application.  The application should now be fully deployed, started and functional.


Step 3: Test the application

Now that the application is started, we can try sending a PO XML file through it by dropping a file into the In folder.  We should see an invoice XML appear in the Out folder.


3a. Copy the file C:\BTDF\Walkthrough1\HelloWorld\SamplePOInput.xml into C:\BTDF\Walkthrough1\In.


3b. Verify that a new XML file named {SomeGUID}.xml appears in C:\BTDF\Walkthrough1\Out.


3c. If the input file did not disappear or the output file did not appear, then follow standard BizTalk debugging practices to solve the problem before continuing.  Check the Windows Application Event Log first.


Step 4: Export the complete port bindings to an XML file

Back in the BizTalk Server Administration Console, right-click the HelloWorld application and choose the Export > Bindings... command.  Enter the file path C:\BTDF\Walkthrough1\HelloWorld.Deployment\PortBindingsMaster.xml and click the OK button.  When prompted whether to overwrite the existing file, click the Yes button.


Step 5: Undeploy the application

We have completed our goal of manually configuring the port bindings and exporting them to a file within the deployment project.  Next, we can undeploy the application and then perform a full deployment to test the new bindings file.


5a. On the Visual Studio main menu bar, open Tools > Deployment Framework for BizTalk and choose the "Undeploy BizTalk Solution" command.


5b. Watch the deployment script execute by opening the Visual Studio Output window.  The script should complete successfully:


Done Building Project "C:\BTDF\Walkthrough1\HelloWorld.Deployment\Deployment.btdfproj" (Undeploy target(s)).


Build succeeded.

   0 Warning(s)

   0 Error(s)


Created with the Personal Edition of HelpNDoc: Free CHM Help documentation generator