Howto: install jUDDI server on JOnAS



I. UDDI Server

A UDDI server is basically a web services registry.
Providers of web services put technical information (such as the WSDL definition used to access the web service, description, ...) inside these registries. Web service Consumers can browse these registries to choose a web services that fits their needs.

II. jUDDI Overview

jUDDI (pronounced "Judy") is a Java-based implementation of the Universal Description, Discovery, and Integration (UDDI) specification (v2.0) for Web services. It is implemented as a pure Java web application and can be deployed with a minimum amount of work inside JOnAS.

Refer to http://ws.apache.org/juddi for more information.

III. How to Find the Latest Version

JOnAS already includes jUDDI v0.8 as a preconfigured webapp. For the latest jUDDI version, refer to http://ws.apache.org/juddi.

IV. Install Steps

jUDDI requires a minimum of configuration steps to be successfully deployed inside JOnAS.
If you use the JOnAS provided juddi.war, skip step 1., "Compilation," and start with Step 2., "Customization."

A. Create the juddi webapp

1. Compilation

Go to the directory where the jUDDI sources are located (JUDDI_HOME).
Customize the JUDDI_HOME/conf/juddi.properties configuration file.

# jUDDI Proxy Properties (used by RegistryProxy)
juddi.proxy.adminURL = http://localhost:9000/juddi/admin
juddi.proxy.inquiryURL = http://localhost:9000/juddi/inquiry
juddi.proxy.publishURL = http://localhost:9000/juddi/publish
juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol

# jUDDI HTTP Proxy Properties
juddi.httpProxySet = true
juddi.httpProxyHost = proxy.viens.net
juddi.httpProxyPort = 8000
juddi.httpProxyUserName = sviens
juddi.httpProxyPassword = password


Launch compilation with ant war. That will produce a juddi.war inside JUDDI_HOME/build/ directory.

2. Customization

JOnAS provide a lightweight juddi.war file from which all unnecessary libraries have been removed.

The original juddi.war (created from JUDDI_HOME) has a lot of libraries inside its WEB-INF/lib that are already provided by JOnAS. These files, listed below, can safely be removed:

By default, jUDDI includes a jonas-web.xml descriptor (in JUDDI_HOME/conf). This descriptor specifies the jndi name of the DataSource used in jUDDI; its default value is: jdbc/juddiDB. This value will be used in the <datasource>.properties of JOnAS.

B. Create the Database

1. Retrieve the SQL scripts for your database

jUDDI comes with SQL files for many databases (MySQL, DB2, HSQL, Sybase, PostgreSQL, Oracle, TotalXML, JDataStore).
SQL Scripts are different for each version of jUDDI:

2. Setup the database

For the 0.8 jUDDI release, the given SQL script must be executed.
Then, a publisher (the user who has the rights to modify the UDDI server) must be added manually. This is currently the only way to add a publisher for jUDDI.

For latest releases (0.9rc1), execute the given scripts (table creation, tmodels insertions and publishers insertions).

C. Configure JOnAS Datasource

As jUDDI uses a DataSource to connect to the database, JOnAS must be configured to create this DataSource.
This is done as usual in JOnAS:
Create a file (named ws-juddi-datasource.properties for example) and populate it with the appropriate database configuration information.

###################### MySQL DataSource configuration example
#  datasource.name is the jndi-name set in the jonas-web.xml
datasource.name           jdbc/juddiDB
# datasource.url is the URL where database can be accessed

datasource.url            jdbc:mysql://localhost/db_juddi
#
datasource.classname is the JDBC Driver classname
datasource.classname      com.mysql.Driver
# Set here DB username and password
datasource.username       XXX
datasource.password       XXX
#
available values : rdb,rdb.postgres,rdb.oracle,rdb.oracle8,rdb.mckoi,rdb.mysql
datasource.mapper         rdb.mysql

Add the datasource properties filename (without the suffix .properties) in your ($JONAS_BASE|$JONAS_ROOT)/conf/jonas.properties
jonas.service.dbm.datasources <datasource-filename>.

D. Deploy and test jUDDI

Deploy jUDDI on JOnAS with a command line similar to the following:
$ jonas admin -a ~/juddi/juddi.war

The following output should display:
11:53:57,984 : RegistryServlet.init : jUDDI Starting: Initializing resources and subsystems.
11:53:58,282 : AbsJWebContainerServiceImpl.registerWar : War /home/sauthieg/sandboxes/ws-projects/ws-juddi/build/juddi.war available at the context /juddi.

Open your web browser and go to the URL http://localhost:9000/juddi/happyjuddi.jsp to confirm that the jUDDI setup is successful.

If setup is successful, then your UDDI server can be accessed through any UDDIv2.0-compliant browser.
inquiryURL = http://localhost:9000/juddi/inquiry
publishURL = http://localhost:9000/juddi/publish

V. Links