Logo
CAR REVIEW
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
PREGNANCY
 
 
Windows Server

BizTalk 2009 : WCF LOB Adapter SDK (part 1) - Generating Adapter Skeleton Code

6/26/2011 4:31:32 PM
Now that you are familiar with the major classes and interfaces that the WCF LOB Adapters have to support, let's put all the pieces together and implement a simple adapter for a mythical hotel reservation system. In the inbound scenario, an adapter monitors the system and sends notification if new guests arrive. In the outbound scenario, an adapter accepts requests and returns the number of available rooms for the specified hotel.

1. Step 1: Generating Adapter Skeleton Code


First, you have to create WCF LOB Adapter project. Begin by using Visual Studio's WCF LOB Adapter Development Wizard to generate some skeleton code. Here is the process to follow:
  1. To create a WCF LOB Adapter project, open Visual Studio 2008. Select File => New Project. The New Project dialog box will open. Select a Visual C# project for the project type, and select WCF LOB Adapter from the Templates pane. Specify the project name and location, as shown in Figure 1.

  2. Click OK. The WCF LOB Adapter Development Wizard, shown in Figure 2, will open.

  3. Click Next.

    Figure 1. Creating a WCF LOB Adapter project
    Figure 2. The WCF LOB Adapter Wizard
  4. On the Scheme, Namespace and URI Information page, specify the parameters shown in Figure 3. If you want to override the default namespace, select the "Override default namespace" check box, and type the desired namespace in the "Service namespace" field.

    Figure 3. Scheme, Namespace, and URI Information page
  5. Click the Next button.

  6. Specify the parameters shown in Figure 4, and click the Next button.

    Figure 4. Data flows and metadata features
  7. On the Adapter Properties page, add the binding properties listed in Table 1. The EnableConnectionPooling property is used by the ASDK to enable or disable the runtime connection pooling. Make sure that after adding the properties, the Adapter Properties page looks like Figure 5. Click the Next button.

    Table 1. Adapter Binding Properties
    Property NameData TypeDefault Value
    EnableConnectionPoolingSystem.BooleanTrue
    PollingPeriodSystem.Integer10

    Figure 5. Adapter Properties page
  8. On the Connection Properties page, add the connection properties listed in Table 2. After adding the properties, the Connection Properties page should look like Figure 6.

    Table 2. Adapter Connection Properties
    Property NameData TypeDefault Value
    ApplicationSystem.StringHotelApp
    EnableAuthenticationSystem.BooleanTrue
    HostSystem.StringHotelAppHost

  9. Click the Next button. On the Summary page, click the Finish button. Figure 7 shows the Solution Explorer with the files generated by the WCF LOB Adapter Development Wizard.

Figure 6. Connection Properties page

Figure 7. HotelAdapter generated project

Tables 3 to 7 give a brief description of the files generated by the wizard.

Table 3. Connection Group
FileDescription
HotelAdapterConnection.csContains the definition of the class implementing the IConnection interface. This class is responsible for a single connection to the target LOB system.
HotelAdapterConnectionFactory.csContains the definition of the class implementing the IConnectionFactory interface. This class creates an instance of the class implementing the IConnection interface, that is, HotelAdapterConnection.
HotelAdapterConnectionUri.csContains the definition of the class representing connection string to the target LOB system.

Table 4. Metadata Handlers Group
FileDescription
HotelAdapterMetadataBrowseHandler.csContains the definition of the class implementing the IMetadataBrowseHandler interface. This class is responsible for the metadata browse capabilities of the adapter.
HotelAdapterMetadataResolverHandler.csContains the definition of the class implementing the IMetadataResolverHandler interface. This interface is used by ASDK to get the information about supported operations and data types. This information is used to generate proxy files or message type specifications.
HotelAdapterMetadataSearchHandler.csContains the definition of the class implementing the IMetadataSearchHandler interface. This class is responsible for the search metadata capabilities of the adapter.

Table 5. Inbound/Outbound Handlers Group
FileDescription
HotelAdapterHandlerBase.csContains the definition of the base class for adapter handlers.
HotelAdapterInboundHandler.csContains the definition of the class implementing the IOutboundHandler interface. This class is responsible for listening to events or polling for data on the target LOB system.
HotelAdapterOutboundHandler.csContains the definition of the class implementing the IInboundHandler interface. This class is responsible for sending data to the target system.

Table 6. Custom Binding Group
FileDescription
HotelAdapterBinding.csContains the definition of the class representing a binding for the WCF LOB Adapter. This class hosts a collection of the BindingElements, which the WCF channel is built upon.
HotelAdapterBindingCollection Element.csContains the definition of the class used to register the adapter with WCF.
HotelAdapterBindingElement.csThis class is used to apply configuration properties to the adapter binding.
HotelAdapterBindingElementExtensionElement.csContains the definition of the class used to expose the adapter as a custom adapter binding. This class is used to configure the adapter using the WCF-custom adapter.


