You need to create the spring bus first to triage the spring application context loading.
SpringBusFactory bf = new SpringBusFactory();
Bus bus = bf.createBus();

Or you can take the http-jetty systest as an example[1]

[1] https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty

Willem.
Davide Gesino wrote:
I have always been using CXF deployed on tomcat.
Switching to Jetty embedded I have some problems trying to understand some
things.

When I first publish and Endpoint CXF such as:
Endpoint.publish(address, implementor);
CXF loads the cxf.xml file and the Bus and everything else are instantiated,
the jetty server is started and the endpoints get published.

I would like to create everything in a Spring fashion without using
(eventually) the Endpoint.publish, with Spring creating and publishign
magically the endpoints 4 me.
Creating an ApplicationContext explicitly in my code I see almost everthing
to be correctly instantiated, but the Jetty server seems not to be up and
running.
Should I have to start it explicitly?

In this case what should be the proper endpoint address in the cxf file??

4 example assuming:
Object implementor = new GreeterImpl();
String address = "http://localhost:8080/SoapContext/SoapPort";;
Endpoint.create(Greeter.class);

what should I have to write in my cxf.xml, something like;

<jaxws:endpoint id="creditEndpoint" address
="http://localhost:9000/SoapContext/SoapPort";
implementor="org.apache.hello_world_soap_http.GreeterImpl"  >              
        </jaxws:endpoint> ??

Where is my fault?





Reply via email to