Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

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

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
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
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server