[jboss-user] [JBossWS] - Unable to create connection to jUDDI registry

lretief do-not-reply at jboss.com
Thu Aug 23 09:25:17 EDT 2007


I am trying to establish a connection to the JBossWS (2.0.0) jUDDI registry from a standalone JVM client.

First I tried, as per the samples, doing a:

ConnectionFactory factory = ConnectionFactory.newInstance();

to get the ConnectionFactory, but it told me that it could not create an instance of null.

So, reading the docs for ConnectionFactory, it said I should rather do a JNDI lookup, which I now successfully do as follows:

Context ctx = new InitialContext(jndiProps);
ConnectionFactory factory = (ConnectionFactory) ctx.lookup("JAXR");

I then set up all the properties as per docs and code:

String queryurl = System.getProperty("jaxr.query.url", "http://localhost:8080/juddi/inquiry");
String puburl = System.getProperty("jaxr.publish.url", "http://localhost:8080/juddi/publish");

Properties props = new Properties();
props.setProperty("javax.xml.registry.queryManagerURL", queryurl);
props.setProperty("javax.xml.registry.lifeCycleManagerURL", puburl);

String transportClass = System.getProperty("juddi.proxy.transportClass", "org.jboss.jaxr.juddi.transport.SaajTransport");
System.setProperty("juddi.proxy.transportClass", transportClass);

factory.setProperties(props);

That all works.

And now, the line that breaks it all:

Connection connection = factory.createConnection();

My exception:

    [junit] java.lang.NullPointerException
    [junit]     at org.apache.juddi.proxy.RegistryProxy.getTransport(RegistryProxy.java:459)
    [junit]     at org.apache.juddi.proxy.RegistryProxy.init(RegistryProxy.java:189)
    [junit]     at org.apache.juddi.proxy.RegistryProxy.(RegistryProxy.java:125)
    [junit]     at org.apache.ws.scout.registry.ConnectionImpl.(ConnectionImpl.java:59)
    [junit]     at org.apache.ws.scout.registry.ConnectionFactoryImpl.createConnection(ConnectionFactoryImpl.java:86)

Any help much appreciated.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077337#4077337

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077337



More information about the jboss-user mailing list