Step 4: Create and Deploy the XML Bridge
Updated: November 27, 2015
In this topic, you create an XML One-Way Bridge that acts as a connector between the EDI Receive bridge and the relay endpoint for the ORDERS05 IDOC in SAP. After configuring the bridge, you connect it to the SAP relay endpoint, and then deploy the solution.
To configure the XML Bridge
In the SAPIntegration project, from the Solution Explorer, double-click the MessageFlowItinerary.bcs file to open the bridge design area.
Right-click anywhere on the BizTalk Service project design area, select Properties, and update the BizTalk Service URL property to include your BizTalk Services name. This is the name that you provided in Azure Management Portal while provisioning the BizTalk Services.
From the Toolbox, drag and drop the XML One-Way Bridge component to the bridge design area.
Right-click the XML One-Way Bridge, select Properties, and change the value for Entity Name and Relative Address properties to B2BConnector. As a result, the complete endpoint URL where the bridge is deployed, which is shown in the Runtime Address property, will resemble https://<mybiztalkservicename>.biztalk.windows.net/default/B2BConnector. This is where the EDI Receive bridge sends the ORDERS05 PO message.
Double-click the XML One-Way Bridge to open the Bridge Configuration design area. Because this bridge only routes the message from the EDI Receive bridge to the relay endpoint, there’s not much configuration required for each stage in the bridge stage other than specifying the message types of the message that this bridge routes. To specify the message type, on the XML One-Way Bridge design surface, within the Message Types box, select the add icon [ ] to open the Message Type Picker dialog box.
In Message Type Picker, from the Available message types box, select the schema for the request message and then select the right arrow icon [ ], and then select OK. For this tutorial, select the Send schema (http://Microsoft.LobServices.Sap/2007/03/Idoc/3/ORDERS05//700/Send). The selected schema is listed under the Request Message Type box.
Save the bridge configuration.
To connect the bridge to the relay endpoint
In the SAPIntegration project, from the Toolbox, select the Connection component, and connect the XML One-Way Bridge component with the SAP relay endpoint you already added in Step 2: Expose a Relay Endpoint to Invoke Operations on ORDERS05 IDOC.
Set the filter condition on the connection. The routing condition for this scenario is to route all messages to the LOB Target. To do so, select the connecting line, and from the Properties grid, select the ellipsis (…) in the Filter Condition property, and then select Match All. This ensures that all messages that come to the bridge are routed to the relay endpoint.
Set the Route Action property on the connection. Before you set the route action, we must understand why it is required. The message sent from the EDI receive bridge to the relay endpoint must have the Action SOAP header set on it. This header defines what operation must be performed on the SAP system. The message that comes from the EDI receive pipeline does not have this header set. Hence, in this intermediary XML bridge, you set the route action on the message before it is sent the relay endpoint. As part of the route action, you add the required header on the message. Perform the following steps to set the route action.
Find out the value that will be set for the Action SOAP header message. To do so, right-click the SAP relay endpoint from the Server explorer, and from the Properties grid, expand Operations, and copy the value. For this tutorial, the value is http://Microsoft.LobServices.Sap/2007/03/Idoc/3/ORDERS05//700/Send:
Go back to the bridge design area, select the connection between the bridge and the SAP relay, and from the Properties grid, select the ellipsis (…) in the Route Action property. In the Route Actions dialog box, select Add to open the Add Route Action dialog box. In Add Route Action:
Under Property (Read From) section, select Expression and specify the value that you copied earlier.
Make sure you specify the value for Expression within single quotes.
Under Destination (Write-To) section, set the Type to SOAP and the Identifier to Action:
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 an Enterprise Application Integration project.
Save the project. The final bridge configuration resembles the following:
To deploy the solution
In Visual Studio, right click the SAPIntegration solution, and then select Build Solution.
Once the build succeeds, right click the SAPIntegration solution, and then click Deploy Solution.
In the deployment window, the Deployment Endpoint is a read-only property and the value is derived from the BizTalk Service URL/Namespace set in the message flow surface. However, you must provide the ACS Namespace for BizTalk Services, Issuer Name, and Shared Secret.
Select Deploy. The Visual Studio Output pane displays the deployment progress and result. The URL where the bridge is deployed is also displayed in the Output pane. For this tutorial, the bridge is deployed at http://<mybiztalkservicename>.biztalk.windows.net/default/B2BConnector.