|
Home TOC |
|
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/jaxrdirectory (on UNIX systems) or thedocs\tutorial\examples\jaxrdirectory (on Microsoft Windows systems). You need to edit them as followsIn
JAXRPublish.javaandJAXRDelete.java, for both thequeryURLand thepublishURL, specify the Registry Server by using the following string (on one line):"http://hostname:8080/registry-server/RegistryServerServlet";where
hostnameis the fully qualified host name. Do not usehttps:for thepublishURL.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
namePatternsfor the query string as follows:namePatterns.add(qString);
|
Home TOC |
|