Table 7. Core Files
FileDescription
HotelAdapter.csContains the definition of the main adapter class derived from Microsoft.ServiceModel.Channels.Common.Adapter.
HotelAdapterTrace.csContains the definition of a supplementary class that can be used in the code for debugging purposes and tracing in particular.

After completing this step, you have WCF LOB Adapter skeleton classes that you will fill with functionality in the subsequent steps. In the next step, you will categorize the properties that you created using the wizard.

Other -----------------
- SQL Server 2008 : Configuring the Instance (part 3)
- SQL Server 2008 : Configuring the Instance (part 2) - Specifying the Backup Compression Default & Enabling Login Failure Auditing
- SQL Server 2008 : Configuring the Instance (part 1) - Viewing Configuration Settings & Specifying Maximum and Minimum Server Memory
- Microsoft PowerPoint 2010 : Expanding PowerPoint Functionality - Loading and Unloading Add-ins
- Microsoft PowerPoint 2010 : Expanding PowerPoint Functionality - Viewing and Managing Add-ins
- Microsoft Dynamics CRM 2011 : Sending and Tracking Email Messages in Microsoft Dynamics CRM for Outlook
- Microsoft Dynamics CRM 2011 : Using Microsoft Dynamics CRM for Outlook - Using the Add Contacts Wizard
- Microsoft Dynamics CRM 2011 : Using Microsoft Dynamics CRM for Outlook - Creating and Tracking Contacts
- Windows Server 2008 R2 : Managing Disks and Disk Storage - Understand the Basics (part 2) - Work with Partitions & Use DiskPart
- Windows Server 2008 R2 : Managing Disks and Disk Storage - Understand the Basics (part 1) - Work with Your Storage
- SharePoint 2010 : Securing a SharePoint Farm
- SharePoint 2010 : Introducing SharePoint Security
- SQL Server 2008 : SQL Server Configuration Manager (part 2) - SQL Server Network Configuration
- SQL Server 2008 : SQL Server Configuration Manager (part 2) - SQL Server Network Configuration
- SQL Server 2008 : SQL Server Configuration Manager (part 1) - SQL Server Services
- BizTalk 2009 : WCF LOB Adapter SDK - WCF LOB Adapter Vivisected
- BizTalk 2009 : WCF LOB Adapter SDK - WCF LOB Adapters vs. WCF Services
- BizTalk 2009 : Understanding the WCF LOB Adapter
- SQL Server 2008 High Availability : Database Clustering
- SQL Server 2008 High Availability : Database Mirroring (part 2) - SharePoint and Database Mirroring
 
 
Most view of day
- SharePoint 2010 : Building Composite Solutions (part 2) - External Data Search, External Data and User Profiles
- Windows Server : Network Access Policy and Server and Domain Isolation (part 1) - Network Access Protection Overview
- Monitoring Windows Small Business Server 2011 : Using Windows SBS Console Monitoring (part 2) - Using Notification Settings
- Microsoft Systems Management Server 2003 : Permissions and Security Objects (part 2) - Assigning Permissions
- Troubleshooting Hardware, Driver, and Disk Issues : How to Use Built-In Diagnostics (part 1)
- Microsoft Excel 2010 : Protecting and Securing a Workbook - Adding a Signature Line
- Microsoft Exchange Server 2010 : Completing Transport Server Setup (part 7) - Configuring Journal Rules
- System Center Configuration Manager 2007 : Creating and Modifying Configurations (part 5) - External Authoring, Authoring with CP Studio
- BizTalk 2010 : ASDK SQL adapter examples (part 3) - Query notification and multiple result sets
- Windows Phone 8 : Working with the Windows Phone Software (part 9) - Copying Phone Content to Your PC or Tablet
Top 10
- Windows Phone 8 : Scheduled Tasks - Scheduled Task API Limitations
- Windows Phone 8 : Scheduled Tasks - Updating Tiles Using a Scheduled Task Agent
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 5) - Editing an Existing To-Do Item
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 4) - Creating the To-Do Item Shell Tile, Saving a To-Do Item
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 3) - Debugging Scheduled Tasks
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 2) - TodoService, TodoItemViewModel
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 1) - TodoItem,TodoDataContext
- Windows Phone 8 : Scheduled Tasks - Using Scheduled Tasks
- Windows Phone 8 : Scheduled Tasks - Background Agent Types
- Windows Phone 8 : Windows Phone Toolkit Animated Page Transitions - Reusing the Transition Attached Properties
 
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro