9 Viewing, Registering, and Publishing Web Services

This chapter describes how to register web services and sources in Enterprise Manager from a WSIL or UDDI registry. It also describes how to publish registered resources to the UDDI registry.

This chapter includes the following sections:

9.1 Introduction to Registering Web Services and Sources

A key feature of the web services model is the ability to make web services widely available and discoverable. UDDI is one approach to publishing and discovery of web services that centralizes information about businesses and their services in registries. Another emerging alternative standard is the Web Services Inspection Language (WSIL) specification.

Oracle Enterprise Manager Fusion Middleware Control can register web services that are published in WSIL documents and UDDI v3 registries. Any service that is available in a WSIL document or a UDDI v3 registry can be registered within Enterprise Manager.

You can also register meta information, or a profile, for sources of services to help you manage your registered services within Enterprise Manager. Once you register a source and assign it a logical name, you do not need to specify connectivity information, such as a URL for a WSDL, in the future. A domain can have multiple registered sources, and each registered source can have multiple registered services. Once you register a source, you can easily look up services that you can register to the source.

Service names and corresponding WSDLs must be unique within a registered single source. Once you have registered a service, an attempt to register another service with the same name, or a different name but the same WSDL URL as another service, is not valid.

Once you register a web service, you can later, more conveniently, reference the service from a selection list within Enterprise Manager. For example, when testing a web service as described in Testing Web Services, instead of specifying a WSDL, you can click the Search icon and then select the WSDL from the list of registered services.

This section includes the following topics:

9.1.1 Understanding UDDI Basics

Universal Description Discovery & Integration (UDDI) is an industry initiative that aims to enable businesses to quickly, easily, and dynamically find and carry out transactions with one another. A populated UDDI registry contains cataloged information about businesses; the services that they offer; and communication standards and interfaces they use to conduct transactions.

The owners of web services publish them to the UDDI registry. Once published, the UDDI registry maintains pointers to the web service description and to the service. The UDDI allows clients to search this registry, find the intended service, and retrieve its details. These details include the service invocation point as well as other information to help identify the service and its functionality.

9.1.2 Understanding WSIL Basics

WSIL defines an Extensible Markup Language (XML) format for referencing web service descriptions. These references are contained in a WSIL document, and refer to web service descriptions (for example, WSDL files) and to other aggregations of web services (for example, another WSIL document or a UDDI registry).

WSIL documents are typically distributed by the web service provider. These documents describe how to inspect the provider's web site for available web services. Therefore, the WSIL standard also defines rules for how WSIL documents should be made available to consumers of web services.

The WSIL model decentralizes web service discovery. In contrast to UDDI registries, which centralize information on multiple business entities and services, WSIL makes it possible to provide web service description information from any location. Unlike UDDI, WSIL is not concerned about business entity information, and does not require a specific service description format. It assumes that you know who the service provider is and relies on other standards for web service description, such as WSDL.

9.1.3 Viewing Registered Sources and Web Services

Follow the steps in this section to view and edit a registered source and web service.

  1. In the navigation pane, expand WebLogic Domain to show the domain in which you want to view the registered sources and web services.
  2. Select the domain.
  3. From the WebLogic Domain menu, select web Services then Registered Services. The Registered Sources and Services page appears, as shown in Figure 9-1.

    Figure 9-1 Viewing Registered Sources and Services



    In the Sources table, you can view the following information about each registered source:

    • Name—Logical name for the source

    • Description—Description of the source

    • Source URL—Location of the source in URL format

    • Type—Source type: UDDI v3 registry import, WSIL import from file, WSIL import from URL

    • User ID—User ID for the external source

    You can customize the information that is displayed using the View menu. From this section of the page, you can also add new sources, edit or delete sources, register web services for a source, and publish a web service from a source to a predefined UDDI registry.

  4. Select a source in the Sources table.

    Each registered source can have multiple registered services. In the Services table, you can view the following information about the registered services imported from the selected source location:

    • Name—Name of the registered service

    • Description—Description of the service

    • Service location—Location of the service in URL format

    You can customize the information that is displayed using the View menu. You can also display the WSDL for the selected service and test the selected web service.

