Export (0) Print
Expand All

Walkthrough for BizTalk Adapter for Web Services Enhancements 2.0

Published: March 29, 2005

On This Page

Summary
Calling a BizTalk Orchestration from a Client Web Application
Conclusion

Summary

This document walks you through creating and publishing a simple Web orchestration using the Microsoft® BizTalk® Adapter for Web Services Enhancements 2.0.

The main feature of the Microsoft® BizTalk® Adapter for Web Services Enhancements (WSE) 2.0 is the ability to access BizTalk orchestrations as Web services by using Web Services Enhancements 2.0. You can also use the adapter to publish orchestrations with X509 certification.

To call an orchestration as a Web service, you must first create the orchestration, and then publish the orchestration as a Web service. You can then create a client application that can call your orchestration. If you want, you can also publish the orchestration using X509 certification.

Calling a BizTalk Orchestration from a Client Web Application

In this document we will walk through the following major steps:

  1. Create a BizTalk orchestration.

  2. Publish the orchestration as a Web service.

  3. Create and run the walkthrough client application.

  4. Optionally, publish the orchestration again using X509 certification.

Step 1: Create a BizTalk Orchestration

The first major step in this walkthrough is to create a BizTalk orchestration. For this walkthrough, the orchestration is very simple: It receives a message, performs a simple transformation on the message, and then sends the message back to the caller. Most of the steps for creating the walkthrough orchestration are the same as for any other orchestration: creating the project; creating and mapping schemas; adding and configuring workflow items; creating and mapping ports; and creating and mapping keys.  

To create a BizTalk orchestration, follow these steps:

  1. Create a new BizTalk project.

  2. Create a Request schema.

  3. Create a Response schema.

  4. Create an empty BizTalk orchestration.

  5. Add workflow items to the BizTalk orchestration.

  6. Configure the workflow items.

  7. Map the schema files.

  8. Create a new configured port.

  9. Connect the port to your schema.

  10. Create a strong name key.

  11. Associate the strong name key with the current project.

  12. Build and deploy your solution.

1. Create a new BizTalk project

First, create a new BizTalk project in Microsoft Visual Studio® .NET 2003. This project will contain the orchestration that you will create later.

To create a new BizTalk project

  1. In Visual Studio .NET, on the File menu, point to New, and then click Project.

  2. In the New Project dialog box, in the Project Types area, click BizTalk Projects.

  3. In the Name field, type WSE BizTalk Walkthrough.

  4. In the Templates area, click Empty BizTalk Server Project, and then click OK.

    bizwse01.gif

2. Create a Request schema

After you create the empty BizTalk project, create a Request schema. The Request schema describes the format of an incoming message that the orchestration receives and translates into a response.

To create a Request schema

  1. In Solution Explorer, right-click WSE BizTalk Walkthrough, point to Add, and then click Add New Item.

  2. In the Add New Item dialog box, in the Templates area, select Schema, and then click Open.

    The default name for the schema is schema1.xsd. This is satisfactory for this walkthrough.

    bizwse02.gif

  3. On the Schema1.xsd page, right-click the Root node, click Rename, type Request, and then press ENTER.

  4. Right-click the Request node, point to Insert Schema Node, click Child Field Element, type Name, and then press ENTER.  

  5. Right-click the Request node, point to Insert Schema Node, click Child Field Element, type Address, and then press ENTER.

  6. Right-click the Request node, point to Insert Schema Node, click Child Field Element, type Age, and then press ENTER.

    bizwse03.gif

  7. On the File menu, click Save Schema1.xsd.

3. Create a Response schema

After you create a Request schema, create a Response schema. The Response schema describes the format of an outgoing message that the orchestration sends to the calling Web application.

To create a Response schema

  1. In Solution Explorer, right-click WSE BizTalk Walkthrough, point to Add, and then click Add New Item.

  2. In the Add New Item dialog box, in the Templates area, select Schema, and then click Open.

    The default name for the schema is schema2.xsd. This is satisfactory for this walkthrough.

  3. On the Schema2.xsd page, right-click the Root node, click Rename, type Response, and then press ENTER.

  4. Right-click the Response node, point to Insert Schema Node, click Child Field Element, type Comment, and then press ENTER.

    bizwse04.gif

  5. On the File menu, click Save Schema2.xsd.

