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.
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.
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.
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.
Download Java Web Services Developer Pack (JWSDP) 1.6: http://java.sun.com/webservices/downloads/1.6/index.html.
Install JWSDP 1.6 on your system.
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.
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.
Start the container.
This starts the installed registry by default. JWSDP 1.6 comes with the registry preconfigured.
Configure the resource adapter to work with Application Server, as described in the next section.
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.
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).
You can either download and execute a script, or perform the steps manually.
To use a script:
To perform the steps manually:
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 .
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:
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
To use the jar command on Windows, you must have the JAVA_HOME\bin directory on your path.
Once you have created the soar.rar file, deploy it to create a registry as described in the next section.
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:
JNDI Name: the connection resource pool (JNDI) name of the registry. The JNDI Name of this connector resource is the JNDI Name of the registry.
Choose the type of the registry to add: UDDI 3.0 or ebXML.
Publish URL and Query URL: the addresses for publishing and querying the registry, respectively. The format is: http://hostname/path-to-registry—installation. For example, http://localhost:7080/soar/registry/soap.
User name and password for the registry (not required for ebXML; fields are disabled).
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: