Editar

Partilhar via


Step 5 (On Premises): Generate the Schema for Inserting a Message inito SalesOrder Table

According to the business scenario, the X12 sales order message sent from Contoso must be inserted into Northwind’s SalesOrder table if the quantity ordered is greater than 100. To insert a message into a SalesOrder table, you must generate the schema for the Insert operation on the table. In this topic, you will create a BizTalk Server solution, and then use the Consume Adapter Service Add-in to generate the schema for performing an Insert operation on the SalesOrder table.

To generate the schema for Insert operation on SalesOrder table

  1. Create a BizTalk Server Visual Studio project. From the Visual Studio File menu, click New, and then click Project. In the New Project dialog box, from the list of installed templates, click BizTalk Projects, and then select Empty BizTalk Server Project. For the project name enter OrderProcessingDemo and then click OK.

  2. Right-click the project name in Solution Explorer, point to Add, and then click Add Generated Items.

  3. In the Add Generated Items dialog box, select Consume Adapter Service, and then click Add. The Consume Adapter Service Add-in opens.

  4. From the Select a binding drop-down list, select sqlBinding, and then click Configure.

  5. In the Configure Adapter dialog box, click the Security tab, and from the Client credential type drop-down list, do one of the following:

    Click this To do this
    None Connect to SQL Server using Windows authentication.
    Windows Connect to SQL Server using Windows authentication.
    Username Specify the user name and password to connect to SQL Server by specifying credentials for a user defined in SQL Server database. Note that the user name and password are case-sensitive. Note: If you leave the User name and Password fields as blank, the adapter connects to SQL Server using Windows authentication.
  6. Click the URI Properties tab, and then specify values for the connection parameters. For more information about the connection URI for the SQL adapter, see SQL Server Connection URI.

    Note

    If the connection parameters contain any reserved characters, you must specify them as-is in the URI Properties tab, that is, without using any escape characters. However, if you specify the URI directly in the Configure a URI field and the connection parameters contain reserved characters, you must specify the connection parameters using proper escape characters.

    Note

    If you do not specify any values in the URI property tab, the Consume Adapter Service Add-in puts the URI as mssql://.//. In such a case, the adapter connects to the default database and the default database instance on the local computer.

  7. In the Configure Adapter dialog box, click OK. In the Consume Adapter Service dialog box, click Connect.

  8. From the Select a category box, expand Tables, and then click the SalesOrder table.

  9. From the Available categories and operations box, select Insert, click Add, and then click OK. New items are added to the Solution Explorer. The schema file (TableOperation.dbo.SalesOrder.xsd) is the generated schema for performing an Insert operation on the SalesOrder table.

See Also

Tutorial 4: Creating a Hybrid Application Using BizTalk Server 2013