This page documents the experiences I gained working with UDDI and Java. Any comments are of course welcome. However, please note that I'm working on other things now. Therefore I'm not able to help you with specific jUDDI questions. (Unless you are enrolled in the Intelligent Web Applications course.)
To set up your own UDDI registry plus a framework to query a UDDI registry you will need the following programs:
In this setup we will rely on the following instances of these software classes:
Software you might want to have as well includes:
Most of the programs can be setup and run "out of the box". However, there are some traps in which a user could fall. I will shortly summarize the setup procedure and point to some of these traps. Our goal is to run the samples accompaning UDDI4J. Through these samples any of our components can be tested in working together, as UDDI4J uses a SOAP transport facility (here Apache Axis) to communicate with a UDDI registry (here jUDDI ). Axis uses an XML parser (here Apache Xerces-J), whereas the registry runs within an application server (here Apache Tomcat). And of course, any of these programs needs a Java runtime environment. Therefore we can test, if the whole setup works together.
Start Tomcat and test the installation by pointing your web browser to http://localhost:8080/. The Jakarta Tomcat default page should appear.
In the next steps we will install Axis and deploy it, that means we will make it accessible from within the application server. Axis puts XML elements with no defined namespace into default-namespaces starting with ns1 and this causes problems with Xerces-J 2.1.0. So make sure that you use Xerces-J 2.2.0 or later.
(Re-)Start Tomcat and test your Axis installation by pointing your web browser to http://localhost:8080/axis/ and to http://localhost:8080/axis/happyaxis.jsp.
jUDDI comes with SQL scripts for various databases. I will explain the DB2 and MySQL-Installation a little bit more detailed, but with a little bit of SQL knowledge you can easily adapt one of the SQL scripts to work with any SQL database you like. However, installation and setup of a database requires basic knowledge of database administration. It is beyond the scope of this web page to explain everything in detail. If you don't know what to do although you have read the instructions on this web page, it is always a good idea to consult the database documentation.
If you chose DB2:
See the page on IBM DB2 setup for jUDDI for details.
If you chose MySQL:
See the page on MySQL setup for jUDDI for details.
In the next step we will install jUDDI.
I have used the source code release jUDDI 0.7.0 and compiled the sources myself. If you want to compile jUDDI yourself as well, this may also be a good time to
as you need it to build your jUDDI from the sources.
The web.xml file is located in the webapps/WEB-INF directory. Near the end of the file, find the references to the log4j.properties and the juddi.properties files. Edit the reference so that it points to the actual location of the properties files. They should be located in the juddi/conf directory.
You have to add a few properties to make jUDDI use the database. The file JDBCDataStoreFactory.java in the juddi/WEB-INF/src/org/juddi/datastore/jdbc directory contains in its comments the necessary properties.
# 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
Add the above lines to the end of the juddi.properties file. It has been reported that in some cases jUDDI does not read the connection data properly from the properties. This is probably dependent on your installation or on the version of jUDDI or Tomcat. In these cases the conf/server.xml file needs some amendments, too. These changes are described on a separate page.
Note that all these settings that were discussed above are for MySQL! If you use any other database, you have to edit the above properties differently. The jdbcDriver property is sun.jdbc.odbc.JdbcOdbcDriver for any database that is connected through ODBC. If you have configured DB2 with the Client Configuration assistant, access is through ODBC. The database name is then jdbc:odbc:juddi (if your ODBC data source is called juddi).
To see if everything works, start Tomcat and point your browser to http://localhost:8080/juddi/happyjuddi.jsp. This should take you to the "jUDDI happiness page". If you see something like
got a JNDI Context! got a jUDDI DataSource!
then your installation is probably fine.
UDDI4J is a framework to allow access to a UDDI registry from Java.
It might be necessary to apply the following code change to
UDDIElement.java:
if (node.getNodeType() == node.ELEMENT_NODE &&
node.getLocalName().equals(tag)) {
if (node.getNodeType() == node.ELEMENT_NODE &&
node.getNodeName().equals(tag)) {
This code is located in the method public NodeList
getChildElementsByTagName(Element el, String tag).