如何在没有内置jetty的情况下运行cxf jax-ws(使用tomcat代替)
每次当我在 tomcat 中运行以下内容时,cxf 内置码头就会启动并满足请求。
<jaxws:endpoint
id="wsServer"
implementor="a.b.c.ServiceImpl"
address="http://localhost:8080/ws">
</jaxws:endpoint>
有什么办法让tomcat接收请求并委托给cxf吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
更新
您可以按照本文:在 web.xml 中使用
org.apache.cxf.transport.servlet.CXFServlet
并且不要忘记导入META-INF/cxf/cxf-servlet.xml
。或者(如果 CXF 不是您必须的)您可以:
WSServletContextListener< /code> 和
WSServlet
。在此方法中,WS 端点在
sun-jaxws.xml
文件中列出。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 importMETA-INF/cxf/cxf-servlet.xml
.Alternatively (if CXF is not your must) you can:
WSServletContextListener
andWSServlet
. In this approach WS endpoints are listed insun-jaxws.xml
file.