4. Create an empty BizTalk orchestration

Now that you have created the empty BizTalk project, the Receive schema, and the Response schema, you can create the BizTalk orchestration. The orchestration represents the process of receiving the message, transforming the message, and sending the message.

To create an empty BizTalk orchestration

  1. In Solution Explorer, right-click WSE BizTalk Walkthrough, point to Add, and then click Add New Item.

  2. In the Add New Item dialog box, in the Templates area, select BizTalk Orchestration, and then click Open.

  3. The default name for the orchestration is BizTalk Orchestration1.odx. This is satisfactory for this walkthrough.

    bizwse05.gif

5. Add workflow items to the BizTalk orchestration

After you create the empty orchestration, you can add workflow items. For this walkthrough, we will create a simple workflow that receives one message, performs a simple transformation on the message, and sends the message back.

To add workflow items to the BizTalk orchestration

  1. In Orchestration Designer, from the Toolbox, drag a Receive shape to your workplace.

    For this walkthrough, the name of the receive shape is Receive_1.

  2. From the Toolbox, drag a Construct Message shape and put it directly under the Receive shape.

    For this walkthrough, the name of the construct message shape is ConstructedMessage_1.

  3. From the Toolbox, drag a Send shape and put it directly under the ConstructedMessage_1 shape.

    For this walkthrough, the name of the send shape is Send_1.

  4. From the Toolbox, drag a Transform shape into the ConstructedMessage_1 shape.

  5. For this walkthrough, the name of the transform shape is Transform_1.

    bizwse06.gif

  6. On the File menu, click Save BizTalk Orchestration1.odx.

6. Configure the workflow items

Now that you have added the workflow items to the orchestration, you can configure the items to relate to the schemas you created earlier in the walkthrough.

To configure workflow items in the BizTalk orchestration

  1. On the Receive_1 shape, click the exclamation point, and then click No Message. Select a message or click to create a new message.

    This creates a message titled Message_1. You can see this message in the Orchestration View.

  2. In the Orchestration View, right-click Message_1, and then click Properties Window.

  3. In the Properties window, in the Message Type drop-down list, click Schemas, and then click WSE_BizTalk_Walkthrough.Schema1.

    bizwse07.gif

  4. On the Send_1 shape, click the exclamation point, and then click No Message. Select a message or click to create a new message.

    This creates a message titled Message_2. You can see this message in the Orchestration View.

  5. In the Orchestration View, click Message_2, and then click Properties Window.

  6. In the Properties window, in the Message Type drop-down list, click Schemas, and then click WSE_BizTalk_Walkthrough.Schema2.

  7. On the ConstructMessage_1 shape, right-click the exclamation point, and then click No Constructed Message. Click to edit in the Properties window.

  8. In the Properties window, in the Messages Constructed field, select Message_2.

  9. On the File menu, click Save BizTalk Orchestration1.odx.

  10. On the Transform_1 shape, click the exclamation point, and then click Missing or invalid mapping configuration. Click to configure.

    bizwse08.gif

  11. In the Transform Configuration dialog box, click Source, click Click here to add a new row!, select Message_1, and then press ENTER.

    bizwse09.gif

  12. Click Destination, click Click here to add a new row!, select Message_2, and then press ENTER.

    bizwse10.gif

  13. Click OK.

    This opens BizTalk Mapper.

7. Map the schema files

After you configure the workflow items, you can map the Request and Response schema files.

To map the schema files

  1. On the Transform_1.btm page, in the Source Schema panel, click the Request node.

    This expands the node and displays the Name, Address, and Age child nodes.

  2. In the Destination Schema panel, click the Response node.

    This expands the node and displays the Comment child node.

  3. Select the Name node in the Source Schema panel and drag a line to the Comment node in the Destination Schema panel.

    bizwse11.gif

  4. On the File menu, click Save Transform_1.btm.

8. Create a new configured port

After you map the schema files, create and configure a port. This port represents the interface that the client application will access later in the walkthrough.

