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

眉间皱痕 提交于 2019-12-22 13:59:45

问题


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?


回答1:


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:

  • Use WSServletContextListener and WSServlet. In this approach WS endpoints are listed in sun-jaxws.xml file.
  • Use Spring-WS. In this case you describe your endpoints in Spring context.


来源:https://stackoverflow.com/questions/8858953/how-to-run-cxf-jax-ws-without-build-in-jetty-use-tomcat-instead

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!