By Joel Barnum, Descriptor Systems.
In this article, you will learn how to install the open-source jUDDI server and configure it. In Part 2, you will publish a Web service's WSDL to it.
This article assumes that you are familiar with SOAP, WSDL and UDDI, as these topics will not be explored here.
Blatant, shameless plug: If you are not familiar with SOAP, WSDL and UDDI, I recommend that you get some Web services training from Descriptor Systems. You can find more information at www.descriptor.com. Thanks!
Update: Unfortunately, these instructions do NOT work if you have Java 1.6 installed. Apparently, there is a bug with no workaround due to a conflict between jUDDI and Java 6.
Here are the software packages you will need:
java -cp hsqldb.jar org.hsqldb.util.DatabaseManager
In the GUI, enter or select the following, leaving the rest as their default values:
Type: | HSQL Database Engine Standalone |
URL: | jdbc:hsqldb:file:{TOMCAT-HOME}/db/uddi |
Be sure to substitute the actual pathname for {TOMCAT-HOME} (note that forward slashes are OK even in Windows). Then press OK.
You can then choose View - Refresh Tree from the GUI's menu to see the database tables.
To further test, highlight and delete the text INSERT command text and then enter:
SELECT COUNT(*) FROM PUBLISHER
You should see a result of "1". Close the GUI when you are finished.
<Context path="/juddi" docBase="juddi" debug="5" reloadable="true" crossContext="true"> <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_juddiDB_log" suffix=".txt" timestamp="true"/> <Resource name="jdbc/juddiDB" auth="Container" type="javax.sql.DataSource" username="sa" password="" driverClassName="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:file:{TOMCAT-HOME}/db/uddi" validationQuery="select publisher_ID from PUBLISHER"/> <Resource name="jdbc/juddi" auth="Container" type="javax.sql.DataSource" username="sa" password="" driverClassName="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:file:{TOMCAT-HOME}/db/uddi" validationQuery="select publisher_ID from PUBLISHER"/> </Context>
Be sure to replace the {TOMCAT-HOME} placeholders with the actual pathname. This file configures two DataSources so that the jUDDI application can use the HSQLDB database tables you created in an earlier step.
<resource-ref> <description>jUDDI DataSource</description> <res-ref-name>jdbc/juddiDB</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> <resource-ref> <description>jUDDI DataSource</description> <res-ref-name>jdbc/juddi</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref>
catalina run -- for Windows ./catalina.sh run -- for *nix
http://localhost:8080/juddi/happyjuddi.jsp
You should not see any errors on the page (no red text).
http://localhost:8080/juddi/console/get_authToken.jsp
In the top multi-line entry area, change the userID from *** to jdoe and the cred from *** to an empty string. Then press the Submit button.
In the bottom multi-line area, you should see a returned SOAP message with an authInfo element containing text of the form authToken:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. If that worked, then you have successfully installed and configured jUDDI!