Monday, March 30, 2009

Finding Web Services

In a simple application, you may already know the URL of the web service you want to use. If so, you can hard-code it or place it in a configuration file. No other steps are required. In other situations, you might want to search for the web service you need at runtime. For example, you might use a standardized service that’s provided by different hosting companies and is not always available at the same URL. Or, you may just want an easy way to find all the web services provided by a trading partner. In both of these situations, you need to use discovery to programmatically locate the web services you need.
Two specifications help in the discovery of a web service:
DISCO (an abbreviation of discovery): The DISCO standard creates a single file that groups a list of related web services. A company can publish a DISCO file on its server that contains links to all the web services it provides. Then clients simply need to request this file to find all the available web services. This is useful when the client already knows a company that it’s offering services and wants to see what web services they expose and find links to the details of its services. It’s not very useful to search for new web services over the Internet, but it may be helpful for local networks where a client connects to the server and can see what and where services are available.
UDDI (Universal Description,Discovery, and Integration): UDDI is a centralized directory where web services are published by a group of companies. It’s also the place where potential clients can go to search for their specific needs. Different organizations and groups of companies may use different UDDI registries. To retrieve information from a UDDI directory or register your components, you use a web service interface.

Discovery is one of the newest and least mature parts of the web service protocol stack. DISCO is supported only by Microsoft and is slated to be replaced by a similar more general standard named WS-Inspection in future .NET releases. UDDI is designed for web services that are intended to be shared publicly or among a consortium of companies or organizations. It’s not incorporated into the .NET Framework, although you can download a separate .NET component to search UDDI directories and register your components (see http://msdn.microsoft.com/library/en-us/uddi/uddi/portal.asp). Because there aren’t yet any well-established UDDI directories, and because many web services are simply designed for use in a single company or between a small set of known trading partners, it’s likely that most web services will not be published in UDDI.

No comments: