Configure a physical port binding using a port binding file to Oracle Database
When you use the Consume Adapter Service BizTalk Project Add-in to generate metadata for an Oracle database 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 Reuse Oracle Database Adapter bindings. 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 BizTalk Project 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 a port binding file always creates a two-way send or receive ports. If you want to create one-way send or receive ports, you can create it manually by following the procedure mentioned in Manually configure a physical port binding to the Oracle Database Adapter. Or, you can follow the workarounds documented in this topic to modify the port binding file to create one-way send or receive ports.
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 Oracle database, the name of the file is WcfSendPort_OracleDBBinding_Custom.bindinginfo.xml.
If you generated metadata for inbound operations, that is to receive messages from the Oracle database, the name of the file is WcfReceivePort_OracleDBBinding_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 a Select operation on the ACCOUNTACTIVITY table, the action on the port is set to
<Operation Name="Select" Action="http://Microsoft.LobServices.OracleDB/2007/03/SCOTT/Table/ACCOUNTACTIVITY/Select" />
. 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 Oracle database through the send port.You only need to provide the credentials for the port to connect to the Oracle database. 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. You can specify a unique URI by including a polling ID.
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 - 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">
- 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 - 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">
- 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-OracleDB Port Using the Port Binding File Generated Using Consume Adapter Service Add-in
The Consume Adapter Service Add-in 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-OracleDB port in BizTalk Server Administration console. However, before creating WCF-OracleDB port you must perform the following tasks to modify the port binding file.
Open the port binding file in a text editor.
Search and replace “WCF-Custom” with the name with which you added the WCF-OracleDB adapter in BizTalk Server Administration console. For example, if you added the WCF-OracleDB adapter as “OracleDBAdapter”, replace “WCF-Custom” with “OracleDBAdapter”.
Search for the “ConfigurationClsid” attribute, and replace the existing value of the attribute with “D7127586-E851-412e-8A8A-2428AEDDC219”.
Save and close the binding file.
Import the binding file in BizTalk Server Administration console. For instructions on how to import the binding file, see Reuse Oracle Database Adapter bindings.
See Also
Building Blocks to develop BizTalk Applications with Oracle Database