Sun Java System Application Server Platform Edition 9 Administration Guide

Publishing to Web Services Registries

A web service registry is like a “phone book” for web services. It enables client applications to look up and find web services. Application Server supports two widely-used registry standards: ebXML (Electronic Business using XML) and Universal Description, Discovery, and Integration (UDDI). A company can host an internal registry for use by web services within the corporate firewall, or externally for use by customers, business partners, and other external entities.


Note –

Application Server does not have an internal registry. To publish web services to an internal registry, you must download and install the registry on the application server. To publish a web service to an external registry, specify the address of the external registry.


Adding a Connector Module for a Registry

Application Server has client-side implementations to enable you to communicate with registry servers plugged in as connector resource adapters. This enables Application Server to transparently connect to multiple registry types by using different resource adapters.

Before you can add a registry to which to publish web services, you must deploy an appropriate connector module. With Admin Console, add a connector module at Application Server > Applications > Connector Modules. Click the Deploy button to deploy a new connector module, then choose the appropriate resource adapter archive (RAR) file.

Application Server comes with a pre-deployed resource adapter for a UDDI registry. So, you do not need to deploy a resource adapter to use a UDDI registry.

Setting up a Registry for use with Application Server

Application Server does not currently provide a web services registry. If you want to use an ebXML registry, downolad the Java Web Services Developer Pack (JWSDP) 1.6, which includes an ebXML registry. To run JWSDP, you must use Application Server 8.2 or another web container such as Tomcat.

To set up your own registry to work with Application Server, follow the procedures in this section.

ProcedureTo Create a Registry

  1. Download Java Web Services Developer Pack (JWSDP) 1.6: http://java.sun.com/webservices/downloads/1.6/index.html.

  2. Install JWSDP 1.6 on your system.

  3. Download and install the desired web container.

    JWSDP 1.6 works with Application Server 8.2, J2EE 1.4 SDK, and Tomcat 5.0 for JWSDP. You cannot use Application Server 9 as the web container with JWSDP 1.6.

  4. Change the default port that the web container uses.

    Application Server 9 uses port 8080 by default, so you must change the port that the web container uses to avoid conflicts. Change the port, for example, to 7080. With Tomcat, you can do this in the server.xml file. In Sun Java System Application Server 8.2 you can do this using Admin Console.

  5. Start the container.

    This starts the installed registry by default. JWSDP 1.6 comes with the registry preconfigured.

  6. Configure the resource adapter to work with Application Server, as described in the next section.

ProcedureTo Configure a Resource Adapter for an ebXML Registry

The result of this procedure will be to create a soar.rar resource adapter file that you can deploy to Application Server.

Before You Begin

Set the JWSDP_HOME environment variable to the directory where JWSDP 1.6 is installed and the JAVA_HOME environment variable to the directory where J2SE is installed.

  1. Download the ra.xml file from the Glassfish site: https://glassfish.dev.java.net/javaee5/ws-mgmt/registry/ra.xml.

    Save the file in the /tmp directory (C:\tmp on Windows).

  2. You can either download and execute a script, or perform the steps manually.

    • To use a script:

      1. Download one of the following scripts:

        Save the script to the /tmp directory (C:\tmp on Windows).

      2. Execute the script.

    • To perform the steps manually:

      1. Enter the following commands:

        cd $JWSDP_HOME/registry/lib
        mkdir tmp
        cp soar-jaxr-ra.jar ./tmp
        cd tmp
        jar xvf soar-jaxr-ra.jar
        rm soar-jaxr-ra.jar ra.xml ./META-INF/SUN* ./META-INF/pack.properties
        cp ra.xml META_INF .
        cp $JWSDP_HOME/registry/lib/oasis-* .
        cp $JWSDP_HOME/registry/lib/omar-common.jar .
        cp $JWSDP_HOME/registry/lib/jaxr-ebxml.jar .
        cp $JWSDP_HOME/jwsdp-shared/lib/commons-logging.jar .

        Note –

        The commands shown are for Unix or Linux. Use the equivalent commands on Windows.


        Now, the tmp directory should contain the following files and directories:

        • META-INF directory

        • com directory

        • jaxr-ebxml.jar

        • oasis-regrep.jar

        • omar-common.jar

        • oasis-saml1.1.jar

        • oasis-saml2.0.jar

        • commons-logging.jar

      2. Enter this command to create resource adapter file soar.rar:


        jar cvf soar.rar META-INF com jaxr-ebxml.jar oasis-regrep.jar omar-common.jar oasis-saml1.1.jar oasis-saml2.0.jar commons-logging.jar

        Note –

        To use the jar command on Windows, you must have the JAVA_HOME\bin directory on your path.


Next Steps

Once you have created the soar.rar file, deploy it to create a registry as described in the next section.

Adding a Registry

Adding a registry is equivalent to creating a connector connection pool and adding a corresponding resource to the Application Server. This functionality is provided as a convenience, and enables Application Server to communicate to a registry, as described previously.

Add or remove a web services registry with Admin Console at Application Server > Web Services | Registry. Click Add to add a new registry to which to publish web services. The Add Registry Page appears. Use this page to create a Registry Access Point (RAP). For help on using Admin Console, click Help.

When you add a registry, specify the following parameters:

Publishing a Web Service to a Registry

To publish a web service with Admin Console, select Web Services > web-service-name | Publish.

In the Publish Web Service screen, select one or more registries to which you want to publish the web service, then click Publish. To publish to all the available registries, click the Add All button.

Enter categories under which this web service will show up in the registry. Use a comma to separate each category. The categories are defined in the registry you are using. Enter a description and the name of the organization for this web service.

If you are using a load balancer, enter the load balancer host name, port number, and the SSL port number. If you are publishing the web service to an external registry, where the WSDL can be found over the internet, these options will replace the hostname and port name specified in the WSDL to the one of the load balancer.

To un-publish a web service, In the Publish Web Service screen, select the registry from which you want to un-publish the web service, then click Unpublish.

You can also use the following commands to publish a web service, un-publish a web service, and list registry locations: