Welcome to Windows Communication Foundation (WCF)
Top Tasks :

WCF Team Bloggers

Browse by Tags

All Tags » Bindings » Indigo » Channel Dev Tour   (RSS)
Sorry, but there are no more tags available to filter with.

  • Optional Interfaces on Binding Elements

    In the past I've talked a lot about the absolute minimum you need to do to write a working channel. However, what about the people that want all of the optional bells and whistles that can go along with channel development? There are several interfaces that you can implement on the binding element or in your custom channel solution to add functionality. I'm not going to go over these interfaces in detail today, but I did want to at least catalog the interfaces that are available. The base class for a channel binding element is taken up by the fact that you have to subclass BindingElement or TransportBindingElement. Therefore, the optional functionality is generally provided through interfaces that you can add to the binding element or on separate objects. WS-Policy export. The IPolicyExportExtension interface lets you define an ExportPolicy method that overrides the policy construction process. Metadata export. The IWsdlExportExtension interface lets you define an ExportContract and an ExportEndpoint method that override the metadata construction process. WS-Policy import. The IPolicyImportExtension interface has the reverse method ImportPolicy to consume policy statements. Metadata import. The IWsdlImportExtension interface has the reverse methods ImportContract and ImportEndpoint to consume metadata. IWsdlImportExtension also has a method called BeforeImport. Metadata consumption is done using a multi-phase process, where all of the importers get to look at the metadata once before actually doing the work. Configuration import and export. Configuration on the binding element is added by subclassing BindingElementExtensionElement. This is a separate object that has to parallel all of the settable properties on the binding element. Binding configuration import and export. If you put your binding element into a standard binding, then you can provide configuration for that binding as well. You need two separate objects subclassing StandardBindingElement and StandardBindingCollectionElement. Next time: Messaging is not a Transaction Read More...
  • Channel Bindings

    We're back to the channel development tour for another pair of articles. Today's article is the first of four in this segment on channel construction. The first half of the segment is background and the second half of the segment talks about code. In each half, there is an article on bindings and an article on channel managers. After we're done with this segment, everything else in the series deals directly with implementing the channel interfaces. Channels go through a somewhat complicated construction process . This construction process essentially has three stages: design, evaluate, and build. Bindings are the typical user-accessible part of the construction process and correspond to the design stage. We have to take a few steps back before it becomes clear how bindings fit into the model. You have a service. Your service has endpoints that enforce a particular contract for exchanging data. One part of your endpoint's contract is the protocol for how the client and server can send each other a message. The implementation of a protocol contract is called a binding. There are many ways to build this implementation, including through configuration files or writing code. Bindings expose design settings that allow the user to configure various aspects of the network protocols. The binding is a rough equivalent to the channel stack, a composition of all of the chosen protocols. Given a specific set of design settings, the binding can produce a set of binding elements that correspond to those settings. Each binding element is a rough equivalent to one channel in the channel stack. We'll see some examples latter where that isn't true, but it's generally the case. We'll stop here in the process for now because at the next step we'll be producing the channel managers that are the subject of tomorrow's article. The binding and binding element expose methods that allow us to perform the evaluate and build stages. The evaluate stage allows the user to query whether the chosen design settings of the binding make sense for building a channel manager. This is a cheap way of verifying the build process without having to actually initiate a build. The build stage locks the design settings of the binding in place and produces the corresponding channel manager. From the channel manager, the build process is going to continue a little bit farther until we have actual channels. Next time: Channel Managers Read More...

Copyright © 2006 Microsoft Corporation. All Rights Reserved. | Terms of Use | Privacy Statement | Contact Us