You are on page 1of 10

The Web Services Infrastructure Company

Developers Corner Tutorial


An Introduction to Web Services:
Part Five - Web Services Publishing
> Developers Corner: Web Services Publishing

Contents Contents ...............................................................................2

Web Services Publishing......................................................3


Introduction 3

Quick Introduction to the UDDI Data Model........................4

Using the UDDI API ..............................................................6


Registering with UDDI 6
Choosing a demo business name 6
Publishing the Music Service 6
Web Service Discovery 7
UDDI and Development Tools 8
UDDI and WASP Server 8
Review 8

Appendix A. Installing the Software....................................9


Resources 9

Copyright and Disclaimer ..................................................10

Copyright © 2003, Systinet Corp. Page 2 of 10


Web Services Publishing Introduction
Along with SOAP and WSDL, UDDI is one of the core technologies that
enable Web services. A UDDI implementation is a Web service registry that
provides a mechanism to advertise and discover Web services. A UDDI
registry contains categorized information about businesses and the services
that they offer, and it associates those services with technical specifications
of the Web service. These technical specifications are usually defined using
WSDL. WSDL describes what a Web service does, how it communicates,
and where it lives. A Web service consumer queries the UDDI registry to
find the WSDL descriptions to determine how to use the Web service. The
WASP UDDI registry is itself a Web service. The UDDI specification defines
an API based on SOAP messages, with a WSDL description of the registry
service. Most UDDI registries also provide a browser-based human
interface.

The UDDI Project's original focus was on operating a global public


registry called the UDDI Business Registry (UBR). This registry is available
to everyone at no charge and all information registered in the public
registry is available to the general public. All information in any one UBR
registry node is automatically replicated to all other UBR nodes within 24
hours.

Organizations can also set up a private registry to support the


requirements of an enterprise or a private community. A private registry
can impose additional security controls to protect the integrity of the
registry data and to prevent access by unauthorized users. A private
registry might contain only private information, it might contain a subset of
the public registry information, or it might contain a combination of public
and private information.

Basically there are two mechanisms that you can use to interact with a
UDDI Registry. The first one is to use an HTTP browser-based interface.
You can check out these UDDI registries on the Internet:

• http://uddi.microsoft.com - Microsoft Public UDDI Registry

• http://www-3.ibm.com/services/uddi/v2beta/protect/registry.html
- IBM Public UDDI Registry

• http://udditest.sap.com/ - SAP Public UDDI Registry

• http://www.ntt.com/uddi/ - NTT UDDI Registry (Japanese


Character Set Recommended)

• http://www.systinet.com/uddi/web - Systinet Live UDDI Registry

The most recent information about UDDI is available at the UDDI.org site
[01].

If you're interested in exploring the WASP UDDI browser interface in more


detail, I would recommend you check out the UDDI Web GUI Tutorial [02].
Today we will focus on the other mechanism, programmatic access to UDDI
using the UDDI SOAP API.

Copyright © 2003, Systinet Corp. Page 3 of 10


> Developers Corner: Web Services Publishing

Quick Introduction to the A UDDI Registry contains information about businesses and the services
UDDI Data Model they offer. The information is organized as follows:

• Business Entity. A business entity contains information about


a business including its name, a short description, and some
basic contact information. Each business can also be
associated with unique business identifiers, including a Thomas
Register identifier and a D-U-N-S number, and with a list of
categorizations that describe the business. UDDI provides built-
in support for a number of taxonomies, including SIC (Standard
Industrial Classification codes), NAICS (North American
Industry Classification System), UNSPSC (Universal Standard
Products and Services Codes), and a geopolitical taxonomy.
Businesses and industry groups can create additional
taxonomies to categorize their businesses and services.

• Business Service. Associated with the business entity is a list


of business services offered by the business entity. Each
business service entry contains a business description of the
service, a list of categories that describe the service, and a list
of binding templates that point to technical information about the
service. Each business service can be associated with a list of
categorizations that describe the service.

• Binding Templates. Associated with each business service


entry is a list of binding templates that provide information on
where to find the service and how to use the service. For
example, a binding template may contain the access point of
the service implementation and a pointer to information on how
to use the service. The binding template also associates the
business service with a service type.

• Service Types. A service type, defined by a construct called a


tModel, defines an abstract service. Multiple businesses can
offer the same type of service, all supporting the same service
interface. A tModel specifies information such as the tModel
name, a list of categories that describe the tModel, and pointers
to technical specifications for the tModel. For example, a tModel
may point to a WSDL document that describes the abstract
service type.

Figure 1: The UDDI Data Model

Copyright © 2003, Systinet Corp. Page 4 of 10


UDDI is a general-purpose registry. It can be used to register any type of
service, not just Web services. UDDI doesn't require that the services
registered within it support SOAP interfaces or that they be described using
WSDL. In fact, there are only a few dependencies among the three Web
services technologies. For example UDDI specifies that calls should be
made using SOAP. In any event the system works best when the three
technologies are used tightly together. This best practices white paper [03]
explains how to use UDDI and WSDL together.

