Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web service discovery in WCF : Ws-Discovery or UDDI?

I know the distinction between UDDI and Ws-Discovery (well know location to search a service vs broadcast). But my question is : what is the simplest way to discover a webservice in WCF ? By simplest I mean what is already implemented in WCF and can be used now ? I've not seen any built-in implementation in WCF for UDDI or Ws-Discovery.

Do you have any link, or experience to share about these two protocols in WCF ?

UPDATE

Now I'm thinking about three solutions, waiting for WS-discovery on .NET 4.0, or maybe creating my own discovery binding with the Peer to Peer binding provided by WCF. This way I can broadcast a request. Or using the implementation provided by the link of eed3si9n.

I think that I'll do a gateway interface to easily change implementation latter.

like image 398
Nicolas Dorier Avatar asked Mar 15 '09 13:03

Nicolas Dorier


People also ask

Is UDDI a discovery service?

UDDI currently represents the discovery layer within the web service protocol stack. UDDI was originally created by Microsoft, IBM, and Ariba, and represents a technical specification for publishing and finding businesses and web services.

What is Web service discovery process?

Web Service Discovery is the process of finding suitable web services for a given task. Publishing a web service involves creating a software artifact and making it accessible to potential consumers.

Which of the pages can be used by web clients to get information about the endpoints of the services?

The UDDI contains a variety of pages containing diverse type of data and information and making it easy for clients to come across information about services given by the service providers.


1 Answers

.NET 4.0 will have WS-Discovery. See Messaging enhancements in .NET 4.0: (Discovery Part I) Using WS-Discovery in WCF 4.0. In the meantime, Claudio Masieri has provided an implementation. See WS-Discovery for WCF.

There's also a custom discovery implementation done in similar way as UDDI. See Windows Communication Service Discovery.

Imagine you have 200 clients using your funky Wcf service. They would all have in their conf file a section like this one:

<client>
   <endpoint configurationName="default"
               address="http://localhost/servicemodelsamples/service.svc"
               binding="wsHttpBinding"
               bindingConfiguration="Binding1"
              contract="IDataContractCalculator" />
 </client>
 <bindings>
   <wsHttpBinding>
      <binding configurationName="Binding1" />
   </wsHttpBinding>
</bindings>

Now, you decide to change the existing endpoint (server side) with a new one that uses SSL for security reason. How do you update your clients? You can quickly see that it can become tedious. So the idea I want to detail here is to implement a discovery service similar to what UDDI does and to use a metadata resolver to get the configuration out of the service in order to create dynamically a proxy allowing the client to discuss with the service.

This person has similar concern as you do, and seems to have a working solution.

like image 139
Eugene Yokota Avatar answered Oct 18 '22 06:10

Eugene Yokota