The JavaTM Web Services Tutorial
Home
TOC
PREV TOP NEXT

Using the JAXR API to Access the Registry Server

You can access the Registry Server by using the sample programs in the docs/tutorial/examples/jaxr directory (on UNIX systems) or the docs\tutorial\examples\jaxr directory (on Microsoft Windows systems). You need to edit them as follows

In JAXRPublish.java and JAXRDelete.java, for both the queryURL and the publishURL, specify the Registry Server by using the following string (on one line):

"http://hostname:8080/registry-server/RegistryServerServlet";
 

where hostname is the fully qualified host name. Do not use https: for the publishURL.

Edit the lines that specify a username and password by providing any non-empty string. For example:

// Edit to provide your own username and password	
String username = "x";	
String password = "y";
 

In JAXRQuery.java, specify the Registry Server as follows:

props.setProperty("javax.xml.registry.queryManagerURL",	
"http://hostname:8080/registry-server/RegistryServerServlet");
 

Also in JAXRQuery.java, remove the percent (%) signs from the following line:

namePatterns.add("%" + qString + "%");
 

Instead, specify the namePatterns for the query string as follows:

namePatterns.add(qString);
 
Home
TOC
PREV TOP NEXT