Hi,

Today, I tried you let the CXFServlet work without the Spring support.
I almost get there by commenting out XmlBeanDefinitionReader related staff in the CXFServlet.loadAdditionalConfig method.

Here is my question, why the class loader will load the XmlBeanDefinitionReader's construction parameter class BeanDefinitionRegistry first when CXFServlet is created? I can't see any static code relates to the XmlBeanDefinitionReader in CXF Servlet.

Can anyone tell me what I'm missing?

If there is not a way to walk around it , I suppose to write another CXFServlet which has nothing to do with the Spring's stuff.

Here is my test code for testing the CXFServlet.

public class JettyServer {
   public static void main(String[] args) throws Exception {
       Server httpServer = new Server(9000);
       ContextHandlerCollection contexts = new ContextHandlerCollection();
       httpServer.setHandler(contexts);
Context root = new Context(contexts,"/",Context.SESSIONS); CXFServlet cxf = new CXFServlet();
       ServletHolder servlet = new ServletHolder(cxf);
       servlet.setName("soap");
       servlet.setForcedPath("soap");
       root.addServlet(servlet, "/soap/*");
httpServer.start();
       Bus bus = cxf.getBus();
       BusFactory.setDefaultBus(bus);
       // register service
       String uri = "/" +GreeterImpl.class.getSimpleName();
       System.out.println(uri);
Endpoint.publish(uri, new GreeterImpl());
       Endpoint.publish("/hello", new HelloImpl());
   }

}

Reply via email to