9.1.4 Registering a Source

You can register web service sources of the following types: UDDI v3 registry import, WSIL import from URL, or WSIL import from file.

To register a source:

  1. In the navigation pane, expand WebLogic Domain to show the domain in which you want to register a web service source.
  2. Select the domain.
  3. From the WebLogic Domain menu, select Web Services then Registered Services. The Registered Sources and Services page appears, as shown in Figure 9-1.
  4. Click Add to register a new source. The Register New Source page appears, as shown in Figure 9-2.

    Figure 9-2 Register New Source Page

    Description of Figure 9-2 follows
    Description of "Figure 9-2 Register New Source Page"
  5. Enter the following information for the new source.
    • Name—A logical name for the source.

    • Description—A description of the source.

    • Type—choose from one of three options: UDDI v3 registry import, WSIL import from URL, or WSIL import from File

      Additional information that you need to enter differs based on the option you select.

  6. If you selected UDDI v3 registry import, enter the following information:
    • In the Source URL field, enter the UDDI inquiry URL, for example, http://somehost/uddi/inquiry.

    • To allow the services to be published to a UDDI source (which is an external UDDI registry), select the Enable box and complete the fields as follows:

      • In the Publication URL field, enter URL location of the registry to which you want to publish the service.

      • In the Security URL field, enter the URL location of the security port required to access the registry.

      • In the User ID and Password fields, enter the security credentials required to access the registry.

  7. If you selected WSIL import from URL, enter the following information:
    • In the Source URL field, enter the location of the WSIL in URL form.

    • If a username and password are required to access the WSIL, select the Enable box in the Basic Authorization field. In the User ID and Password fields, enter the username and password.

  8. If you selected WSIL import from File, click Browse (next to the WSIL File field) to select the WSIL file to be imported.
  9. Click OK to register the source.

9.1.5 Registering Web Services from a UDDI Source

Follow the steps in this section to register web services from a registered UDDI source.

  1. In the navigation pane, expand WebLogic Domain to show the domain in which you want to register a web service.
  2. Select the domain.
  3. From the WebLogic Domain menu, select Web Services then Registered Services. The Registered Sources and Services page displays, as shown in Figure 9-1.
  4. Select the UDDI source from which you want to register services. Note that the Type for a UDDI source is specified as UDDI v3 registry import.
  5. Select Register Web Services.

    The Register New Service page displays, as shown in Figure 9-3.

    Figure 9-3 Register New Service from UDDI Source



    The Register New Service page displays the source information, in read-only format, and a list of the services that are available in UDDI that you can register.

    You can filter the list of available services that are displayed using the Service Name and Service Key fields. For example, to find calculator services, enter calc in the Service Name field. Only services that contain the calc string, such as calculator services are displayed. The search is not case-sensitive.

    In the Services available in UDDI section of the page, you can view service details from UDDI for each service in the table by clicking the View Service Details icon. The Service Details from UDDI window displays information about the service such as the Service Name, Service Description, Service WSDL, Service Key, Business Key, and Service Location, among others.

    You can edit the details of a service by clicking the Edit icon, which allows you to change the name and description of the selected service.

  6. In the Services available in UDDI section of the page, select the service or services that you want to register from the source and click Register.

    A confirmation message displays indicating that the service was registered successfully.

9.1.6 Registering Web Services from a WSIL Source

Follow the steps in this section to register web services from a registered WSIL source.

  1. In the navigation pane, expand WebLogic Domain to show the domain in which you want to register a web service.
  2. Select the domain.
  3. From the WebLogic Domain menu, select Web Services then Registered Services. The Registered Sources and Services page displays, as shown in Figure 9-1.
  4. Select the WSIL source from which you want to register services. Note that the Type for a WSIL source is specified as either WSIL import from File or WSIL import from URL.
  5. Select Register Web Services.

    The Register New Service page displays, as shown in Figure 9-4.

    Figure 9-4 Register New Service from WSIL Source



    The Register New Service page displays the Source information, in read-only format, and a list of available services, if any, in the WSIL that you can register, shown in the Services Available in WSIL table. If there are any WSIL references in the WSIL, they are listed in the References Available in WSIL table.

    In the Services Available in WSIL table, you can edit the details of a service by clicking the Edit icon, which allows you to change the name and description of the selected service.

  6. To register a service available from the current WSIL, select the service in the Services Available in WSIL table and click Register.

    A confirmation message displays indicating that the service was registered successfully.

  7. If the current WSIL also references other WSIL URLs or references, expand References Available in WSIL to display them. You can register the referenced web services as well.

    To register a service from a referenced WSIL instead of the current WSIL, click the Process icon for the reference in the References Available in WSIL table.

    If the WSIL parses successfully, a new source is registered and the current WSIL source is replaced by the referenced WSIL. The services available in the referenced WSIL source are listed in the Services Available in WSIL table. You can then register services from the referenced WSIL.

    Note:

    For each new source created, _n is appended to the parent source name. For example, if the parent source name is wsil_file_1, then referenced new sources are named wsil_file_1_1, wsil_file_1_2) with source type WSIL URL. The new sources are listed in the Sources table in the Registered Sources and Services page.

    If the WSIL does not parse successfully, an error message displays. Usually, in such cases, the system successfully registers the new source for the selected WSIL reference. However, because the system could not parse the WSIL document, the error message displays. Close the error dialog and click OK to return to the Registered Sources and Services page.

    WSIL parsing can fail if the reference is bad or it needs authorization credentials. You can enable authorization for the WSIL source as described in "Registering a Source".

    Note:

    When the system fails to retrieve web services from a registered source, because of connection or other failures, the Register New Service page is displayed with read only information for the source, but does not show any web services. In such cases, click OK in the error dialog, if an error dialog is displayed, then click OK in the Register New Service page to return to the Registered Sources and Services page. To troubleshoot, you can then view the registered sources through other means. For example, if the source is a:

    • WSIL URL source, copy the URL to a browser address bar to view its contents.

    • WSIL file source, examine the WSIL file using an XML editor.

    • UDDI source, try to access the UDDI registry directly to investigate.

    You can also review any related Enterprise Manager error logs.

9.1.7 Deleting a Web Service or Web Service Source

Follow the steps in this section to delete a web service or a web service source.

  1. In the navigation pane, expand WebLogic Domain to show the domain in which you want to delete a web service.
  2. Select the domain.
  3. From the WebLogic Domain menu, select Web Services then Registered Services. The Registered Sources and Services page displays, as shown in Figure 9-1.
  4. Do one of the following:
    • To delete a source, select the source from the Sources table and click Delete.

      A confirmation message displays. Click OK to delete the source.

    • To delete a service from a source, select the source in the Sources table.

      The registered web services are displayed in the Services table.

      Select the service to be deleted from the Services table and click Delete.

      A confirmation message displays. Click OK to delete the service.

9.2 Introduction to Publishing Web Services to UDDI

You can publish web services to UDDI from a registered UDDI source and from the web services summary page for ADF and Java EE applications. Registered UDDI sources are listed in the Registered Sources and Services page, which includes all sources and services registered in a domain. The Web Services summary page lists the web services in an application.

Note:

You need to use a proxy to publish a service to UDDI, since this requires access to URLs outside of your firewall. For more information about the required proxy settings, see "Configuring the Proxy Server for UDDI".

If your services are already in Oracle Enterprise Repository (OER) then you should use the OER Exchange Utility to publish those services to Oracle Service Registry.

The following procedures describe how to publish web services to UDDI.

