Step 2: Configure a WCF-Custom One-way Send Port
Time to complete: 10 minutes
Objective: In this step, you configure a WCF-Custom port to send the flat-file IDOC to an SAP system. After configuring the port, you configure the BizTalk application to use the WCF-Custom send port.
Prerequisites
You must have built and deployed your vPrev BizTalk project to send IDOCs to an SAP system.
To configure a WCF-Custom one-way send port
Start the BizTalk Server Administration console.
In the console tree, expand BizTalk Group, and then expand Applications.
Expand the application under which you want to create the send port.
Right-click Send Ports, point to New, and click Static One-way Send Port.
In the Send Port Properties dialog box, on the General tab, type a name for the send port.
From the Type drop-down list, select WCF-Custom, and then click Configure.
In the WCF-Custom Transport Properties dialog box, do the following:
Click the General tab, and in the Address (URI) field, specify the connection URI to send messages to the SAP system. For more information about the connection URI, see Create the SAP System Connection URI.
On the General tab, in the Action text box, type the action for the operation. To send a flat-file IDOC, you must use the SendIdoc operation exposed by the WCF-based SAP adapter. SendIdoc operation enables adapter clients to send IDOCs having a weakly-typed schema. For more information, see Operations on IDOCs in SAP. The following figure shows the Action text box with the action for the SendIdoc operation.
Click the Binding tab, and from the Binding Type drop-down list, select sapBinding.
Click the Credentials tab and specify the credentials to connect to an SAP system.
Click the Messages tab, and in the Outbound WCF message body section, choose the Template option.
In the XML text box, specify the template that will be used to construct the WCF message. By doing so, you create a message that conforms to the SendIdoc operation for the WCF-based SAP adapter. For more information about the message structure for the SendIdoc operation, see Message Schemas for IDOC Operations.
For the SendIdoc operation, you must specify the following template:
<SendIdoc xmlns="http://Microsoft.LobServices.Sap/2007/03/Idoc/"> <idocData><bts-msg-body xmlns="http://www.microsoft.com/schemas/bts2007" encoding="string"/></idocData> </SendIdoc>
In the preceding template, the
bts-msg-body
is XML IDOC that is created using the flat-file disassembler associated with the file receive port. The XML IDOC is encapsulated in the SendIdoc message.Click Apply, and then click OK.
In the Send Port Properties dialog box, from the Send handler drop-down list, select BizTalkServerApplication.
From the Send pipeline drop-down list, select ConvertToFlatFile. This flat-file assembler pipeline is already a part of the vPrev BizTalk project and is used to convert an XML IDOC to a flat-file IDOC.
Click OK.
To configure the BizTalk application
In the BizTalk Server Administration console, expand BizTalk Group, expand Applications, and expand the BizTalk Application where the orchestration is deployed.
Right-click the BizTalk application, and then select Configure.
From the left pane, click the orchestration to configure. From the right pane, from the Host drop-down list, select a BizTalk host instance.
Under the Bindings box, map the logical ports of the BizTalk orchestration to the physical ports in the BizTalk Server Administration console.
Select the file port where you will drop the flat-file IDOC.
Select the WCF-Custom send port you created earlier in this topic.
Click OK.
For more information on configuring apps in BizTalk Server, see How to Configure an Application.
Next Steps
You have now completed migration of your vPrev BizTalk project to a BizTalk project that sends IDOCs to an SAP system using the WCF-based SAP adapter. You must now test the migrated BizTalk application by sending a flat-file IDOC, as described in Step 3: Test the Migrated Application.