To create the new configured port

  1. In Visual Studio, click the BizTalk Orchestration1.odx page.

  2. In the left Port Surface panel, right-click, click New Configured Port, and then click Next.

  3. On the Port Properties page, in the Name field, type WSE_InPort, and then click Next.

  4. On the Select a Port Type page, in the Port Type Name field, type WSE_InPort_Type.

  5. Under Communication Pattern, select Request-Response.

  6. Under Access Restrictions, select Public, and then click Next.

    bizwse12.gif

  7. On the Port Binding page, click Next.

  8. On the Completing the Port Wizard page, click Finish.

  9. On the File menu, click Save BizTalk Orchestration1.odx.

9. Connect the port to your schema

After you create and configure the port, connect the port to your schema.

To connect the port to your schema

  1. In Visual Studio, click the BizTalk Orchestration1.odx page.

  2. On the WSE_InPort shape, connect the Request port to the Receive_1 request port.

  3. Connect the Response port to the Send_1 response port.

  4. Click the Receive_1 shape.

  5. In the Properties dialog box, in the Activate field, select True.

    bizwse13.gif

  6. On the File menu, click Save BizTalk Orchestration.odx.

10. Create a strong name key

Before you can build and deploy your BizTalk orchestration, you must create a strong name key. A strong name ensures that each assembly name is unique. After you create the strong name key, you will associate the key with your orchestration.

To create a strong name key

  1. Click Start, click Run, type cmd, and then press ENTER.

  2. Locate the \Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin directory.

  3. At the command prompt, type sn -k WSEWalkthroughKey.snk, and then press ENTER.

    bizwse14.gif

  4. Close the Command Prompt window.

11. Associate the strong name key with the current project

After you create the strong name key, associate the key with the current project. This enables BizTalk Server to uniquely identify your orchestration.

To associate the strong name key with the current project

  1. In Visual Studio, in Solution Explorer, right-click WSE BizTalk Walkthrough, and then click Properties.

  2. Under the Common Properties folder, select Assembly.

  3. Under the Strong Name category, in the Assembly Key File field, click the ellipsis (...) button.

  4. In the Assembly Key File dialog box, locate the folder in which you created the strong name key.

    For the walkthrough, this was the C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin folder.

  5. Click the WSEWalkthroughKey.snk file, and then click Open.

    bizwse15.gif

  6. Click OK.

  7. On the File menu, click Save All.

12. Build and deploy your solution

After you associate the strong name key with the current project, you are ready to build and deploy the solution.

To build and deploy your solution

  1. In Visual Studio, on the Build menu, click Build Solution.

  2. On the Build menu, click Deploy WSE BizTalk Walkthrough.

Step 2: Publish the Orchestration as a Web Service

After you build and deploy your solution, you can publish the orchestration as a Web service. After publishing the orchestration, you can confirm that the publication was successful. Finally, you must bind the receive ports and enlist the orchestration.

To publish the orchestration as a Web service, follow these steps:

  1. Publish the Web service.

  2. Confirm that you successfully published the Web service.

  3. Bind the receive ports and enlist the orchestration.

1. Publish the Web service

The first step that you must perform is to publish your Web service.

To publish the Web service

  1. In Visual Studio, click Tools, and then click BizTalk WSE Web Services Publishing Wizard.

    Make sure that you select the WSE version of the publishing wizard, instead of the original BizTalk Web Services Publishing Wizard.

  2. On the Welcome to the BizTalk WSE Web Services Publishing Wizard page, click Next.

  3. On the Create Web Service page, select Publish BizTalk orchestrations as Web Services, and then click Next.

  4. On the BizTalk Assembly page, click Next.

    Because you began the wizard with the WSE BizTalk Walkthrough project open, Visual Studio automatically populated the BizTalk assembly file field with the path and name of the relevant .dll file.

    Note If you did not start with the project open, click Browse, locate the WSE BizTalk Walkthrough.dll file, and then click Next.

  5. On the Orchestration and Ports page, click Next.

    Because you made the WSE_InPort port public in the previous section, you can view the port as public in this step.

    bizwse16.gif

  6. On the Web Service Properties page, click Next.

    The wizard fills in the Target namespace of the Web service field with a valid namespace name. For this walkthrough, the namespace is http://tempuri.org/.

  7. On the Policy Information page, click Next.

    For this walkthrough, we will make no changes to the policy information page.

  8. On the Web Service Project page, select the Allow anonymous access to Web service and Create BizTalk Server receive locations check boxes, and then click Next.

    Visual Studio fills in the default name for the project location. For this walkthrough, it is WSE_BizTalk_Walkthrough_Proxy.

    bizwse17.gif

  9. On the Web Service Project Summary page, click Create.

    Note that this step may take several minutes.

  10. On the Completing the BizTalk WSE Web Services Publishing Wizard page, click Finish.

