# Discovering Web Services

Web services can be located through a public business registry, a private business registry, or a WSIL document. UDDI manages the discovery of Web services by relying on a distributed registry of businesses and their service descriptions implemented in a common XML format.

Prerequisites:

1. Register with a registry
2. Launch the Web Services Explorer
3. Add the registry to the Web Services Explorer

Web Services Inspection Language (WSIL) is a service discovery mechanism that is an alternative to UDDI as well as complementary to UDDI. WSIL allows you to go directly to the service provider and ask for the services it provides. For more information on the Web Services Inspection Language specification, refer to www.ibm.com/developerworks/webservices/library/ws-wsilspec.html. .

You can discover a Web service in two ways using the Web Services Explorer:

- Discovering a Web service from a UDDI registry
- Discovering a Web service from a WSIL document

## Discovering a Web Service from a UDDI Registry

The registry contains URL references to Web service WSDL documents. In order to discover a Web service the URL to the Web service WSDL document must be resolvable. To locate Web service descriptions:

1. Launch the Web Services Explorer
2. Click UDDI Main.
3. In the Actions pane select a registry from the drop-down list and click Go.
4. In the Actions pane toolbar click the Find icon .
5. In the Actions pane, enter the name of the query, what you are searching for, the type of search that you want to perform, and any query information:
   1. Search for This list allows you to search for businesses, services, or service interfaces.
      - Businesses Once you locate a business in the registry, use the icons in the Action pane toolbar to do the following:
        - View and edit business details
        - Get the services associated with that business
        - Publish a service
        - Manage referenced services
        - Manage publisher assertions
        - Add the business to Favorites
        - Unpublish the business
      - Services Once you locate a service in the registry, use the icons in the Action pane toolbar to do the following:
        - View and edit service details
        - Get the business associated with that service
        - Get the service interfaces associated with that service
        - Import the service WSDL file to the Eclipse workbench
        - Import the service WSDL file to the file system
        - Launch the Web Service wizards
        - Add the service to Favorites
        - Unpublish the service
      - Service interfaces Once you locate a service interface in the registry, use the icons in the Action pane toolbar to do the following:
        - View and edit interface details
        - Get the services associated with that service interface
        - Get the businesses associated with that service interface
        - Import the service interface WSDL file to the Eclipse workbench
        - Import the service interface WSDL file to the file system
        - Launch the Web Service wizards
        - Add the service interface to Favorites
        - Unpublish the service interface
   2. Type of search These radio buttons allow you to specify a simple or advanced search, or a search by a Universal Unique Identifier (UUID).
      Simple
        Type the name of the businesses, services, or service interfaces for which you are searching. Note: The search set size is set to 100 and the maximum number of returned results is set to 10 by default. If you would like to override the defaults, use the Advanced search.
      Advanced
        Allows you to enter more search options to focus the scope of your search. Select this option if you would like to search for multiple businesses or services.
      UUID
        Allow you to enter the UUID key. The UUID key is the identifier that is associated with the published object.
6. Once you have searched and discovered the business service description you desired, select the service or the service interface and click the Import icon to:
   - import the WSDL document into your Web project
   - import the WSDL document into the WSDL Explorer for testing
   - launch the Web Service Skeleton Creation wizard or Web Service Client wizard directly from the Web Services Explorer.

## Discovering a Web Service from a WSIL Document

To locate Web service descriptions:

1. From the Web Services Explorer toolbar, click the WSIL Page icon .
2. In the Navigator pane, click WSIL Main.
3. In the URL to document field of the Actions pane enter the URL to the WSIL document or HTTP document that contains links to a WSIL document. Details on how an HTTP file can contain links to WSIL can be found here: http://www.ibm.com/developerworks/webservices/library/ws-wsilspec.html
4. Once you have located the WSIL document, use the icons in the Action pane toolbar to do the following:
   - View WSIL document details
   - List all of the WSDL services associated with that WSIL document
   - List all of the UDDI services associated with that WSIL document
   - List all of the UDDI businesses associated with that WSIL document
   - List all of the WSIL links associated with that WSIL document
   - Import the WSIL document to the file system
   - Add the WSIL document to Favorites
   Important: If the Web Services Explorer does not display the project that you would like to import your WSDL file to, ensure that you have created the project and/or click the Refresh icon.

Related Concepts
Tools for Web services development
Web services development
Universal Description, Discovery, and Integration (UDDI)
Related Tasks
Publishing Web services and business entities
Launching the Web Services Explorer
Registering with a UDDI registry
Developing Web services
Related Reference
Data structure types (UDDI registry)