Editar

Compartilhar via


Step 1: Generate Schema for Operations

Step 1 of 2

Time to complete: 5 minutes

Objective: In this step, you generate schemas for the operations that you perform on the SQL Server database using the SQL adapter. For this tutorial, you must generate schema for the following:

  • Notification (inbound operation).

  • UPDATE_EMPLOYEE stored procedure (outbound operation).

  • Insert operation on the Purchase_Order table (outbound operation).

Prerequisites

  • Be familiar with the creating BizTalk projects in Visual Studio. For more information, see Using the BizTalk Project System.
  • Sign in as a member of the BizTalk Server Administrators group.

Generate schema for operations

  1. Create a new BizTalk project in Visual Studio. For this tutorial, name the project as Employee_PurchaseOrder.

  2. Connect to the ADAPTER_SAMPLES SQL Server database using the Consume Adapter Service Add-in. For instructions on how to connect using Consume Adapter Service Add-in, see Connect to SQL Server in Visual Studio Using Consume Adapter Service Add-in.

    Note

    You can also connect to SQL Server using the Add Adapter Metadata Wizard. However, for this tutorial you will use the Consume Adapter Service Add-in.

  3. Generate schema for the Notification inbound operation.

    1. After connecting to the ADAPTER_SAMPLES database, in the Consume Adapter Service Add-in, from the Select contract type list, select Service (Inbound operations).

    2. From the Select a category box, click the root node (/).

    3. From the Available categories and operations box, select Notification and click Add. The Notification operation is now displayed in the Added categories and operations box. Click OK.

  4. Generate schema for the UPDATE_EMPLOYEE stored procedure and the Insert operation on Purchase_Order table.

    1. Repeat step 2 to connect to ADAPTER_SAMPLES database in SQL Server using the Consume Adapter Service Add-in.

      Note

      You cannot generate schema for inbound and outbound operations at the same time. Hence, in step 3, after you click OK to generate the schema for Notification operation, the Consume Adapter Service Add-in closes. You must reconnect to the SQL Server database to generate schema for outbound operations.

    2. From the Select contract type list, select Client (Outbound operations).

    3. From the Select a category box, click the Strongly-Typed Procedures node. From the Available categories and operations box, select UPDATE_EMPLOYEE, and then click Add.

      Important

      The UPDATE_EMPLOYEE stored procedure is also available under the Procedures node. However, if you generate schema for the stored procedure from under the Procedures node, the response message schema is not available at design-time but is received with the response message after you execute the stored procedure.

      In this tutorial, you will map the response schema of the stored procedure to the input schema of the Insert operation on the Purchase_Order table. Therefore, you will need the schema for the UPDATE_EMPLOYEE stored procedure at design-time and you must select the stored procedure from under the Strongly-Typed Procedures. By doing so, you will get the schema of the stored procedure at design-time.

    4. From the Select a category box, expand the Tables node, and click the node for Purchase_Order table. From the Available categories and operations box, select Insert, click Add, and then click OK.

What did I just do?

In this step, you generated schemas for Notification (inbound operation), UPDATE_EMPLOYEE stored procedure, and Insert operation on the Purchase_Order table. After you generate the schema, the Consume Adapter Service Add-in adds the following files to your BizTalk project:

Next Steps

You create messages in the BizTalk project for the schemas in Step 2: Create Messages for BizTalk Orchestrations.

See Also

Lesson 1: Generate Schemas and Create Messages