Muokkaa

Jaa


Configure a physical port binding using a port binding file to SAP

When you use the Consume Adapter Service BizTalk Project Add-in to generate metadata for an SAP artifact, other than the schema files, the Consume Adapter Service Add-in also generates a port binding file. You can import this binding file into your BizTalk application to create a physical send or receive port. Reuse SAP adapter bindings includes steps to import binding files. If you import this binding file, you do not have to manually create a physical send or receive port.

Important

While using the Consume Adapter Service Add-in, if you do not specify a value for a binding property of type string and whose default value is null then that binding property will not be available in the binding file. You must manually add the binding property and its value in the binding file, if required.

Creating a port using the port binding file always creates a two-way send or receive port. If you want to create one-way port, you can create it manually by using the steps at Manually configure a physical port binding to the SAP adapter. Or, you can follow the workarounds documented in this topic to modify the port binding file to create one-way ports.

Important

Using the Add Adapter Metadata Wizard does not create a port binding file using which you can create a WCF-SAP port. However, you could make some changes to the port binding file generated by the Consume Adapter Service Add-in and use it to create a WCF-SAP port. For more information, see Configuring a WCF-SAP Port Using the Port Binding File Generated Using Consume Adapter Service Add-in.

Following are some key points that you must understand with respect to the binding file generated by the Consume Adapter Service Add-in:

  • The files are created with a specific naming convention. If you generated metadata for outbound operations, that is to send messages to the SAP system, the name of the file is WcfSendPort_SAPBinding_Custom.bindinginfo.xml.

    If you generated metadata for inbound operations, that is to receive messages from the SAP system, the name of the file is WcfReceivePort_SAPBinding_Custom.bindinginfo.xml.

  • The file contains information about the binding configuration, the binding type, the endpoint URI, and the port action based on the operations for which metadata was generated. When you import this binding file to create a port, all the relevant information required to configure a physical port is automatically set on the port.

    Important

    By default, the action on the send port is mapped to the operation name for which you generate metadata. For example, if you generate metadata for RFC_CUSTOMER_GET, the action on the port is set to <Operation Name="RFC_CUSTOMER_GET" Action="http://Microsoft.LobServices.Sap/2007/03/Rfc/RFC_CUSTOMER_GET " />. However, the operation name on the logical send port you create in the BizTalk orchestration might not be the same. You must ensure that the operation name in the logical port (in the BizTalk orchestration) and the physical send port (in BizTalk Server Administration console) are the same. If not, you will receive an error while sending messages to the SAP system through the send port.

  • You only need to provide the credentials for the port to connect to the SAP system. While the binding file does retain the username with which to connect, for security reasons the binding file does not contain the password.

Key Considerations for Using the Port Binding File

  • When you import the binding file, you might get a dialog message informing that the BizTalk application name in the binding file does not match the application name to which you are importing the binding file. You can safely ignore this message and continue.

  • The binding file also contains names of ports and receive locations. If the BizTalk application to which you are importing the binding file creates a port or a receive location that has the same name as an already existing port in the same BizTalk application, you will get an error. You must manually edit the bindings file to specify a unique name for the ports or receive locations.

  • The binding file also contains information about the connection URI. If the binding file creates a receive location that has the same receive URI as an already existing receive location in the same BizTalk application, you will get an error. You must manually edit the binding file to specify a unique URI.

  • By default, the port binding file always contains definitions for two-way ports (send or receive). When you import this file in a BizTalk application, it creates a two-way send or receive port. However, you may have an orchestration that has a one-way send or receive port. So, when you configure such an orchestration and use the port created by importing the binding file, the port is not available in the list. This happens because the logical port you created as part of the orchestration is a one-way port while the physical port created in the orchestration is a two-way port. In such cases, you can edit the bindings file to make the following changes:

    For this Do this
    To edit the port bindings file to configure a one-way send port 1. In the following excerpt, change the value of IsTwoWay property to false. Originally, this is set to true.
    <SendPort Name="port_name" IsStatic="true" IsTwoWay="false" BindingOption="0">
    2. Comment out the following excerpts:
    <ReceivePipeline Name="Microsoft.BizTalk.DefaultPipelines.XMLReceive" FullyQualifiedName="Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=token" Type="1" TrackingOption="None" Description=""/>
    <ReceivePipelineData xsi:nil="true" />
    To edit the port bindings file to configure a one-way receive port 1. In the following excerpt, change the value of IsTwoWay property to false. Originally, this is set to true.
    <ReceivePort Name="port_name" IsTwoWay="false" BindingOption="1">
    2. Comment out the following excerpts:
    <SendPipeline Name="Microsoft.BizTalk.DefaultPipelines.XMLTransmit" FullyQualifiedName="Microsoft.BizTalk.DefaultPipelines.XMLTransmit, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=token" Type="2" TrackingOption="None" Description="" />
    <SendPipelineData xsi:nil="true" />
    <SendPipelineData xsi:nil="true" />

Configuring a WCF-SAP Port Using the Port Binding File Generated Using Consume Adapter Service Add-in

The Consume Adapter Service Add-in also creates a port binding file that you can import in BizTalk Server Administration console. You can use the same port binding file to also create the BizTalk WCF-SAP port in BizTalk Server Administration console. However, before creating WCF-SAP port you must perform the following tasks to modify the port binding file.

  1. Open the port binding file in a text editor.

  2. Search and replace “WCF-Custom” with the name with which you added the WCF-SAP adapter in BizTalk Server Administration console. For example, if you added the WCF-SAP adapter as “SAPAdapter”, replace “WCF-Custom” with “SAPAdapter”.

  3. Search for the “ConfigurationClsid” attribute, and replace the existing value of the attribute with “A5F15999-8879-472d-8C62-3B5EA9406504”.

  4. Save and close the binding file.

  5. Import the binding file in BizTalk Server Administration console. Reuse SAP adapter bindings lists the steps.

See Also

Building blocks to create SAP applications