Download FAQ History |  | API Search Feedback

> ## Overview of JAXR

> This section provides a brief overview of JAXR. It covers the following topics:

> - What Is a Registry?
> - What Is JAXR?
> - JAXR Architecture

> ### What Is a Registry?

> An XML registry is an infrastructure that enables the building, deployment, and discovery of Web services. It is a neutral third party that facilitates dynamic and loosely coupled business-to-business (B2B) interactions. A registry is available to organizations as a shared resource, often in the form of a Web-based service.

> Currently there are a variety of specifications for XML registries. These include

> - The ebXML Registry and Repository standard, which is sponsored by the Organization for the Advancement of Structured Information Standards (OASIS) and the United Nations Centre for the Facilitation of Procedures and Practices in Administration, Commerce and Transport (U.N./CEFACT)
> - The Universal Description, Discovery, and Integration (UDDI) project, which is being developed by a vendor consortium

> A registry provider is an implementation of a business registry that conforms to a specification for XML registries.

> ### What Is JAXR?

> JAXR enables Java software programmers to use a single, easy-to-use abstraction API to access a variety of XML registries. A unified JAXR information model describes content and metadata within XML registries.

> JAXR gives developers the ability to write registry client programs that are portable across different target registries. JAXR also enables value-added capabilities beyond those of the underlying registries.

> The current version of the JAXR specification includes detailed bindings between the JAXR information model and both the ebXML Registry and the UDDI version 2 specifications. You can find the latest version of the specification at

>     http://java.sun.com/xml/downloads/jaxr.html

> At this release of the Java WSDP, JAXR implements the level 0 capability profile defined by the JAXR specification. This level allows access to both UDDI and ebXML registries at a basic level. At this release, JAXR supports access only to UDDI version 2 registries.

> Currently several public UDDI version 2 registries exist.

> The Java WSDP Registry Server provides a UDDI version 2 registry that you can use to test your JAXR applications in a private environment. The Registry Server includes a database based on the native XML database Xindice, which is part of the Apache XML project. This database provides the repository for registry data. The Registry Server does not support messages defined in the UDDI Version 2.0 Replication Specification. See The Java WSDP Registry Server for more information.

> Note: If you use the Java WSDP Registry Server to test JAXR applications that you develop using the J2EE 1.4 Application Server, make sure that in your `PATH` you place the J2EE 1.4 Application Server `bin` directories before the Java WSDP `bin` directories.

> Several ebXML registries are under development, and one is available at the Center for E-Commerce Infrastructure Development (CECID), Department of Computer Science Information Systems, The University of Hong Kong (HKU). For information, see `http://www.cecid.hku.hk/Release/PR09APR2002.html`.

> A JAXR provider for ebXML registries is available in open source at `http://ebxmlrr.sourceforge.net`.

> ### JAXR Architecture

> The high-level architecture of JAXR consists of the following parts:

> - A JAXR client: a client program that uses the JAXR API to access a business registry via a JAXR provider.
> - A JAXR provider: an implementation of the JAXR API that provides access to a specific registry provider or to a class of registry providers that are based on a common specification.

> A JAXR provider implements two main packages:

> - `javax.xml.registry`, which consists of the API interfaces and classes that define the registry access interface.
> - `javax.xml.registry.infomodel`, which consists of interfaces that define the information model for JAXR. These interfaces define the types of objects that reside in a registry and how they relate to each other. The basic interface in this package is the `RegistryObject` interface. Its subinterfaces include `Organization`, `Service`, and `ServiceBinding`.

> The most basic interfaces in the `javax.xml.registry` package are

> - `Connection`. The `Connection` interface represents a client session with a registry provider. The client must create a connection with the JAXR provider in order to use a registry.
> - `RegistryService`. The client obtains a `RegistryService` object from its connection. The `RegistryService` object in turn enables the client to obtain the interfaces it uses to access the registry.

> The primary interfaces, also part of the `javax.xml.registry` package, are

> - `BusinessQueryManager`, which allows the client to search a registry for information in accordance with the `javax.xml.registry.infomodel` interfaces. An optional interface, `DeclarativeQueryManager`, allows the client to use SQL syntax for queries. (The implementation of JAXR in the J2EE Application Server does not implement `DeclarativeQueryManager`.)
> - `BusinessLifeCycleManager`, which allows the client to modify the information in a registry by either saving it (updating it) or deleting it.

> When an error occurs, JAXR API methods throw a `JAXRException` or one of its subclasses.

> Many methods in the JAXR API use a `Collection` object as an argument or a returned value. Using a `Collection` object allows operations on several registry objects at a time.

> Figure 14-1 illustrates the architecture of JAXR. In the Java WSDP, a JAXR client uses the capability level 0 interfaces of the JAXR API to access the JAXR provider. The JAXR provider in turn accesses a registry. The Java WSDP supplies a JAXR provider for UDDI registries.

> Figure 14-1 JAXR Architecture

Download FAQ History |  | API Search Feedback

All of the material in The Java(TM) Web Services Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.