Search code examples
tomcatjettyjax-wscxf

how to run cxf jax-ws without build-in jetty (use tomcat instead)


every time when i run with the following inside tomcat, cxf build-in jetty is up and serving the request.

<jaxws:endpoint 
    id="wsServer"
    implementor="a.b.c.ServiceImpl"
    address="http://localhost:8080/ws">
</jaxws:endpoint>    

is there any way we have tomcat receiving the request and delegating to cxf?


Solution

  • UPDATE

    You can avoid using embedded Jetty by following this article: Use org.apache.cxf.transport.servlet.CXFServlet in your web.xml and don't forget to import META-INF/cxf/cxf-servlet.xml.

    Alternatively (if CXF is not your must) you can: