You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Gustavo Morozowski <mo...@gmail.com> on 2007/06/13 21:16:57 UTC

client and server in same jvm

I am trying to run a client and server using simple frontend, as documented,
but in same jvm. I'm not including spring jars, so CXFBusFactory is being
used.

When the server service is created the DestinationFactory is null so the
transportId is defined as "http://schemas.xmlsoap.org/wsdl/soap/".

The problem happens when the client service is created, as
JettyHTTPTransportFactory is selected as DestinationFactory without any
transportIds defined.

What configurations I'm missing here?

Thanks,

Gustavo

Stack trace:

Jun 13, 2007 4:03:56 PM
org.apache.cxf.service.factory.ReflectionServiceFactoryBeanbuildServiceFromClass
INFO: Creating Service {
http://api.helloworld.example.newton.cauldron.org/}HelloWorld from class
org.cauldron.newton.example.helloworld.api.HelloWorld
Jun 13, 2007 4:03:57 PM sun.reflect.NativeMethodAccessorImpl invoke0
INFO: Logging to org.slf4j.impl.JDK14LoggerAdapter(org.mortbay.log) via
org.mortbay.log.Slf4jLog
Jun 13, 2007 4:03:57 PM sun.reflect.NativeMethodAccessorImpl invoke0
INFO: jetty-6.1.2rc0
Jun 13, 2007 4:03:57 PM sun.reflect.NativeMethodAccessorImpl invoke0
INFO: Started SelectChannelConnector @ 0.0.0.0:8080
Jun 13, 2007 4:03:57 PM
org.apache.cxf.service.factory.ReflectionServiceFactoryBeanbuildServiceFromClass
INFO: Creating Service {
http://api.helloworld.example.newton.cauldron.org/}HelloWorld from class
org.cauldron.newton.example.helloworld.api.HelloWorld
Exception in thread "main" java.lang.NullPointerException
    at org.apache.cxf.frontend.AbstractEndpointFactory.createEndpointInfo(
AbstractEndpointFactory.java:167)
    at org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(
AbstractEndpointFactory.java:104)
    at org.apache.cxf.frontend.ClientFactoryBean.create(
ClientFactoryBean.java:44)
    at org.apache.cxf.frontend.ClientProxyFactoryBean.create(
ClientProxyFactoryBean.java:82)
    at org.cauldron.newton.binding.ws.test.JaxwsTest.testService(
JaxwsTest.java:42)
    at org.cauldron.newton.binding.ws.test.JaxwsTest.main(JaxwsTest.java:48)


Code listing:

    ServerFactoryBean svrFactory = new ServerFactoryBean();
    svrFactory.setServiceClass(HelloWorld.class);
    String address1 = "http://localhost:8080/HelloWorld";
    svrFactory.setAddress(address1);
    svrFactory.setServiceBean(HelloWorldImpl.class);
    svrFactory.create();

    ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
    factory.setServiceClass(ref.getInterface());
    String address = "http://localhost:8080/HelloWorld";
    factory.setAddress(address);
    service = factory.create();