Browse DevX
Sign up for e-mail newsletters from DevX


Creating Your Own Private UDDI Registry : Page 6

You don't have to rely on some huge public UDDI repository to expose your Web services to developers and automated processes. Instead, find out how to set up a UDDI registry on your own server.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

Creating the Registry
jUDDI installs as a Web application (.ear file or .war file) with a context of http://<host>:<port>/juddi so you can deploy it to almost any up-to-date application server or servlet engine.

To install the jUDDI Web application, following these steps:

  • Copy the Web.xml file from the <jUDDI_Home>/conf directory to the <jUDDI_Home>/webapps/juddi/WEB-INF directory
  • Copy the <jUDDI_Home>/webapps/juddi directory into your application server's webapps directory
  • Copy the juddi.properties file from the <jUDDI_Home>/conf directory to the <jUDDI_Home>/webapps/juddi/WEB-INF/classes directory
  • Edit the juddi.properties file. jUDDI ships configured with a default JDBC driver for MySQL, in the com.mysql.jdbc.Driver package. If you are using another database or if your MySQL JDBC driver has a different package name, you will have to change the reference to it in the juddi.properties file located in the <jUDDI_Home>/conf directory. For jUDDI to use the database, add the following lines to the end of the juddi.properties file:

# required JDBC DataSource properties juddi.dataSource = java:comp/env/jdbc/juddiDB # required JDBC Driver properties juddi.useConnectionPool = true juddi.jdbcDriver = com.mysql.jdbc.Driver juddi.jdbcURL = jdbc:mysql://localhost/juddi juddi.jdbcUser = juddi juddi.jdbcPassword = juddi

  • Edit the server.xml file to configure the jUDDI Web application for your specific application server, if needed.
Creating the Data Store
The default implementation for the jUDDI data store uses JDBC. The setup process is fairly straightforward. Generically, you start by creating a new jUDDI database using one of the database schemas included with the jUDDI download, and then configure a JNDI Datasource named 'juddiDB' in the application server or servlet engine to which you're deploying.

Here's a specific example using MySQL. After installing MySQL and creating a root user, create a new database called "juddi" using the MySQL command-line as follows:

mysql> create database juddi

After successfully creating the database, you must tell MySQL to use the juddi database by typing the following on the MySQL command line:

mysql> use juddi

Now, you can populate the database using the SQL script that ships with jUDDI by typing the following on the MySQL command-line:

mysql> \. <jUDDI_Home>\dbscripts\juddi_mysql.sql

Replace the <jUDDI_Home> fragment in the preceding command with the path to your local jUDDI installation.

Create a new user called juddi that will be used by jUDDI for accessing the UDDI database. Make sure this user has permission to connect to, read from, and write to the UDDI database.

mysql> grant all privileges on juddi.* to juddi@"%" -> identified by 'juddi'; mysql> grant all privileges on juddi.* to juddi@"localhost" -> identified by 'juddi';

Now add a jUDDI publisher with a PUBLISHER_ID representing the ID a publisher uses when authenticating, as follows:


Finally, add the MySQL JDBC driver to the classpath of the jUDDI Web application by creating a WEB-INF/lib directory structure under the <jUDDI_Home>/webapps/juddi directory.

Running the Registry
To test your jUDDI installation, start your Web server and/or application server and point your browser to:


This should take you to the "jUDDI happiness page." You should see a list of jUDDI dependencies, resource files, properties files, class files, etc. Your registry is now ready to handle UDDI request messages. The jUDDI installation includes samples that you can use to send requests to the registry.

The Universal Description, Discovery and Integration (UDDI) specification and protocol work together to form one of the primary components of a complete Web services infrastructure. jUDDI is an open source Java implementation of the UDDI specification for Web services. By following the steps shown in this article, you can use jUDDI to create a private UDDI registry that handles publication, authentication, and inquiry requests.

Jeff Hanson has more than 18 years of experience in the software industry. He has worked as senior engineer for the Windows OpenDoc port and as lead architect for the Route 66 framework at Novell. He is currently Chief Architect for eReinsure, which specializes in providing frameworks and platforms for J2EE-based reinsurance systems. Jeff has also authored numerous articles and books.
Thanks for your registration, follow us on our social networks to keep up-to-date