Presentation is loading. Please wait.

Presentation is loading. Please wait.

WCF 4.0: Routing & Discovery Services

Similar presentations


Presentation on theme: "WCF 4.0: Routing & Discovery Services"— Presentation transcript:

1 WCF 4.0: Routing & Discovery Services
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. Ambar Ray. Content Based Routing Using WCF 4. Anurag P. Discovery Concepts. Richard Seroter. Simpler Way of Hosting the WCF 4.0 Routing Service in IIS7 service-in-iis7/


Download ppt "WCF 4.0: Routing & Discovery Services"

Similar presentations


Ads by Google