Configuring a Physical Port Binding Using a Port Binding File

When you use the Consume Adapter Service BizTalk Project Add-in to generate metadata for a SQL Server 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. For instructions on importing binding files, see Importing Bindings. If you import this binding file, you do not have to manually create a physical send or receive port.

ImportantImportant
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 port or a one-way receive port. If you want to create a one-way send port, you can create it manually by following the procedure mentioned in Manually Configuring a Physical Port Binding to the SQL Adapter. Or, you can follow the workarounds documented in this topic to modify the port binding file to create one-way send ports.

noteNote
For inbound operations, the port binding file will always create a one-way receive port. This is because the SQL adapter only supports one-way receive port for inbound operations.

ImportantImportant
Using the Add Adapter Metadata Wizard does not create a port binding file using which you can create a WCF-SQL 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-SQL port. For more information, see Configuring a WCF-SQL 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 that the Consume Adapter Service Add-in generates:

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

    If you generated metadata for inbound operations, that is, to receive messages from SQL Server, the name of the file is WcfReceivePort_SqlAdapterBinding_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 into your BizTalk application to create a port, all the relevant information required to configure a physical port is automatically set on the port.

    ImportantImportant
    By default, the action on the send port is mapped to the operation name for which you generated metadata. For example, if you generate metadata for the Insert operation on the Customer table, the action on the port is set to <Operation Name="Insert" Action="TableOp/Insert/dbo/CustomerTable" />. 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 send 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 SQL Server through the send port.

  • You only need to provide the credentials for the port to connect to SQL Server. Although the binding file does retain the user name with which to connect, for security reasons the binding file does not contain the password.

  • 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 binding 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 for outbound operations always contains definitions for a two-way send port. When you import this file in a BizTalk application, it creates a two-way send port. However, you may have an orchestration that has a one-way send 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 binding file to make the following changes:

     

    For thisDo this

    To edit the port binding file to configure a one-way send port

    1. In the following excerpt, change the value of the 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" />
      


    ImportantImportant
    For inbound operations, the port binding file will always create a one-way receive port. This is because the SQL adapter only supports one-way receive port for inbound operations.

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-SQL port in BizTalk Server Administration console. However, before creating WCF-SQL 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-SQL adapter in BizTalk Server Administration console. For example, if you added the WCF-SQL adapter as “SQLAdapter”, replace “WCF-Custom” with “SQLAdapter”.

  3. Search for the “ConfigurationClsid” attribute, and replace the existing value of the attribute with “59B35D03-6A06-4734-A249-EF561254ECF7”.

  4. Save and close the binding file.

  5. Import the binding file in BizTalk Server Administration console. For instructions on how to import the binding file, see Importing Bindings.

© 2014 Microsoft Corporation. All rights reserved.
Show: