Step 5: Configure an XML Request-Reply Bridge

 

Important

Microsoft Azure BizTalk Services (MABS) is being retired, and replaced with Azure Logic Apps. If you currently use MABS, then Move from BizTalk Services to Logic Appsprovides some guidance on moving your integration solutions to Logic Apps.

If you're brand new to Logic Apps, then we suggest getting started here:

Lists the steps to configure an XML Request-Reply Bridge. The bridge receives XML sales order messages sent from Contoso. To configure a bridge for the scenario in this tutorial, you must:

  • The bridge must validate all incoming XML messages against the ECommerceSalesOrder.xsd schema. This is the schema in which Northwind expects Contoso to send sales order messages.

  • The bridge must transform the message in ECommerceSalesOrder schema to the schema for inserting data into the SalesOrder SQL Server table. To do so, the bridge must use the SalesOrder_SQL Transform.

  • The bridge must route the message to the LOB Relay endpoint. While routing the message, the bridge must also include the relevant headers that must be added to successfully insert messages into the SalesOrder table.

This topic lists the steps to achieve these tasks as part of a bridge configuration.

To configure the XML Request-Reply Bridge

  1. Double click on the .bcs file in the EAIEDITutorial project to open the message flow.

  2. Right-click anywhere on the design area and select Properties. In the BizTalk Service URL property, verify that you have the BizTalk Services URL entered. This is the name that you entered in Azure classic portal when creating the BizTalk Services.

  3. Right click the LOB Target (added in Step 3: Create and Configure LOB Targets) and select Properties. Under Operations tab, copy the value of the first operation and save it to a notepad. This value is used later. For this tutorial, the value is TableOp/Insert/dbo/SalesOrder.

  4. Drag and drop an XML Request-Reply Bridge from toolbox to the message flow area. You use a XML Request-Reply Bridge to send the response back to the client that the sales order data is inserted successfully in the SalesOrder table.

  5. Configure the XML Request-Reply Bridge:

    1. Double-click the XML Request-Reply Bridge on the message flow area.

    2. Add the request and response schemas to the Message Type box:

      Request schema

      SalesOrder (with the namespace https://ECommerceSalesOrder.Inbound)

      Response schema

      InsertResponse

      To add request and response schemas, see Create an XML Request-Reply Bridge.

    3. Add the SalesOrder_SQL transform to the Transforms stage in the request path of the bridge. Select the XmlTransform activity under Transform stage. In Properties, select the ellipsis (…) button next to the Maps property. In Maps Selection, select SalesOrder_SQL.trfm Transform and select OK. The selected map is now reflected in the bridge configuration.

    4. Leave everything else in the bridge configuration to its default value.

  6. Go back to the message flow area (MessageFlowItinerary.bcs). Select the Connector in the toolbox and join the XML Request-Reply Bridge and orderprocessing_sqlgetorder entity.

  7. Set the filter condition on the connector between the bridge and the LOB Relay entity. The business process between Contoso and Northwind does not include any condition, like only specific messages must be inserted into the SalesOrder table. Hence, the filter condition must allow all messages to go through.

    1. Select the connector between XML Request-Reply Bridge and the LOB Target entity.

    2. In Properties, select the ellipsis (…) button for Filter Condition.

    3. In Route Filter Configuration, set the filter condition to Match All.

    4. Select OK.

  8. To insert data into the SalesOrder table using the XML message, the message header must include the Action SOAP header. You can set headers on the messages being sent from a bridge using the Route action property, which is available on the connector between the bridge and the LOB Relay.

    1. On the message flow area, select the connector between XML Request-Reply Bridge and the orderprocessing_sqlgetorder entity.

    2. In Properties, select the ellipsis (…) button for Route Action. In Route Actions, select Add to open the Add Route Action dialog box. In Add Route Action, set the properties as shown in the following table:

      Under Property (Read From)

      Expression

      Set this to TableOp/Insert/dbo/SalesOrder

      Important

      Always enter the value for an expression within single quotes.

      **Under Destination (Write-To)**

      Type

      Set this to SOAP.

      Identifier

      Set this to Action.

      With this configuration, when the bridge routes the message to the LOB Relay, the message includes an **Action** header and the value of the header is set to *TableOp/Insert/dbo/SalesOrder*; which is the action required to insert a message in the **SalesOrder** table. 3. Select **OK** in the **Add Route Action** and the **Route Actions** windows. Select **Save** to save changes to a BizTalk Service project.

      See Also

      Create and Deploy the BizTalk Services Project