2. Confirm that you successfully published an orchestration

You can use the Internet Information Services (IIS) Manager application to confirm that you successfully published the orchestration.

To confirm that you successfully published an orchestration

  1. Click Start, point to Programs, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.

  2. Click the name of your local computer, click Web Sites, click Default Web Sites, and then click WSE_BizTalk_Walkthrough_Proxy.

    In this virtual directory, you can view the files associated with the walkthrough.

    bizwse18.gif

  3. Right-click WSE_BizTalk_Walkthrough_BizTalk_Orchestration1_WSE_InPort.ashx, and then click Browse.

    You can now view the published Web Services Description Language (WSDL) file for the walkthrough in Internet Explorer.

  4. When you have finished, close the IIS Manager window and then close Internet Explorer.

3. Bind the receive ports and enlist the orchestration

After you publish the orchestration, you must bind the receive ports and enlist the orchestration.

To bind the receive ports and enlist the orchestration

  1. In Visual Studio, on the View menu, click BizTalk Explorer.

  2. In the BizTalk Configuration Databases tree, click the <local computer>.BizTalkMgmtdb.dbo node, and then click Receive Ports.

    You should see the WseWebPort_WSE_BizTalk_Walkthrough_Proxy/WSE_BizTalk_
    Walkthrough_BizTalk_Orchestration1_WSE_InPort receive port. This is the port that you created by using the publishing wizard.

  3. Expand the Orchestrations folder. You should see WSE_BizTalk_Walkthough.BizTalk_Orchestration1.

    If you do not see this orchestration, you may have to update the screen by using the Refresh button, located at the top of the BizTalk Explorer pane.

  4. Right-click WSE_BizTalk_Walkthrough.BizTalk_Orchestration1, and then click Bind.

  5. In the Port Binding Properties dialog box, in the WSE_InPort field, select WseWebPort_WSE_BizTalk_Walkthrough_Proxy/WSE_BizTalk_
    Walkthrough_BizTalk_Orchestration1_WSE_InPort from the drop-down menu.

  6. Under the Configurations folder, click Host.

  7. In the Host field, select a host from the drop-down menu, and then click OK.

    For this walkthrough, the name of the host is BizTalkServerApplication.

    bizwse19.gif

  8. Right-click WSE_BizTalk_Walkthough.BizTalk_Orchestration1, and then click Enlist.

  9. Right-click WSE_BizTalk_Walkthough.BizTalk_Orchestration1, and then click Start.

  10. In the BizTalk Explorer - Express Start dialog box, confirm that the listed Dependency Options are started, and then click OK.

    bizwse20.gif

    Before clicking OK, you may want to confirm that the BizTalk Service is running. To verify that BizTalk is running, click Start, point to Programs, and then click Computer Management. In the Computer Management screen, click the Services and Applications node, and then click Services. Scan the services list to confirm that the name of the host in the previous step is running as a BizTalkService BizTalk Group. For this walkthrough, the name on the list is BizTalk Service BizTalk Group : BizTalkServerApplication.

Now that you have successfully published your orchestration as a Web service, you can create and run the client application.

Step 3: Create and Run the Client Application

After you publish the orchestration, you can start coding the client application.

To create and run the client application, follow these steps:

  1. Create an empty project.

  2. Retrieve the URL of the walkthrough WSDL file.

  3. Create a Web service proxy.

  4. Add the Web service proxy to the client application.

  5. Write the code for the client application.

  6. Add the required references to the client application.

  7. Build and run the client application.