9.2.1 Publishing a Web Service to UDDI from a Registered Source

Registered UDDI sources are listed in the Registered Sources and Services page, which includes all sources and services registered in a domain.

To publish a web service to UDDI from a registered source:

  1. Navigate to the Registered Sources and Services page as described in "Viewing Registered Sources and Web Services".
  2. Select the source row in the Sources table and then Publish to UDDI.

    Figure 9-5 Registered Sources and Services Page with Publish to UDDI Selected



  3. In the Publish Service to UDDI window, enter the information about the service to be published:
    • Service Name is the name of the web service to be published to the UDDI registry. This field is required.

    • Service Description is a description of the selected web service.

    • Service Definition Location is the URL location of the service definition. This field is required.

    • UDDI Source is the name of the UDDI source from which the service is to be registered. This field is read only.

    • Business Name is the name of the data structure in the UDDI registry. It is assumed that the business has already been registered in the UDDI. Choose the Business name from the list. This field is required.

      Figure 9-6 Publish Service to UDDI Window from a UDDI Source



  4. Click OK in the Publish Service to UDDI window.

    The system verifies that the service specified has a valid WSDL and that the UDDI registry has accepted the new entry or updated an existing one. If it is successful, a confirmation message displays and the service is published to the registry. Once the service is published in the UDDI, it becomes available to be registered to a source, as described in "Registering Web Services from a UDDI Source".

    Any errors during the operation will result in an error message.

    Note that you can only register the service to a source if it uses a unique WSDL.

9.2.2 Publishing a Web Service to UDDI from an Application

You can publish web services to UDDI from the web services summary page for ADF and Java EE applications.

To publish a web service to UDDI from an application:

  1. Navigate to the Web Services application summary page as described in "Viewing the Web Services Summary Page for an Application".
  2. From the Web Service Details section of the page, select the Web Services tab, if it is not already selected, then select the service to be published.
  3. Select Actions, then Publish to UDDI. See Figure 9-7.

    Figure 9-7 Web Services Summary Page with Publish to UDDI Selected



  4. In the Publish Service to UDDI dialog box (Figure 9-8), enter the information about the service to be published:
    • Service Name is the name of the web service to be published to the UDDI registry. This field is required.

    • Service Description is a description of the selected web service.

    • Service Definition Location is prepopulated with the URL location of the service definition (This field is read-only.)

    • UDDI Source is a logical name for the UDDI registry source. Choose the UDDI source from the list. This field is required.

      Note:

      The list contains the UDDI sources registered in the domain that have been enabled for publishing. For more information about registered sources, see "Introduction to Registering Web Services and Sources".

    • Business Name is the name of the data structure in the UDDI registry. It is assumed that the business has already been registered in the UDDI. Choose the business name from the list. This field is required.

    Figure 9-8 Publish Service to UDDI Dialog Box



  5. Click OK to connect to the external UDDI registry and register the web service.

    Upon successfully registering the service, a confirmation message displays. Any errors during the operation will result in an error message.

9.2.3 Configuring the Proxy Server for UDDI

To access URLs outside of your firewall, you must use a proxy to publish a service to UDDI.

Before starting Oracle WebLogic, you must set the Java system properties defined in Table 9-1. You can set them as environment variables, or in Oracle WebLogic startup files.

Table 9-1 Java System Properties Used to Specify the Proxy Server for UDDI

Property Description

proxySet=true

Flag that specifies that the WebLogic proxy properties should be used.

http.proxyHost=proxyHost

Name of the host computer on which the proxy server is running.

http.proxyPort=proxyPort

Port to which the proxy server is listening.

http.nonProxyHosts=hostname | hostname |...

List of hosts that should be reached directly, bypassing the proxy. Separate each host name using a | character.

For example:

set PROXY_SETTINGS="-DproxySet=true -Dhttp.proxyHost=www-proxy.example.com -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=localhost|${HOST}|*.example.com"