Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

WCF LOB Adapter SDK Overview

The WCF LOB Adapter SDK is built on top of the WCF Channel Model and provides design-time and run-time extensions for adapter developers to create adapters to line-of-business systems that have large and dynamic metadata. An adapter created using the WCF LOB Adapter SDK is surfaced to the consumer as a custom WCF binding. The following figure shows the internal architecture and main components of WCF LOB Adapter SDK.

Bb798126.7183bded-465e-45b9-af78-fbb87cf2df92(en-us,BTS.70).gif

Handler defines the message exchange patterns supported by the adapter.

The following table summarizes the available handler types, their function, and the WCF channel(s) they map to.

Handler Type Function Maps to WCF Channels

IOutboundHandler

Supports one-way send or request/response pattern.

IOutputChannel,

IRequestChannel

IAsyncOutboundHandler

Supports asynchronous one-way send or request/response pattern.

IOutputChannel,

IRequestChannel

IInboundHandler

Supports one-way receive or reply patterns.

IInputChannel,

IReplyChannel

IAsyncInboundHandler

Supports asynchronous variants of methods one-way receive or reply patterns.

IInputChannel

IReplyChannel

IMetadataBrowseHandler

Supports browsing of metadata on the target system.

IRequestChannel

IMetadataSearchHandler

Supports searching of metadata on the target system.

IRequestChannel

IMetadataResolverHandler

Supports retrieval of metadata from the target system.

IRequestChannel

An adapter built using the WCF LOB Adapter SDK is basically a transport channel (System.ServiceModel.Channels.IServiceListner). An adapter built using the WCF LOB Adapter SDK is surfaced to the consumer as a WCF binding, where the binding is used to create the channel stack. This binding can be considered a peer to other predefined WCF bindings such as BasicHttpBinding, WsHttpBinding, and NetTcpBinding, and can be set via app.config or in code by the client application when calling a service. This binding contains an ordered set of binding elements, with the adapter being the key binding element that derives from the T:System.ServiceModel.Channels.TransportBindingElement class. In an outbound scenario, the WCF LOB Adapter SDK runtime uses a channel factory to create the adapter (that is, the transport channel). In an inbound scenario, the WCF LOB Adapter SDK runtime makes use of channel listeners for incoming channels in a service application.  Both run-time as well as design-time messages pass through this component.

ConnectionFactory provides a factory pattern for creating connections based on URI and user credentials. For more information, see IConnectionFactory.

Connection defines a low-level communication contract with the target system, and encapsulates native communication APIs and connection handles. For more information, see IConnection.

The Connection Uri Builder allows adapter consumers to programmatically build connection URIs without specific knowledge of syntax. For more information, see ConnectionUri.

Connection management is responsible for the lifetime management of the connections of an adapter. It internally keeps a pool of the connections ready for use. This connection pool is credential and URI-based. The credential contains a user name and password that define the security context the connection runs under.

When the same credentials and URI are used, any channel being opened under the same connection factory obtains the connection from the pool if there is one available already.

Connection pool manager keeps records of how many open connections there are to that URI regardless of the credentials and across the boundaries of the channel factory. For example, in one system, you can have two users who have different credentials, which means there are two channel factories connecting to the system.

Bb798126.note(en-us,BTS.70).gifNote
The adapter may be limited with respect to the number of connections it can support, generally limited by system resources.

To help adapter developers configure the connection pool settings, the WCF LOB Adapter SDK provides two classes, ConnectionPoolSettings and ConnectionManagerSettings.

Metadata management is responsible for the object-oriented representation of the caching of the metadata for the target system. Metadata can be held in a common cache accessible across all credentials, or it can be cached per credential basis.

The metadata life cycle begins with its design-time definitions and continues through usage during runtime. At design time, adapter developers must identify the set of operations, and must generate the necessary WSDL and client side proxy. At runtime, the Adapter Framework-based adapters use the predefined metadata to interpret the messages returned from the target system calls.

To help adapter writers configure the metadata setting, the Adapter Framework provides three classes, CacheSettings, MetadataSettings and CommonCacheSettings.

WSDL Builder provides automatic WSDL generation from the WCF LOB Adapter SDK's internal metadata object model (it can be overridden for scenarios that require custom WSDL generation).

See IWsdlRetrieval for more information.

Metadata browse/search allows for browsing and searching all LOB metadata.

For more information, see IMetadataRetrievalContract.

Metadata generation allows for generating code for the client (for outbound scenarios) and for the service (for inbound scenarios) based on operations selected by the adapter consumer. Even though we recommend that adapter consumers use the tools Add Adapter Service Reference Plug-in (Consume Adapter Service Add-in in case of BizTalk applications), the WCF LOB Adapter SDK provides a public interface GetMetadata to retrieve the System.Web.Services.Description.ServiceDescription, which represents a Web Service Description Language (WSDL) containing information about selected operations and types. Adapter writers make use of the metadata object model for the WCF LOB Adapter SDK that includes classes derived from OperationMetadata and TypeMetadata to describe the details of each operation and type.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.