1. Create an empty project

Your first step is to create an empty project to hold your client application.

To create an empty project

  1. In Visual Studio, on the File.menu, point to New, and then click Project.

  2. In the New Project dialog box, select Visual C# Projects.

  3. In the Templates pane, click Console Application.

  4. In the Name field, type WSE_Walkthrough_Client, and then click OK.

    bizwse21.gif

2. Retrieve the URL of the walkthrough WSDL File

Before writing any code, you must retrieve the URL of the walkthrough WSDL file. You will use this URL to create a Web service proxy, and then add the proxy to your project.

To retrieve the URL of the walkthrough WSDL file

  1. Click Start, point to Programs, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.

  2. In the Internet Information Services node, click the local computer node, click Web Sites, click Default Web Sites, and then click WSE_BizTalk_Walkthrough_Proxy.

    bizwse22.gif

  3. Right-click WSE_BizTalk_Walkthrough_BizTalk_Orchestration1_WSE_InPort.ashx, and then click Browse.

    IIS Manager displays the selected file in Internet Explorer. You can view the URL of this file in the address field.

    bizwse23.gif

  4. Right-click the address in the address field, and then click Copy.

3. Create a Web service proxy

After you copy the URL of the walkthrough WSDL file, use a command-line tool to create a Web service proxy. You will use the created proxy to call the Web service.

To create a Web service proxy

  1. Click Start, click Run, type cmd, and then click OK.

  2. At the command prompt, locate the directory that contains the WSE walkthrough client.

  3. On the command line, call wsewsdl2.exe, using the URL of the walkthrough file as one parameter, and WSE_Client_Proxy.cs as the output parameter.

    Wsewsdl2.exe is the tool for creating a Web service proxy, and is located in the Microsoft WSE 2.0 tools directory. For this walkthrough, the full command-line instruction is as follows:

    \Program Files\Microsoft WSE\v2.0\Tools\Wsdl\Wsewsdl2.exe 
    http://localhost/WSE_BizTalk_Walkthrough_Proxy/WSE_PizTalk_
    Walkthrough_Biztalk_Orchestation1_WSE_InPort.ashx 
    WSE_Client_Proxy.cs
  4. Close the Command Prompt window.

4. Add the Web service proxy to your client application

After you create the Web service proxy, add the proxy to your project. You can then write code that calls the published orchestration.

To add the Web service proxy to your client application

  1. In Visual Studio, in Solution Explorer, right-click WSE_Walkthrough_Client, point to Add, and then click Add Existing Item.

  2. In the Add Existing Item dialog box, locate the folder in which you created the WSE_Client_Proxy.cs file.

  3. Right-click WSE_Client_Proxy.cs, and then click Open.

5. Write the code for the client application

You can now write the code for your client application.

To write the client application in Visual Studio

  • In Visual Studio, on the Class1.cs page, add the following lines of code to the file:

    static void Main(string[] args)
       {
       Request req = new Request();
       req.Name = "Joe";
       req.Address = "Right here";
       req.Age = "100";
       WSE_BizTalk_WalkThrough_BizTalk_Orchestration1_WSEIn_Port ws = 
    new WSE_BizTalk_WalkThrough_BizTalk_Orchestration1_WSEIn_Port();
       Response res = ws.Operation_1(req);
       Console.WriteLine(res.Comment);
       Console.ReadLine();
       }
6. Add the required references to the client application

Before you compile the code, you must add two references. These references are required for writing most WSE applications.

To add the required references to the client application

  1. In Solution Explorer, right-click References, and then click Add Reference.

  2. In the Add Reference dialog box, select the Microsoft.Web.Services2.dll component, and then click Select.

  3. Click System.Web.dll, click Select, and then click OK.

7. Build and run the client application

After you successfully add the required references, you can build and run your client application.

To build and deploy your solution

  1. In Visual Studio, on the Build menu, click Build Solution.

  2. On the Debug menu, click Start.

Step 4 (Optional): Sign the Message with an X509 Certificate