When looking for a Web service, a developer queries the UDDI registry,
searching for a service offered by a business. From the Binding Template
entry for the specific service, the developer can obtain the service access
point and a pointer to the tModel that describes the service type. From the
tModel, the developer can obtain the WSDL description describing the
service interface. Using the access point and the WSDL description, the
developer can construct a SOAP client interface that can communicate with
the Web Service.

Copyright © 2003, Systinet Corp. Page 5 of 10


> Developers Corner: Web Services Publishing

Using the UDDI API The UDDI API consists of two interfaces: a publishing API and an inquiry
API. We will first use the publishing API to register the FreeDB Web service
in Systinet's Live UDDI Registry: http://www.systinet.com/uddi/web . The
FreeDB Web service lets you search the Free DB music database for CD
and song titles. Please see the Systinet Developers' Corner demo [04] for
more details about the FreeDB Web service. Next we'll use the inquiry API
to find our service.

Registering with UDDI


Since the UDDI publishing API requires security, we will first need to
become a registered user of the UDDI registry. Please use the UDDI
registration form: http://www.systinet.com/uddi/web and register yourself
with Systinet's Live UDDI Registry. Please use a valid e-mail address
because you'll need it later for account confirmation. (Don't worry. We
won't use your e-mail address for any marketing purposes.) After
registration, please check your e-mail for the account creation
confirmation. You'll need to follow a link inside the incoming message in
order to activate your UDDI account.

Choosing a demo business name


In order to execute the following demos properly, you'll need to choose a
unique demo business name. You can check to see if your intended
business name is available by performing a UDDI business entity query in
the Systinet Live UDDI Registry Browser:
http://www.systinet.com/uddi/web (choose Find Business from the Main
UDDI menu). Do not register your business name at this time, as we will
do so programmatically when publishing the Music Service that follows.

Publishing the Music Service


NOTE: If you haven't already downloaded the software used to create the
tutorial examples, please refer to the installation instructions in the
appendix. As Live UDDI requires a secure connection when publishing be
sure WASP is installed WITH security enabled. This will prepare the
protected store (PSTORE) to handle the Systinet certificate.

You'll also need to download the tutorial sources. All Java sources
mentioned in the tutorial examples can be found in the src subdirectory of
the unpacked tutorial sources archive. The link to tar sources for Linux is
available in the appendix. They all reside in the com.systinet.demos
package. Similarly all scripts used in the examples are located in the bin
subdirectory.

NOTE: We're using MS Windows notation for our command-line


commands. If you have a Unix-based environment, please use the
appropriate .sh script instead of the Windows .bat version.

We will now publish our music search Web service in the UDDI registry
using a simple registration tool. Run the run.bat make_register and run.bat
run_register commands in the bin subdir of the tutorials directory. Provide
your UDDI user name and password and the demo business name from the
previous steps. Push the Publish button to publish the music search service
under your new business entity. You might want to verify that your
business entity was successfully published using the Systinet Live UDDI
Registry Browser again. See http://www.systinet.com/uddi/web

Copyright © 2003, Systinet Corp. Page 6 of 10


Figure 2: The UDDI Publishing Form

The complete source code for this registration tool is in the


src\demo\uddi\JUDDIRegister.java and src\demo\uddi\UDDIPublish.java
Java source files. You may also want to look at the Systinet UDDI API
JavaDoc [05].

Web Service Discovery


At this point we have our music search Web service registered in UDDI.
Now we can use the UDDI inquiry API for Web service discovery. The music
search UDDI application demonstrates how to use the UDDI inquiry API.
You can start the application by invoking the run.bat make_uddi and
run.bat run_uddi commands from the tutorial bin directory. It will prompt
you for your demo business name and the name of an artist or CD album
title that you'd like to search for. The application will query UDDI to
discover the music search web service and then dynamically use the
service to search for the music.

Figure 3: The UDDI Discovery Form

Copyright © 2003, Systinet Corp. Page 7 of 10


> Developers Corner: Web Services Publishing

You can find the source code of this example in


src\demo\freedb\JMusicFinderUDDI.java, src\demo\uddi\UDDIQuery.java
and src\demo\freedb\UDDIMusicServiceFactory.java Java source files. This
simple example queries the UDDI registry before each invocation. A real-
life application would normally cache the service information, and so would
only query UDDI once at startup or only if the Web service connection
parameters (URL) expire.

UDDI and Development Tools


Many of today's Web services development tools provide automated
wizards for Web services publishing and discovery. Systinet WASP
Developer, for example, provides wizards that allow you to create new Web
services based on information retrieved from UDDI and to publish Web
services to the UDDI registry directly from your development environment.
WASP Developer works as a plug-in to popular Java IDEs. If you're
interested in Web services development using a Java IDE, you can
download Systinet's Web services development extensions for NetBeans
and Sun ONE Studio, Borland JBuilder or Eclipse [06].

UDDI and WASP Server


WASP Server is seamlessly integrated with the UDDI registry. After
registering the UDDI registry with WASP Server users can easily publish
Web services deployed to the WASP Server from the WASP Administration
console. WASP Server keeps track of all Web services that have been
registered in UDDI and allows simple synchronization with preferred UDDI
registries. Please see WASP Server Utility Services [07] documentation for
more details.

Review
In this part of the Web services tutorial we learned how to publish and
discover Web services using a UDDI registry. We first introduced the basic
UDDI data model, including Business Entity, Business Service, Binding
Template, and tModel, and explained how they work together. Then we
showed an example of programmatically interacting with UDDI using the
publishing and inquiry APIs.

Copyright © 2003, Systinet Corp. Page 8 of 10


Appendix A. Installing the REQUIREMENTS: We assume that you have a Java 1.4 or later SDK and a
standard HTTP browser installed on your system and the JAVA_HOME
Software system variable points to the Java root directory.

If you want to follow along with the demo, you'll need to download WASP
Server for Java, 4.5
(http://www.systinet.com/products/wasp_jserver/download/list) from the
Systinet Web site. Unpack the downloaded package to a local disk and run
the install script from the bin subdirectory of the WASP Server installation.
You'll need to agree to the product license and then please answer with
default options to all installation questions (simply press Enter multiple
times).

IMPORTANT: Please set the WASP_HOME environment variable to point to


the WASP Server root directory.

You'll also need to download the tutorial sources (see below) for your
system and unpack them to the local disk.

Resources
[01] http://www.uddi.org - The official UDDI site.

[02]
http://www.systinet.com/doc/wasp_uddi/uddi/index.html#webinterfaceste
pbystepguide.html - Tutorial for using the WASP UDDI Web GUI.

[03]
http://www.systinet.com/get&dl=Li4vdXBsb2FkZWRfZGF0YS93cF9XU0RMX
3RvX1VEREkucGRm - a best practices whitepaper on working with WSDL
and UDDI

[04] http://dev.systinet.com/code_samples/demos/freedb - The Systinet


Developers' Corner Java Demo that this tutorial uses.

[05] http://www.systinet.com/doc/wasp_uddi/api/ - The WASP UDDI API.

[06] http://www.systinet.com/products/wasp_developer/overview - WASP


Developer.

[07]
http://www.systinet.com/doc/wasp_jserver/waspj/index.html#utilitywebse
rvicespanel.html - WASP Utility Web Services Documentation.

Source Files for this Tutorial


[10] http://dev.systinet.com/get&dl=dHV0b3JpYWxzLnppcA== - the ZIP
archive

[11] http://dev.systinet.com/get&dl=dHV0b3JpYWxzLnRneg== - the


TAR.GZ archive.

Live UDDI Registries


[12] https://uddi.microsoft.com/

[13] https://www-3.ibm.com/services/uddi/v2beta/protect/registry.html

[14] http://udditest.sap.com/

[15] http://www.ntt.com/uddi/

[16] http://www.systinet.com/uddi/web

Copyright © 2003, Systinet Corp. Page 9 of 10


> Developers Corner: Web Services Publishing

Copyright and Disclaimer This document and the information contained herein are the property of
Systinet Corporation and shall not be reproduced or copied in whole or in
part without written permission of Systinet Corp.

Copyright © 2003 Systinet Corp. All Rights Reserved.

The information in this document is preliminary and is subject to change


without notice and should not be construed as a commitment by Systinet
Corporation.

SYSTINET CORPORATION SHALL HAVE NO LIABILITY FOR THIS


DOCUMENT, INCLUDING ANY LIABILITY FOR NEGLIGENCE. SYSTINET
CORPORATION MAKES NO WARRANTIES, EXPRESS, IMPLIED, STATUTORY,
OR IN ANY OTHER COMMUNICATION. SYSTINET CORPORATION
SPECIFICALLY DISCLAIMS ANY WARRANTY OF MERCHANTABILITY OR
SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE
AND NON-INFRINGEMENT.

Systinet, WASP, "The Web Services Infrastructure Company" and "Web


Services That Work" are trademarks of Systinet Corp.

Java and all Java-based marks are trademarks or registered trademarks of


Sun Microsystems, Inc. in the U.S. and other countries.

Microsoft, Windows and Windows NT and the Windows logo are trademarks
or registered trademarks of Microsoft Corporation in the United States and
other countries.

UNIX is a registered trademark of The Open Group in the United States and
other countries.

Other company, product, and service names mentioned in these


documents may be trademarks or service marks of others.

Systinet Corp.
Five Cambridge Center, 8th Floor
Cambridge, MA 02142
Phone: 1.617.868.2224
http://www.systinet.com

Copyright © 2003, Systinet Corp. Page 10 of 10

You might also like