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:
- The BizTalk Server orchestration retrieves an .xml input file from a specific folder.
- The orchestration uses an HTTP request to forward the XML from the file to a multiplier ASP.NET application.
- The multiplier ASP.NET application responds to the HTTP request by performing the multiplication and returning the result as XML in the HTTP response.
- 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.
- In a command window, navigate to the following folder:
<Samples Path>\Adapters\HttpSolicitResponse
- Run the file Setup.bat, which performs the following actions:
- 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:
- Click Start, point to All Programs, point to Administrative Tools, and then click Component Services.
- In Component Services, navigate to the COM+ application for this sample: IIS-{Default Web Site//Root/Multiplier}.
- Right-click the COM+ application, and then click Properties.
- 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.
- Restart IIS to ensure that all changes are in effect.
To Run This Sample
Use the following procedure to run the HTTPSolicitResponse sample.
- Paste a copy of the file request_in.xml into the folder HttpSolicitResponseInput.
- 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.
Copyright © 2004 Microsoft Corporation.
All rights reserved.