Step 6: Configure an XML One-Way 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:

This topic provides instructions on how to configure an XML One-Way Bridge. As part of the XML One-Way Bridge configuration, we’ll do the following:

  • Configure the bridge to process the flat-file message of the type we created earlier.

  • Through promoted properties, extract the value of the OrderId record (before message transformation) and TotalAmount (after message transformation). We’ll track the values for these two as the message gets processed by the bridge.

  • Configure the bridge to use the Map.trfm Transform we created earlier.

  • Configure the bridge to track the messages it processes.

To configure an XML One-Way Bridge

  1. Drag and drop an XML One-Way Bridge from toolbox to the Bridge Configuration design area. For the Entity Name and Relative Address properties of the bridge, enter ProcessOrders for the value.

  2. Double-click the XML One-Way Bridge on the itinerary designer.

  3. On the XML One-Way Bridge design area, within the Message Types box, select the add icon [ Add icon ] to open the Message Type Picker dialog box.

  4. In the Message Type Picker dialog box, from the Available message types box, select the PurchaseOrder message type, select the right arrow icon [ Arrow Icon ] to associate the request schema with the XML One-Way Bridge, and then click OK. The schema that you selected should now be listed under the Request Message Type section.

  5. Configure the pre-transform Enrich stage to extract the value of the OrderId element in the source schema.

    1. Within the Enrich stage, select the Enrich activity, and then from the Properties pane, select the ellipsis button (…) against the Properties property to open the Property Definition dialog box.

    2. In Property Definitions, select Add to open the Add Property dialog box. In the Add Property dialog box, do the following:

      Section

      Field Name

      Description

      Source (Read From)

      Type

      Select Xpath from the drop-down list.

      Source (Read From)

      Identifier

      Specify the Xpath query to extract the value of the OrderId from the request schema.

      Tip

      You can get the Xpath query from the schema editor. Select the OrderId element in the schema editor, and in the Properties window look for the value of the Instance Xpath property. That should be the Xpath query for the node.

      Source (Read From)

      Message Type

      Select the schema pertaining to PurchaseOrder.

      Property (Write To)

      Property Name

      Specifies the name of the property that you are defining. For this tutorial, specify OrderId.

      Property (Write To)

      Data Type

      Specifies the data type for the property. For this tutorial, specify string.

      3. Select **OK** in the **Add Property** dialog box and then select **OK** in the **Property Definition** dialog box.
      1. Configure the bridge to use the Transform created earlier. Within the Transform stage, select the Xml Transform activity, and then from the Properties window, select the ellipsis button (…) against the Maps property to open the Map Selection dialog box.

        From the list of Transforms displayed in the dialog box, select Map.trfm. You created this Transform in the previous steps.

      2. Configure the post-transform Enrich stage to extract the value of the TotalAmount element in the source schema.

        1. Within the Enrich stage, select the Enrich activity, and then from the Properties pane, select the ellipsis button (…) against the Properties property to open the Property Definition dialog box.

        2. In the Property Definitions dialog box, select Add to open the Add Property dialog box. In the Add Property dialog box, do the following:

          Section

          Field Name

          Description

          Source (Read From)

          Type

          Select Xpath from the drop-down list.

          Source (Read From)

          Identifier

          Specify the Xpath query to extract the value of the TotalAmount from the request schema.

          Source (Read From)

          Message Type

          Select the schema pertaining to Insert.

          Property (Write To)

          Property Name

          Specifies the name of the property that you are defining. For this tutorial, specify TotalAmount.

          Property (Write To)

          Data Type

          Specifies the data type for the property. Specify long.

        3. Select OK in the Add Property dialog box and then select OK in the Property Definition dialog box.

        4. Save changes to the project.

      3. Configure the bridge to track message properties and other data, for the OrderId and TotalAmount properties you just promoted.

        1. Go back to the MessageFlowItinerary.bcs file, select the XML One-Way Bridge, and from the Properties window, select the ellipsis (…) against Track Properties.

        2. Select the Track message processing events check box to track detailed information such as when a stage starts, completes, or faults; when an activity within a stage starts, completes, or faults; whether an artifact gets retrieved, etc.

        3. Optional. Select the Track all message properties check box, and then select the properties you want to track. Note that the dialog box lists the properties that you promoted within any of the Enrich stages in a bridge.

          For this tutorial, select OrderId and TotalAmount.

        4. Select OK.

      4. Save the bridge configuration and go back to the Bridge Configuration designer area.

      5. Connect the FTP source component to the XML One-Way Bridge and the bridge to the LOB Relay entity.

      6. Set the filter condition on the connector between the bridge and the LOB Relay entity.

        1. Select the connector between XML One-Way Bridge and the LOB Relay entity.

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

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

        4. Select OK.

      7. Set the Route action so that the outgoing message to the LOB application has a SOAP action header.

        1. Open Server Explorer and navigate to the SQL Server LOB Relay we created earlier. Right click the relay, select Properties, and for the Operations property, copy the value of the first operation.

        2. On the Bridge Configuration design area, click the connector between XML One-Way Bridge and the LOB Relay entity.

        3. In Properties, select the ellipsis (…) button for Route Action. In Route Actions, select Add to open the Add Route Action dialog box. In the Add Route Action dialog box, do the following:

        4. Under Property (Read From) section, select Expression, and then paste the value that you copied.

          Important

          You must always specify the value for an expression within single quotes.

        5. Under Destination (Write To) section, set the Type to SOAP and the Identifier to Action.

          Important

          You must always specify the value for an expression within single quotes.

        6. Select OK in the Add Route Action dialog box to add the route action. Select OK in the Route Actions dialog box and then select Save to save changes to a BizTalk Service project.

      See Also

      Tutorial: Using BizTalk Bridges to Insert Flat File Messages into an On-premises SQL Server