Configure dynamic ports in the SAP adapter
Use message context properties
In BizTalk Server, you can configure dynamic ports for a WCF-Custom adapter. Because SAP adapter is a WCF-based adapter, you can dynamically configure a port for the SAP adapter by using message context properties.
For the SAP adapter, the URI, action, and binding might be determined from a property on an incoming message, and then specified in the Expression shape, as shown in the following example:
Request2=Request1;
Request2(WCF.Action)="http://Microsoft.LobServices.Sap/2007/03/Rfc/RFC_CUSTOMER_GET";
Request2(WCF.BindingType)="sapBinding";
Request2(WCF.UserName)="YourUserName";
Request2(WCF.Password)="YourPassword";
SendPort(Microsoft.XLANGs.BaseTypes.Address)="sap://CLIENT=800;LANG=EN;@A/YourSAPHost/00";
SendPort(Microsoft.XLANGs.BaseTypes.TransportType)="WCF-Custom";
Note
If you are using a WCF-SAP adapter in BizTalk Server Administration console, you can also specify the transport type as SendPort(Microsoft.XLANGs.BaseTypes.TransportType)="SAPAdapter"
, where SAPAdapter is the name with which you added the WCF-SAP adapter in BizTalk Server Administration console.
In the preceding example:
Request2 message is being created from Request1 message. Both the messages map to an operation schema, which is generated using the Consume Adapter Service BizTalk Project Add-in.
SendPort is the name of the logical send port in the BizTalk orchestration.
The Expression shape is part of the BizTalk orchestration. When you deploy the orchestration, the WCF-Custom send port is also created.
For more information on configuring dynamic ports, see Configuring Dynamic Send Ports Using WCF Adapters Context Properties.