安装JUDDI服务器以及发布WSDL:第一部分,安装及配置
发布日期:2021-06-30 11:35:52 浏览次数:3 分类:技术文章

本文共 6920 字,大约阅读时间需要 23 分钟。

Installation andConfiguration

ByJoel Barnum, Descriptor Systems.

Introduction

In this article, you will learn how to install the open-source jUDDI server andconfigure it. In ,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, Irecommend that you get some Web services training from Descriptor Systems. Youcan find more information at . Thanks!

Update: Unfortunately, these in structions do NOT work if you have Java 1.6 installed. Apparently, there is abug with no work around due to a conflict between jUDDI and Java 6.

Update#2: There IS a work around! To fix the Java 6 bug,after installing Tomcat, add the following to the top of the$TOMCAT_INSTALL/bin/catalina.sh (or catalina.bat):

SET JAVA_OPTS=-Djavax.xml.soap.SOAPFactory=org.apache.axis.soap.SOAPFactoryImpl   -Djavax.xml.soap.MessageFactory=org.apache.axis.soap.MessageFactoryImpl   -Djavax.xml.soap.SOAPConnectionFactory=org.apache.axis.soap.SOAPConnectionFactoryImpl

Theabove should all be on a single line.

Hereare the software packages you will need:

  • Java Standard Edition 1.5 or better. I used version 1.5.0. You can download the Java SDK for your operating system from .
  • The jUDDI server from . I used version 0.9rc4.
  • The HypersonicSQL database server from . I used version 1.8.0.
  • The Apache Tomcat J2EE Web container from . I used version 5.5.17.

Installingand Configuring jUDDI

1.     Install theJava Standard Edition according to the instructions on the Sun website. Installthe JSE's bin directory into the PATH as is normalfor your operating system.

2.     InstallApache Tomcat according to the instructions from the Apache website. Note theinstallation directory -- we will refer to it as the TOMCAT-HOME in this article.

3.     Unzip theHypersonicSQL archive to a directory of your choice. We will refer to this asthe HSQL-HOME in this article.

4.     Unzip thejUDDI archive to a directory of your choice. We will refer to this as the JUDDI-HOME in this article.

5.     Copy the {HSQL-HOME}/lib/hsqldb.jar to {TOMCAT-HOME}/common/lib.This makes the HypersonicSQL database runtime available to Tomcat.

6.     Create adirectory under TOMCAT-HOME named db. We will create the HSQLDBdatabase for the UDDI storage here.

7.     Next, youwill create the UDDI database. Open a command prompt window or terminal andchange to the {TOMCAT-HOME}/common/lib directory. Then enter the following tostart the HSQLDB admin GUI:

8.           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 evenin Windows). Then press OK.

9.     In theHSQLDB GUI, choose File - OpenScript and navigate to the {JUDDI-HOME}/sql/hsqldb folder, then select the create_database.sql script and press Open. To run thescript, press the Execute button. The HSQL GUI will report an"Update Count" of 1.

10. Repeat theabove step to open the {JUDDI-HOME}/sql/hsqldb/insert_publishers.sql script. Before executing it, removethe "--" comment characters in front of the INSERT and VALUES lines in the script. After executing,you should see an "Update Count" of 1.

You can then choose View - Refresh Tree from the GUI's menu to see thedatabase tables.

To further test, highlight and delete the textINSERT command text and then enter:

SELECT COUNT(*) FROM PUBLISHER        
        

You should see a result of "1". Closethe GUI when you are finished.

11. Copy the {JUDDI-HOME}/webapps/juddi directory to {TOMCAT-HOME}/webapps. Youshould end up with a {TOMCAT-HOME}/webapps/juddi directory that contains index.htmlhappyjuddi.jsp and several subdirectories. Thisinstalls the jUDDI web application into Tomcat.

12. In the {TOMCAT-HOME}/webapps/juddi/META-INF directory,create a file named context.xml.Enter the following into the file:

13.       
14.         crossContext="true">
15.         
16.                      prefix="localhost_juddiDB_log" suffix=".txt"
17.                      timestamp="true"/>
18.                      
19.         
20.                  auth="Container"
21.                  type="javax.sql.DataSource"
22.                  username="sa" password=""
23.                  driverClassName="org.hsqldb.jdbcDriver"
24.                  url="jdbc:hsqldb:file:{TOMCAT-HOME}/db/uddi"
25.                  validationQuery="select publisher_ID from PUBLISHER"/>
26.         
27.                  auth="Container"
28.                  type="javax.sql.DataSource"
29.                  username="sa" password=""
30.                  driverClassName="org.hsqldb.jdbcDriver"
31.                  url="jdbc:hsqldb:file:{TOMCAT-HOME}/db/uddi"
32.                  validationQuery="select publisher_ID from PUBLISHER"/>                
33.             
        

Be sure to replace the {TOMCAT-HOME} placeholders with the actual pathname.This file configures two DataSources so that the jUDDI application can use theHSQLDB database tables you created in an earlier step.

34. Edit the {TOMCAT-HOME}/webapps/juddi/WEB-INF/web.xml file and near the bottom, copy theexisting resource-ref element so there are two. Edit thecopy to define a res-ref-name of jdbc/juddi.The two resource-ref elements should look like:

35.         
36.           
jUDDI DataSource
37.           
jdbc/juddiDB
38.           
javax.sql.DataSource
39.           
Container
40.         
41.         
42.           
jUDDI DataSource
43.           
jdbc/juddi
44.           
javax.sql.DataSource
45.           
Container
46.                
        

47. In thecommand prompt or terminal window, change to the {TOMCAT-HOME}/bin folder and start Tomcat by enteringone of the following, depending on your operating system:

48.       catalina run         -- for Windows
49.       ./catalina.sh run    -- for *nix   
        

50. Test jUDDIby opening a Web browser and entering the following URL:

51.       http://localhost:8080/juddi/happyjuddi.jsp       
        

You should not see any errors on the page (no red text).

52. One finaltest. Enter the following URL into your browser:

53.       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 theSubmit button.

In the bottom multi-line area, you should see areturned 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!

文章来源:http://www.descriptor.com/articles/web-services/juddi.html

转载地址:https://iteblog.blog.csdn.net/article/details/8654554 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:安装JUDDI服务器以及发布WSDL:第二部分,发布WSDL
下一篇:过程挖掘(Process Mining Manifesto):从日志中挖掘知识

发表评论

最新留言

逛到本站,mark一下
[***.202.152.39]2024年04月28日 08时58分31秒