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.
Citation from: http://travisspencer.com/blog/2007/09/post.html
Here is a good list of properties: http://laflour.spaces.live.com/Blog/cns!7575E2FFC19135B4!728.entry
.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.
This person has similar concern as you do, and seems to have a working solution.
jUDDI has a .NET client that you can use. It greatly simplifies a number of things for working with UDDI.
From experience, there's there only two or three functioning implementations of WS-Discovery.
UDDI you can access from anything. There are many client and server implementations. (Just the version 3 stuff is listed here)
There's even a REST endpoint for UDDI3 (jUDDI 3.2 has it, XML or JSON responses) which opens this up to many more possibilities.
In addition, the data that's sharable with WS-Discovery is somewhat limited compared to the virtually unlimited data you can attach to UDDI.
That's just my 2 cents.