jUDDI Tong Shu Department of Computer Science The University of Memphis Memphis TN 38152 USA A Tutorial for COMP 4302 on Apr 23 2013 Overview Apache jUDDI What is jUDDI Where to get a ID: 587133
Download Presentation The PPT/PDF document "Register Web Services with Apache" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Register Web Services with Apache jUDDI
Tong Shu
Department of Computer Science
The University of Memphis
Memphis, TN 38152, USA
A Tutorial for COMP 4302 on Apr. 23, 2013Slide2
Overview
Apache
jUDDI
What is jUDDI?Where to get a jUDDI Registry Server?How to install / uninstall a jUDDI Registry Server?How to use a jUDDI Registry Server?Demo of How to Register a Web ServiceHow to get the source code of an example?Configure the Connection to a jUDDI Registry ServerPublish a web serviceQuery and delete a web service
2Slide3
What is jUDDI?
Introduction
jUDDI
is an open source Java implementation of the Universal Description, Discovery, and Integration (UDDI) v3 specification for Web ServicesThe jUDDI project includes Scout, which is an implementation of the Java Specification Request (JSR) 93 - JavaTM API for XML Registries 1.0 (JAXR)jUDDI FeaturesOpen SourcePlatform IndependentUse with any relational database that supports ANSI standard SQL (MySQL, Oracle, DB2, Sybase, Derby etc.)Deployable on any Java application server that supports the Servlet 2.3 specificationjUDDI registry supports a clustered deployment configurationEasy integration with existing authentication systems
Supports in VM embeddable mode
3Slide4
Where to Get a jUDDI Registry Server?
Binary Package
http://apache.mirrors.lucidnetworks.net/juddi/3_1_3/
Versionjuddi-portal-bundle-3.1.3.zipjUDDI User Guidehttp://juddi.apache.org/docs/3.x/userguide/pdf/userguide.pdf4Slide5
Install a jUDDI Registry Server in Linux
Download Java JDK from
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
Set environment variables as a root# vi /etc/profileAppend# source /etc/profileUnzip the jUDDI package and enter the subfolder# unzip juddi-portal-bundle-3.1.3.zip# cd juddi-portal-bundle-3.1.3/bin/Start up a jUDDI server (Shutdown the server with script shutdown.sh)
#
chmod
777 startup.sh
# ./startup.sh
5
export JAVA_HOME=/
usr
/local/jdk1.7.0_21
export PATH=$PATH:/
usr
/local/jdk1.7.0_21/bin
Using CATALINA_BASE: /home/tong/jUDDI/juddi-portal-bundle-3.1.3Using CATALINA_HOME: /home/tong/jUDDI/juddi-portal-bundle-3.1.3Using CATALINA_TMPDIR: /home/tong/jUDDI/juddi-portal-bundle-3.1.3/tempUsing JRE_HOME: /usr/local/jdk1.7.0_21
Note: Run startup.bat to start up a
jUDDI
server in Windows Slide6
Use a jUDDI Registry Server
Open a Web Browser
Firefox 20.0.1
Internet Explorer 8 Type “http://mouse.cs.memphis.edu:8080/juddiv3” in the browser address boxThe jUDDI Welcome home page should appear6Our
jUDDI
Server’s
Address and PortSlide7
Use a jUDDI Registry Server (Cont.)
View service listing
http://mouse.cs.memphis.edu:8080/juddiv3/services
Log in jUDDI Portalhttp://mouse.cs.memphis.edu:8080/pluto/portal/jUDDIVerify/change username and/or password in the file juddi-portal-bundle-3.1.3/conf/tomcat-users.xml7Slide8
An Example of a jUDDI Registry Client
SimplePublish.java
This java code is an example provided by the Apache Software Foundation for tutoring you on how to publish your own web service to
jUDDIhttp://juddi.apache.org/source-repository.html8Slide9
How to get the buildable source code?
Prerequisites
Install the Java SE Development Kit (JDK)
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.htmlInstall the Eclipse IDEhttp://www.eclipse.org/downloads/Install the Eclipse Subversion pluginClick Help -> Install New Software… This pops up an Install window.In the Install window’s Work with: dropdown, select “--All Available Sites--”. In the filter field (initially containing the words “type filter text”), enter Subversive. This causes the Name/Version columns to update. (Eclipse is very slow in updating the table.)Check the box next to Subversive SVN Team Provider, and click the Next button. Click through the installation wizard by clicking Next/Finish/etc., and restart Eclipse when prompted. When Eclipse starts, it pops up an Install Connectors window.
From the Install Connectors window, select the newest version of SVN Kit
(not
JavaHL
), and click Finish. This
causes
an installation wizard to pop up.
Click through the installation wizard by clicking Next/Finish/etc., and restart Eclipse when prompted. When Eclipse restarts, you
are
back at the Welcome screen.
Click the Workbench button. This
opens the Java EE perspective.Click Window -> Open Perspective -> Other… This pops up a list of perspectives.Select SVN Repository Exploring from the list to open the perspective. The left column of the main Eclipse window has a SVN Repositories view.Install the Eclipse Maven plugin http://matsim.org/node/3669Slide10
How to get the buildable source code? (Cont.)
Download the buildable source code in Eclipse
Go to the SVN Repository Exploring perspective.
Click the New Repository Location button at the top of the SVN Repositories view. This should open a New Repository Location window with fields for you to fill in.Fill in the URL field as http://svn.apache.org/repos/asf/juddi/tags/juddi-3.1.3, and click Finish. This should add the repository to the SVN Repositories view.Expand the contents of the repository by clicking the triangle. You should see a docs/examples/simple-publish folder. Right click on simple-publish, and select Check Out. Go to the Java EE perspective. You can see the simple-publish project.Modify the content of all the elements <version> under <dependencies> to 3.1.3 in pom.xml in the simple-publish project.Right click on simple-publish, and click Maven->Enable Dependency Management. The entire buildable source code is downloaded automatically.10Slide11
pom.xml
11Slide12
Configure the Connection to a jUDDI Server
The
jUDDI
client has a configuration file, called “uddi.xml”, in which you can change the server name and port number12Slide13
Demo
Publish a web service
jUDDI
Client: Run SimplePublish.java as a Java Application, and check the result in the consolejUDDI Server: Check jUDDI -> UDDIBrowser Portlet, and one more web service should appearQuery and Delete a web servicejUDDI Client: Run SimpleDelete.javajUDDI Server: The queried web service should disappear in jUDDI -> UDDIBrowser Portlet13Slide14
Steps for publishing
Set
up the values to get an authentication token for the 'root'
user.Make API call that retrieves the authentication token for the 'root' user.Create a new publisher that we will use to publish our entities to.Add the publisher to the "save" structure, using the 'root' user authentication information and save it. Our publisher is now saved, so now we want to retrieve its authentication token.Create the parent business entity that will contain our service.Add the business entity to the "save" structure, using our publisher's authentication information and save it.Create a service to save. Only add the minimum data: the parent business key retrieved from saving the business above and a single name.
Add binding templates, etc...
Add
the service to the "save" structure, using our publisher's authentication
information
and
save it.
Now you have a publisher saved who in turn published a business and service via the
jUDDI
API
.14Slide15
Reference
[1] Apache
iUDDI
Project http://juddi.apache.org/[2] Apache jUDDI User Guide http://juddi.apache.org/docs/3.x/userguide/html/index.html[3] jUDDI Blog http://apachejuddi.blogspot.com/search?updated-max=2010-09-11T14:43:00-07:00&max-results=7&start=7&by-date=false[4] Tutorial for Using Eclipse http://matsim.org/book/export/html/36415