1 / 12

RBA Consulting

RBA Consulting. WCF 4.0: Routing & Discovery Services January 20, 2011. WCF Routing.

antoniax
Download Presentation

RBA Consulting

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. RBA Consulting WCF 4.0: Routing & Discovery Services January 20, 2011

  2. WCF Routing • The Routing Service is a generic SOAP intermediary that acts as a message router. The core functionality of the Routing Service is the ability to route messages based on message content, which allows a message to be forwarded to a client endpoint based on a value within the message itself, in either the header or the message body. • from MSDN

  3. Routing Service Usage • Protocol Bridging • Content-Based Routing • Failover (Backup Lists)

  4. Routing Service Architecture

  5. Using the Routing Service • Create regular WCF Services to be called by the Routing Service. • Create a Routing Service: • Change the markup in the .svc file to point to the routing Service. Be sure to reference System.ServiceModel.Routing in your project • In the web.config: • Add endpoints for all the services to which you’ll connect in the <client> section.

  6. Using the Routing Service (cont’d) • In the web.config (cont’d): • Create a namespace filter and set the Xpath filterData • Add filterTables to point to the correct end points • Set the Routing behavior to identify the filterTables

  7. WCF Discovery • The Discovery APIs provide a unified programming model for the dynamic publication and discovery of Web services using the WS-Discovery protocol. These APIs allow services to publish themselves and clients to find published services. • MSDN

  8. Discovery Architecture

  9. How Discovery Works • Discovery involves a client, a service, and/or a Discovery Proxy • A Client is an entity that is looking for services and utilizes the “DiscoveryClient” to search for them. • A Service is a WCF service that has endpoints which can be discovered. A Service adds a ServiceDiscoveryBehavior in the service host description, which enables it to respond to find requests from clients. A service may also host an announcement client if it wants to announce itself.  • A Discovery Proxy is a centralized repository that knows about services. It is not required. • Find/Resolve • A client can find a service based on criteria such as the service type. It can send out a Probe message to which the recipient of the probe, either a service or a proxy, responds back to the client with the appropriate service metadata. • A resolve can be used to find a service based on its endpoint address. • Announcements • Services can announce themselves to the network and clients can be configured to listen for such announcements

  10. Configuring Discovery

  11. Coding Discovery

  12. References • MSDN. What’s New in WCF 4.0. Visual Studio 2010 Training Kit. • MSDN. WCF Discovery. http://msdn.microsoft.com/en-us/library/dd456782.aspx • Ambar Ray. Content Based Routing Using WCF 4. http://www.codeproject.com/KB/WCF/WCF_4.aspx • Anurag P. Discovery Concepts. http://blogs.msdn.com/b/discovery/archive/2009/05/29/discovery-overview.aspx • Richard Seroter. Simpler Way of Hosting the WCF 4.0 Routing Service in IIS7http://seroter.wordpress.com/2010/03/09/simpler-way-of-hosting-the-wcf-4-0-routing-service-in-iis7/

More Related