To sign the message with the X509 test certificate provided by the Web Services Enhancements (WSE) SDK, you must perform the following additional steps:

  1. Install the X509 test certificate.

  2. Import the test certificate.

  3. Publish the orchestration as a Web service with X509 certification.

  4. Add the published orchestration XML policy file to the client application project.

  5. Add a new configuration file to the client application project.

  6. Modify the published Web service configuration file.

  7. Rebuild and test the client application.

1. Install the X509 test certificate

First, install the X509 certificate in the Microsoft Management Console (MMC).

To install the X509 certificate

  1. Click Start, click Run,type MMC, and then press ENTER.

  2. In the Microsoft Management Console, on the File menu, click Add/Remove Snap-in.

  3. In the Add/Remove Snap-in dialog box, click Add.

  4. In the Add Standalone Snap-in dialog box, in the Snap-in column, click Certificates, and then click Add.

    bizwse24.gif

  5. In the Certificates snap-in dialog box, select Computer Account, and then click Next.

  6. In the Select Computer dialog box, confirm that Local Computer is selected, and then click Finish.

  7. In the Add Standalone Snap-in dialog box, click Certificates, and then click Add.

  8. In the Certificates Snap-in dialog box, select My user account, and then click Finish.

  9. In the Add Standalone Snap-in dialog box, click Close.

  10. In the Add/Remove Snap-in dialog box, click OK.

    bizwse25.gif

2. Import the test certificate

After you install the X509 certificate in the MMC, import the certificate to your local account.

To import the test certificate

  1. In the MMC snap-in, click the Certificates Node (Local Computer) node, click the Personal node, right-click Certificates, select All Tasks, and then click Import.

  2. On the Welcome to the Certificate Import Wizard page, click Next.

  3. On the File to Import page, locate the Client Private .pfx test certificate that is included with the Microsoft WSE SDK, and then click Next.

    For this walkthrough, the file path is C:\Program Files\Microsoft WSE\v2.0\Samples\Sample Test Certificates\Client Private.pfx.

    bizwse26.gif

  4. On the Password page, in the Password field, enter wse2qs, and then click Next.

    Because this is a test sample, you are using the test certificate. Do not use the test certificate in production-ready code.

  5. On the Certificate Store page, confirm that Place all certificates in the following store is selected, confirm that the Certificate store: drop-down list has the Personal field selected, and then click Next.

    bizwse27.gif

  6. On the Completing the Certificate Import Wizard page, click Finish.

  7. In the confirmation dialog box, click OK.

  8. In the MMC snap-in, you should now see the WSE2QuickStartClient certificate in the Issued To column.

3. Publish the orchestration as a Web service with X509 certification

Now that you have imported the X509 test certificate, you can republish the orchestration with X509 certification.

To publish the orchestration as a Web service with X509 certification

  1. In Visual Studio, on the File menu, point to Open, and then click Project.

  2. In the Open Project dialog box, open the WSE Biztalk Walkthrough folder, right-click the WSEBizTalk Walkthrough.sln file, and then click Open.

  3. Select Tools, and then click BizTalk WSE Web Services Publishing Wizard.

  4. On the Welcome to the BizTalk WSE Web Services Publishing Wizard page, click Next.

  5. On the Create Web Service page, confirm that Publish BizTalk orchestrations as Web Services is selected, and then click Next.

  6. On the BizTalk Assembly page, confirm that the BizTalk assembly file field contains the path for the WSE BizTalk Walkthrough assembly, and then click Next.

  7. On the Orchestrations and Ports page, confirm that the WSE_InPort check box is selected, and then click Next.

  8. On the Web Services Properties page, confirm that the Target namespace of the Web Service field contains the default name used in previous steps, and then click Next.

    For this walkthrough, the name used previously was http://tempuri.org.

  9. On the Policy Information page, click the Request tab.

  10. In the Token type combo box, select X509.

  11. In the X509 Certificate box, type the value of the certificate name, and then click Next.

    For this walkthrough, the value of the certificate name is CN=WSE2QuickStartClient.

    bizwse28.gif

  12. On the Web Service Project page, select the Overwrite existing project check box, select the Allow anonymous access to Web Service check box, select the Create BizTalk Server receive locations check box, and then click Next.

  13. On the Web Service Project Summary page, click Create.

  14. On the Completing the BizTalk WSE Web Services Publishing Wizard page, click Finish.

