Printer Friendly Version      Send     
Click to Rate and Give Feedback
MSDN
MSDN Library
BizTalk Server
BizTalk Server 2004
SDK
Samples
 HTTPSolicitResponse (BizTalk Server...
Microsoft BizTalk Server 2004
HTTPSolicitResponse (BizTalk Server Sample)

The HTTPSolicitResponse sample demonstrates how to create a Microsoft BizTalk Server 2004 orchestration that leverages an ASP.NET application to help process orchestration data. In this sample, the orchestration makes use of a request/response port to send a message to the ASP.NET application and to retrieve the response. You achieve the integration between the BizTalk Server orchestration and the ASP.NET application by using the HTTP adapter. Additional information about the HTTP adapter will be provided in the updated BizTalk Server 2004 Help available at http://go.microsoft.com/fwlink/?linkid=20616. For more information, see HTTP Adapter.

This sample consists of a BizTalk Server orchestration that receives a request containing two numbers to be multiplied, and satisfies that request using the following sequence of steps:

  1. The BizTalk Server orchestration retrieves an .xml input file from a specific folder.
  2. The orchestration uses an HTTP request to forward the XML from the file to a multiplier ASP.NET application.
  3. The multiplier ASP.NET application responds to the HTTP request by performing the multiplication and returning the result as XML in the HTTP response.
  4. The orchestration receives the result as XML in an HTTP response, and writes that result to an .xml file in a specific folder.

Note  For important information about all samples in this SDK, see Samples.

To download the updated BizTalk Server 2004 SDK, go to http://go.microsoft.com/fwlink/?LinkId=24723.

Location in SDK

<Samples Path>\Adapters\HttpSolicitResponse\

File Inventory

The following table shows the files in this sample and describes their purpose.

File(s) Description
Cleanup.bat Undeploys assemblies and removes them from the global assembly cache (GAC); removes send and receive ports; removes Microsoft Internet Information Services (IIS) virtual directories as needed.
HttpSolicitResponse.btproj, HttpSolicitResponse.sln Provides project and source files for the BizTalk project that contains the orchestration that uses the multiplier ASP.NET application, the associated schemas, and so on.
HttpSolicitResponseBinding.xml Provides for automated setup such as port binding.
MultiplyRequest.xsd, MultiplyResponse.xsd Provides schemas for the multiplication request and response XML messages, respectively.
MultiplyTwoIntegers.odx Provides a BizTalk Server orchestration that receives an .xml file requesting a multiplication operation, forwards the request to the multiplier ASP.NET application, and writes its response to a file.
request_in.xml Sample input file.
Setup.bat Builds and initializes this sample.
In the \Multiplier folder:

AssemblyInfo.cs, Global.asax, Global.asax.cs, Global.asax.resx, Multiplier.aspx, Multiplier.aspx.cs, Multiplier.aspx.resx, Multiplier.csproj, Multiplier.csproj.webinfo, Multiplier.sln, Multiplier.vsdisco, Web.config

Contains files that constitute the ASP.NET application that implements the multiplier service, including project and solution files, ASPX files, Microsoft Visual C# .NET source files, and so on.

To Build and Initialize This Sample

Use the following procedure to build and initialize the HTTPSolicitResponse sample.

  1. In a command window, navigate to the following folder:

    <Samples Path>\Adapters\HttpSolicitResponse

  2. Run the file Setup.bat, which performs the following actions:
    • Creates the input and output folders for this sample:

      <Samples Path>\Adapters\HttpSolicitResponse\HttpSolicitResponseInput

      <Samples Path>\Adapters\HttpSolicitResponse\HttpSolicitResponseOutput

    • Compiles and configures the multiplier ASP.NET application used by this sample.
    • Compiles and deploys the BizTalk Server orchestration used in this sample.
    • Creates and binds the necessary BizTalk Server receive location and ports.

      Note  This sample displays the following warnings when creating and binding the ports:

      Warning: Receive handler not specified for receive location "HttpSolicitResponseReceiveLocation"; updating with first receive handler with matching transport type.
      Warning: Host not specified for orchestration "Microsoft.Samples.BizTalk.HttpSolicitResponse.MultiplyTwoIntegers"; updating with first available host.
      You can safely ignore these warnings. (To accommodate for possible naming differences in user installations, the host name and receive handler have been omitted from the binding file. The Btsdeploy.exe utility uses the first receive handler that supports the adapter type and the default host.)

      Note  Due to a known issue with Visual Studio .NET 2003, the forms in this sample will not display correctly in design mode after running Setup.bat. To view the forms in design mode, rebuild the form projects in Visual Studio .NET.

    • Enables the receive location, and starts the send port.

      Note  The orchestration in this sample uses a two-way port for the HTTP interaction with the ASP.NET application.

      Note  You should confirm that BizTalk did not report any errors during the build and initialization process before attempting to run this sample.

      Note  If you choose to open and build the projects in this sample without running the file Setup.bat, you must first create a strong name key pair using the .NET Framework Strong Name Utility (sn.exe). Use this key pair to sign the resulting assemblies.

      Note  To undo changes made by Setup.bat, run Cleanup.bat. You must run Cleanup.bat before running Setup.bat a second time.

  3. Because the file Setup.bat creates an IIS application and sets it to run in high isolation, you must make sure that it will be run in the context of a user in the BizTalk Isolated Host Users group by following these steps:
    1. Click Start, point to All Programs, point to Administrative Tools, and then click Component Services.
    2. In Component Services, navigate to the COM+ application for this sample: IIS-{Default Web Site//Root/Multiplier}.
    3. Right-click the COM+ application, and then click Properties.
    4. In the Properties dialog box, change the identity under which this COM+ application runs to a user that is a member of a BizTalk NT user group.
    5. Restart IIS to ensure that all changes are in effect.

To Run This Sample

Use the following procedure to run the HTTPSolicitResponse sample.

  1. Paste a copy of the file request_in.xml into the folder HttpSolicitResponseInput.
  2. Observe the .xml file created in the folder HttpSolicitResponseOutput. The name of this .xml file is based on the message ID GUID. This file contains the XML-formatted result of the multiplication operation.

    Note  You can change the operand values in the input file to perform a different multiplication operation.

    Remarks

You can adapt this sample to communicate with a different external system that exposes an HTTP interface.

The files MultiplyRequest.xsd and MultiplyResponse.xsd are the XML schemas that define the format of the input and output data for the multiplier ASP.NET application. The orchestration uses these files to define the request and response message types.

Note  If you update a send port or receive location using the BizTalk Explorer object model or a Windows Management Instrumentation (WMI) script, the Receive Port Properties and Send Port Properties property pages in BizTalk Explorer will display an incorrect Address (URI). The Address (URI) used internally is the Address (URI) set by the script, so the script works as expected. To update the property pages to display the correct Address (URI), update the Address (URI) field in BizTalk Explorer with the new value. Additional information and the instructions for completing this step will be provided in the updated BizTalk Server 2004 Help available at http://go.microsoft.com/fwlink/?linkid=20616. For more information, see Editing Send Port Adapter Properties Using BizTalk Explorer and Editing Receive Location Adapter Properties Using BizTalk Explorer.

See Also

Adapters (BizTalk Server Samples Folder)

To download updated BizTalk Server 2004 Help from www.microsoft.com, go to http://go.microsoft.com/fwlink/?linkid=20616.

© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker