O'Reilly logo

Java™ Web Services Unleashed by Mark Wutka, Joseph Weber, Arthur Ryman, K. Scott Morrison, Benoît Marchal, Matthias Kloppmann, Steven Haines, Darren Govoni, Francisco Curbera, Frank Cohen, Robert Brunner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using JAXR

The JAXR API is very simple to use, although you must do a few housekeeping chores before you can actually access a registry.

Creating a Connection

Before you create a connection, you must use the Java Naming and Directory Interface (JNDI) to locate a ConnectionFactory. After you obtain the factory object, you must specify the factory implementation to use, as well as the URLs for the query manager and life cycle manager (in UDDI terms, the inquiry and publish APIs).

Listing 14.1 shows a program that creates a connection to IBM's UDDI registry. (It doesn't do anything with the connection, however.)

Listing 14.1. GetConn.java
 import javax.xml.registry.*; import javax.naming.*; import java.util.*; public class GetConn { public static ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required