4. Add the orchestration XML policy file to the client application project

Now that you have published the orchestration with the test certificate, you must modify the client application to use the correct XML policy files.

To add the orchestration XML policy file to the project

  1. Right-click Start, click Explore, and then locate your WSE_BizTalk_Walkthrough_Proxy folder.

    For this walkthrough, the folder is located at C:\Inetpub\wwwroot\WSE_BizTalk_Walkthrough_Proxy.

    In this folder, you can view the PolicyCache.xml file that was generated because of the modifications made to the Web Services Properties page in the previous procedure.

  2. Right-click the PolicyCache.xml file, and then click Copy.

  3. Move to your Visual Studio WSE_Walkthrough_Client project, right-click the name panel, and then click Paste.

    For this walkthrough, the Visual Studio project is located at C:\Documents and Settings\<login account>\My Documents\Visual Studio Projects\WSE_Walkthrough_Client\WSE_Walkthrough_Client.

  4. In Visual Studio, on the File menu, point to Open, and then click Project.

  5. Locate the WSE_Walkthrough_Client folder, select WSE_Walkthough_Client.sln, and then click Open.

  6. In Solution Explorer, right-click WSE_Walkthrough_Client, point to Add, and then click Add Existing Item.

  7. In the Add Existing Item - WSE_Walkthrough_Client dialog box, select the PolicyCache.xml file that you pasted into the project, and then click Open.

5. Add a new configuration file to the client application project

After you add the orchestration walkthrough policy file to the client project, you must create the configuration file for the client itself.

To add an application configuration file to the project

  1. In Solution Explorer, right-click WSE_Walkthrough_Client, point to Add, and then click Add New Item.

  2. In the Add Existing Item - WSE_Walkthrough_Client dialog box, confirm that the Local Project Items node is selected in the Categories pane, select Application configuration file in the Templates pane, and then click Open.

    You can name this configuration file anything that you want. For this walkthrough, the name of the file is App.config.

  3. Add the following code to the App.config file:

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
      <configSections>
        <section name="microsoft.web.services2"
    type="Microsoft.Web.Services2.Configuration.WebServicesConfiguration
    , 
    Microsoft.Web.Services2, Version=2.0.1.0, Culture=neutral,
    PublicKeyToken=31bf3856ad364e35" />
      </configSections>
      <microsoft.web.services2>
        <security>
          <x509 storeLocation="LocalMachine" verifyTrust="true"
    allowTestRoot="true" allowRevocationUrlRetrieval="true" 
    allowUrlRetrieval="false" />
        </security>
        <policy>
          <cache name=" C:\Documents and Settings\<login account>\My 
    Documents\Visual Studio 
    Projects\WSE_Walkthrough_Client\WSE_Walkthrough_Client
    \PolicyCache.xml" />
        </policy>
      </microsoft.web.services2>
    </configuration>

    Note that the security section of the configuration file states that the store location is the local machine and that the application is using a test root. Also note that the policy section contains the path of the policycache.xml file. You will have to change this path to match where you copied your file.

  4. On the File menu, click Save All.

6. Modify the published Web service configuration file

After you create the new configuration file, you must modify the Web.config file of the orchestration to allow for using test certificates.

Modifying the published Web service configuration file

  1. Right-click Start, click Explore, and then move to your IntetPub\wwwroot\WSE_BizTalk_Walkthrough_Proxy directory.

  2. Right-click the Web.config file, and then click Open with Visual Studio .NET 2003.

  3. In Visual Studio, change the allowTestRoot="false" element to allowTestRoot="true".

  4. On the File menu, click Save.

  5. On the File menu, click Exit.

7. Rebuild and test the client application

Finally, you can rebuild and test the client application.

To rebuild and test the client application

  1. In Visual Studio, click the WSE_Client_Proxy.cs tab, and then on the Build menu, click Build Solution.

  2. On the Debug menu, click Start.

Conclusion

You have now completed the walkthrough for BizTalk Adapter for Web Services Enhancements 2.0.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft