问题
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