Sample SQL Adapter built using WCF LOB Adapter SDK
WCF LOB Adapter SDK 'RC' ships with two sample adapters -
- Contoso Adapter - uses a canned back-end defined using SQL Server 2005.
- Echo Adapter - a simple adapter that shows how to use WCF LOB Adapter SDK API and includes a usage pattern for inbound scenarios
Both of these adapters are limiting and don't truly capture building adapter for a real world line-of-business system.
The team has recently finished creating a 'lite' SQL Server Adapter, that browses, searches and executes stored procedures in SQL Server 2005 database. Each line-of-business system is unique and an adapter writer needs to have knowledge of the back-end system to create the adapter. If you are a SQL Server guru and would expect some other functionality in a WCF-based adapter, feel free to extend this adapter.
Click here to download this sample. You can try this adapter out with AdventureWorks Sample Database.
Following table shows the matrix of ASDK features used by this sample adapter.
|
Category |
Feature |
Yes/No |
|
Metadata Definition |
Implement IMetadataBrowseHandler.Browse |
Yes |
|
Implement IMetadataSearchHandler.Search |
Yes |
|
Implement IMetadataResolverHandler |
Yes |
|
Use ParameterizedOperationMetadata |
Yes |
|
Use StructuredTypeMetadata |
Yes |
|
Use one or more of the following special types
· DurationTypeMetadata
· EnumTypeMetadata
· CharTypeMetadata
· GuidTypeMetadata
· StreamTypeMetadata |
Yes |
|
Override any one of following method to provide pre-defined XML Schema
· OperationMetadata.ExportInputXmlSchema
· OperationMetadata.ExportOutputXmlSchema
· TypeMetadata.ExportXmlSchema |
No |
|
Implement IWsdlRetrieval.GetWsdl |
No |
|
Message Exchange |
Implement IOutboundHandler |
Yes |
|
Implement IAsyncOutboundHandler |
No |
|
Implement IInboundHandler |
No |
|
Implement IAsyncInboundHandler |
No |
|
Use AdapterDataReader / AdapterDataWriter derived classes for parsing/building WCF messages |
Yes |
|
Connection |
Line-of-business system requires security credentials. Use one of the following ways to get credentials from client –
· UserName
· Windows
· Certificate |
Yes |
|
Use line-of-business connection pooling |
No |
|
Binding Properties |
Surface adapter settings as binding properties |
Yes |