Consume a WCF LOB Adapter SDK adapter in a BizTalk Server project
This topic describes how to consume an adapter built using the Microsoft Windows Communication Foundation (WCF) Line of Business (LOB) Adapter SDK from BizTalk Server using the Consume Adapter Service BizTalk Project Add-in.
Note
In order to use the Consume Adapter Service BizTalk Project Add-in, you must install the WCF LOB Adapter SDK tools on the same computer hosting BizTalk Server.
Use the Consume Adapter Service Add-in
Open your .NET application in Visual Studio.
In Visual Studio, in the Project pane, right-click your BizTalk Server project, and then choose Add|Add Generated Items | Consume Adapter Service.
In the Consume Adapter Service Add-in screen, select an adapter binding.
Click Configure to configure the connection URI for the selected adapter binding and to provide any credentials, URI properties, and binding properties. Actual requirements will vary based on the selected adapter binding.
Click OK when you have configured the URI.
Click Connect. If the connection URI is valid and client credentials (if any) are accepted, the Category pane should be populated with the categories and operations provided by the adapter.
If the adapter support search, the search field will be active. Otherwise, you can filter by contract type and explore types and operations by clicking nodes in the Category pane.
Click OK to generate the proxy artifacts. The number of artifacts varies based on the contract type:
Contract Type Artifact Description Outbound XML Schemas Contains the schemas for the selected types and operations. Outbound WCF-Custom send port binding information XML Contains configuration XML for the WCF-Custom send port. Inbound XML Schemas Contains the schemas for the selected types and operations. Inbound WCF-Custom receive port binding information XML Contains configuration XML for the WCF-Custom receive port. You can now use the XML Schema files in your BizTalk Server application.
Deploy the BizTalk Server project
Open BizTalk Server Administration.
Import the port binding XML file(s) to create the physical ports. Right-click your application under the Applications group, select Import Bindings, and then navigate to and select the appropriate port binding information XML file(s).
Map the logical ports defined in your BizTalk Server orchestrations to the newly created physical ports.
Click Orchestrations under your application, right-click the orchestration to enlist, and then click Enlist.
Click Orchestrations under your application, right-click the orchestration to enlist, and then click Start.
Right-click your BizTalk Server application, and then click Start.
Generate Multiple Schemas
If you use the Consume Adapter Service Wizard to generate multiple schemas, one or more elements may be duplicated in the schemas resulting in compilation failure for the BizTalk Server project. You can avoid this by selecting the Generate Unique Schema Type check box to ensure that schema types are generated with unique namespaces.