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 ... |
Get Java™ Web Services Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.