JavaScript Editor Javascript validator     Javascripts

Main Page


Previous Section Next Section

17.1 Discovery

Discovery is the process of finding out what web services are available, what methods and properties are exposed by a specific web service, what parameters those methods and properties expect to receive, and what data type the web method returns. All of this information is contained in the WSDL (Web Services Description Language) document, introduced in Chapter 16.

Discovery is an optional process. If the consuming developer knows the URL of the web service file (.asmx) itself, then there is no need to do discovery. However, it will often be the case that the consuming developer will not know the location of the web service file or the WSDL document. In these instances, ASP.NET provides a discovery command-line utility called disco.exe that provides the consuming developer with the information necessary to create the client.

You have already seen in Chapter 16 how the disco utility allows the developer who created the web service to generate a .disco file. Now the consuming developer can use the same utility to aid in creation of the client.

There are two equivalent ways of using the disco utility to generate the WSDL file. If you know the URL of the web service file, you can use that as input, as shown in the following command line:

disco http://WebSrvcDomain.com/csStockTicker.asmx?WSDL

If you don't know the URL of the .asmx file but do know the URL of the .disco file, you can use that file as input to disco, as in:

disco http://WebSrvcDomain.com/csStockTicker.disco

In either case, a WSDL file will be generated in the output directory.

To force the output directory to be somewhere other than the current directory, use the /out: parameter, or /o: for short, as in:

disco /out:<output directory name> 
      http://WebSrvcDomain.com/csStockTicker.disco

The disco utility executed in the previous command line will put three files, summarized in Table 17-1, in the output directory.

Table 17-1. Files output by the disco utility

Filename

Description

csStockTicker.disco

Discovery document you are trying to create.

csStockTicker.WSDL

The exact same WSDL for the Web Service generated by entering the .asmx file in a browser with "?wsdl? appended to the URL.

results.discomap

Alternative discovery document.

For a complete listing of all the parameters available to the disco utility, enter the following command line:

disco /?

In addition to outputting a .disco file and a WSDL file, the disco utility will also create a .discomap file, which can be used as input to the WSDL utility, described later in this chapter.

UDDI

UDDI (Universal Description, Discovery, and Integration) is a registry that allows businesses to locate web services exposed on the Internet. For complete information about UDDI, visit http://www.UDDI.org. UDDI is a joint project of IBM, Microsoft, and Ariba and will eventually be turned over to a standards organization, such as the W3C (http://www.w3c.org).

UDDI will have two main components:

  • A web-based registry for locating web services. Any business can publish information about the web services it is making available. This registry can be searched either through a web page interface or programmatically via web services.

  • Standard XML Schema for business descriptions. The data contained in the UDDI Registry is contained in XML documents with standardized fields used to describe a business.

As of this writing, the UDDI specification is still under development. However, it is reasonable to expect that in time, UDDI will become a universal "phone book" for finding and consuming web services.

    Previous Section Next Section


    JavaScript Editor Javascript validator     Javascripts 




    ©