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?

Did you use this spring configuration to create the ApplicationContext ? If yes , then you do not need to start the sever explicitly . Cxf use the spring bean definition parser to create the Endpoint and publish it
automatically.

The address is also correct in your spring configuration . I do not see any error . I tired the following junit test code
it works.

@Test
   public void testEndpoints() throws Exception {
       ClassPathXmlApplicationContext ctx =
new ClassPathXmlApplicationContext(new String[] {"/org/apache/cxf/systest/spring/tmp.xml"});
       Thread.sleep(300*1000);
}

Regards

Jim








Reply via email to