Q: How do I create a JAXR Connection object when
bootstrapping my registry client application.
Ans: See the following code example:
private void createConnection(String registryURL)
throws JAXRException {
ConnectionFactory connFactory =
JAXRUtility.getConnectionFactory();
Properties props = new Properties();
if (registryURL == null) {
throw new JAXRException("QueryManager endpoint
MUST not be null");
}
props.put("javax.xml.registry.queryManagerURL",
registryURL);
props.put("javax.xml.registry.lifeCycleManagerURL",
qmEndpoint);
connFactory.setProperties(props);
Connection connection = connFactory.createConnection();
}
Logged In: YES
user_id=366837
Imports for above example look like:
import javax.xml.registry.Connection;
import javax.xml.registry.ConnectionFactory;
import javax.xml.registry.JAXRException;
import org.freebxml.omar.client.xml.registry.util.JAXRUtility;
import
org.freebxml.omar.common.profile.ws.wsdl.CanonicalConstants;
...