Installing thejUDDI UDDI Server and Publishing WSDL, Part 2
Publishing WSDL
ByJoel Barnum, Descriptor Systems.
Introduction
In this article, you will learn how to publish a service's WSDL to the jUDDIserver. This article assumes that you have already completed the steps inPart 1,where you install and configure jUDDI.
This article further assumes that you are familiar with SOAP, WSDL and UDDI, asthese topics will not be explored here.
Blatant, shameless plug: If you arenotfamiliar with SOAP, WSDL and UDDI, Irecommend that you get some Web services training from Descriptor Systems. Youcan find more information atwww.descriptor.com. Thanks!
Here are the software packages you will need, in addition to the packages youinstalled inPart 1:
- The Apache Axis Web services runtime. You can download Axis fromthe Apache website. I used version 1.4.
Installing and Configuring Axis
1. Install Apache Axis according to theinstructions on the Apachewebsite.
2. Ensure thatyou can view the WSDL for the sample Stock Quote Service by opening a Webbrowser and entering the URL:
3. http://localhost:8080/axis/StockQuoteService.jws?wsdl
Publishingthe Stock Quote Service's WSDL in UDDI
Inthis section, you will use the jUDDI console to publish a service in UDDI.
1.To start the jUDDI console, open a Web browserand enter the URL:
2. http://localhost:8080/juddi/console/
This Web page shows a rudimentaryadministration console to interact with the jUDDI server.
3.Since you are going to publish to the registry,you must first authenticate. When you configured jUDDI, the database scriptdefined credentials for a UDDI user namedjdoewith an empty password.
Follow these steps to obtain an authenticationtoken:
a.In the jUDDI console, click on the linkget_authTokenunder theUDDI Publish APIcategory. This will open a form intowhich you can enter the SOAP message for the get_authToken UDDI request.
Please examine the provided template for theSOAP message. Note that "***" are placeholders into which you canenter data.
b.Find the "***" foruserIDand change the value tojdoe. Set thecredattribute to an empty string sincethis user has no password.
Click the Submit button -- the console shoulddisplay the response message in the lower part of the form.
c.In the response, in theauthInfoelement, there should be a string thatstarts withauthInfo. Thisstring is your authentication token that you must provide with any furtherpublishing commands.
Use the mouse to highlight the text within theauthInfoelement (including theauthInfo:text) and then start Notepad and pastethe authentication token into Notepad.
4.Next, let's publish abusiness entity. In the jUDDIconsole, on the right side of the window, click the link labeledsave_businessunder theUDDI Publish APIcategory. Again, the console willdisplay a SOAP message with "***" placeholders into which you canenter data.
5.You now need to fill in all of the"***" except for theuseTypefield. You can use the followingvalues:
6. authInfo Copy and paste the authorization token from the last step
7. name Goliath, Inc.
8. description A big company
9. personName Bill Jones
10. phone 555-1212
11. email bill@goliath.com
When you are finished, press the Submit buttonand study the response message.
What is the business key that the registrygenerated for Goliath? Copy and paste it to Notepad.
12.Next, let's create a tModel for the sampleStock Quote service provided by Axis. Follow these steps:
a.First, ensure that the WSDL for the service isavailable. Start another Web browser window and enter:
b. http://localhost:8080/axis/StockQuoteService.jws?wsdl
c.In the jUDDI console, on the right side of thewindow, click the link labeledsave_tModelunder theUDDI Publish APIcategory. Again, the console willdisplay a SOAP message with "***" placeholders into which you canenter data.
Enter the following into the "***"(you can leave fields not mentioned here as "***"):
authInfo Paste the authorization token from Notepad
name http://localhost:8080/axis/StockQuoteService.jws?wsdl
overviewURL http://localhost:8080/axis/StockQuoteService.jws?wsdl
Category Bag
------------
tModelKey UUID:C1ACF26D-9672-4404-9D70-39B756E62AB4
keyName uddi-org:types
keyValue wsdlSpec
Press the Submit button.
Looking at the response, what's the uniquetModel key that was assigned by the server? Copy and paste it into Notepad.
d.Here's a discussion of the data you entered:
§Thename,by convention, is the target namespace of the service as specified in the WSDL
§TheoverviewURL,by convention, is the network addressable URL of the WSDL
§ThistModelKeyis a well known value that we attachas a category to indicate that our tModel references WSDL. ThekeyNameandkeyValueare also part of this convention.
13.Finally, we can create abusiness serviceand associatedbinding template. Follow thesesteps:
a.In the jUDDI console, on the right side of thewindow, click the link labeledsave_serviceunder theUDDI Publish APIcategory. Again, the console willdisplay a SOAP message with "***" placeholders into which you canenter data.
Enter the following into the "***"(you can leave fields not mentioned here as "***"):
authInfo Paste the authorization token from Notepad
businessKey Paste the business key from Notepad
name Stock Quote Service
accessPoint http://localhost:8080/axis/StockQuoteService.jws
tModelKey Paste the tModel key from Notepad
overviewURL http://localhost:8080/axis/StockQuoteService.jws?wsdl
Press the Submit button.
Looking at the response, what's the uniqueservice key that was assigned by the server? Copy and paste it into Notepad.Also paste the generated binding key into Notepad
b.Here's a discussion of the data you entered:
§ThebusinessKeyties this service back to Goliath,Inc.
§TheaccessPoint,by convention, is the service's endpoint URL
§ThistModelKeyties the service and binding templateto the tModel you created earlier
14.You have now registered your service into theUDDI registry. A client application could now look up the service, perhapssearching by tModel name, and then locate the WSDL.
文章来源:http://www.descriptor.com/articles/web-services/juddi-p2.html
分享到:
相关推荐
2. **下载和安装JUDDI**:访问JUDDI的官方网站,下载最新的2.0.1版本。解压到本地目录,然后配置`juddi.properties`文件,将数据库连接信息填入。 3. **下载Apache Tomcat**:从Apache官方网站获取Tomcat 6.0.36的...
JDK1.5、Tomcat5、MySQL和JUDDI用于搭建UDDI服务器的知识点主要围绕在Java开发工具包、Web服务器容器、数据库服务器以及统一描述、发现和集成服务的部署与配置。以下是详细的知识点说明: 1. JDK1.5:Java ...
### 二、开始使用juddi v3 #### 下载选项: - **JAR文件**:适合于将juddi v3作为库集成到现有项目中。 - **WAR文件**:用于部署到标准的Java应用服务器。 - **Tomcat Bundle**:包含了一个预先配置好的Tomcat...
**juddi-0.9rc4** 是JUDDI的一个版本,RC4代表Release Candidate 4,意味着这是该版本的第四个候选发布版。在正式发布之前,候选版本通常用于测试和评估,以确保软件的稳定性和功能性。juddi-0.9rc4可能包含了对早期...
**二、Juddi 3.1.0的安装与配置** 1. **下载与解压**:从官方源或镜像站点下载juddi-tomcat-3.1.0压缩包并解压到合适的目录,解压后得到一个完整的Tomcat服务器实例,其中包含了Juddi的web应用程序。 2. **配置...
二、Juddi与Tomcat的集成 在Juddi-portal-bundle-3.1.0中,集成的Tomcat服务器扮演了关键角色。Tomcat是一个轻量级的Java EE应用服务器,广泛用于部署Servlet和JSP应用。将Juddi与Tomcat集成,意味着用户可以直接在...
**JUDDI (Java Universal Discovery, Description, and Integration v3)** 是一个开源的服务注册和发现平台,主要用于管理和定位Web服务。它遵循WS-Discovery标准,使得服务提供者能够注册他们的服务,而服务消费者...
完成之后有2种方法来发布,注册和查询服务,一个是IBM的UDDI GUI,国内网站找不到任何教程,IBM官网上有教程,全英文版的,反正我是醉了.....之后我选择用UDDI4J连接JUDDI,UDDI4J是Apache的,国内有相关的教程,按...
最后,通过`Publisher`发布到JUDDI服务器。 **6. 应用场景** UDDI4J和WSDL4J的结合广泛应用于服务导向架构(SOA)环境中,帮助实现服务的自动化注册、发现和治理。这对于构建可重用、松耦合的系统非常关键,特别是...
2. **服务发现**:通过查询JUDDI注册中心,服务消费者可以找到满足特定需求的服务,比如根据服务名称、关键字或者分类进行搜索。 3. **服务管理**:用户可以对注册的服务进行更新、删除、订阅等操作,确保服务信息...
UDDI 是 Web 服务框架的一个关键组成部分,支持服务提供商和服务消费者之间的交互。 #### 2. UDDI 的作用 UDDI 的主要作用在于: - **注册**:允许服务提供商在其上发布服务信息。 - **发现**:帮助服务消费者找到...
juddi是Apache软件基金会的一个项目,提供了uddi的服务器实现,而uddi4j是用于与uddi注册中心进行交互的Java客户端API。开发者通常会结合这两个工具,以便在Java环境中方便地执行uddi操作。 【压缩包子文件的文件...
1. **理解基本概念**:首先,你需要了解MyEclipse Web Services的基本概念,这包括WebService的工作原理,SOAP(Simple Object Access Protocol)协议,以及WSDL(Web Services Description Language)文件的作用,...
虽然Java本身并不直接支持UDDI,但可以通过第三方库如Apache JUDDI来进行集成。 四、JAXB(Java Architecture for XML Binding) JAXB是Java中用于XML和Java对象之间自动转换的框架。它使得XML数据可以方便地被Java...
#### 2. Apache Tomcat Tomcat是一款开源的Servlet容器,主要用来运行基于Java的Web应用程序。它支持最新的Servlet和JSP规范,为开发者提供了一个可靠、高性能的环境。 #### 3. Apache James James是一款用Java编写...
文章中提到的Juddi是Apache组织开发的一个开源项目,它是一个UDDI服务器,支持WebLogic和Tomcat等服务器。Juddi采用特定版本进行数据源配置及参数设置,以实现在其数据库中存储封装好的tModel和服务对象。Juddi的...
Java Web服务开发人员包(Java WSDP)中的jUDDI注册表服务器,实现了UDDI v2规范,这意味着它支持更高级别的服务发现和管理功能。 Java WSDP是Oracle公司提供的一个开发工具包,它包含了一系列用于构建和部署Java ...
2. **服务浏览**:展示服务的详细信息,如WSDL(Web服务描述语言)文档、SOAP地址等。 3. **服务操作**:允许用户注册新的Web服务,编辑已存在的服务信息,甚至删除不再需要的服务。 4. **分类管理**:根据分类体系...