如何在没有内置码头的情况下运行cxf jax-ws(改用tomcat) [英] how to run cxf jax-ws without build-in jetty (use tomcat instead)
本文介绍了如何在没有内置码头的情况下运行cxf jax-ws(改用tomcat)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
每次当我在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>
tomcat有什么办法接收请求并委派给cxf?
is there any way we have tomcat receiving the request and delegating to cxf?
推荐答案
更新
通过遵循本文,您可以避免使用嵌入式Jetty:使用org.apache.cxf.transport.servlet.CXFServlet
放在您的web.xml中,请不要忘记导入META-INF/cxf/cxf-servlet.xml
.
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
.
或者(如果不是CXF,则可以),您可以:
Alternatively (if CXF is not your must) you can:
- 使用
WSServletContextListener
和WSServlet
.在这种方法中,WS端点在sun-jaxws.xml
文件中列出. - 使用Spring-WS .在这种情况下,您将在Spring上下文中描述端点.
- Use
WSServletContextListener
andWSServlet
. In this approach WS endpoints are listed insun-jaxws.xml
file. - Use Spring-WS. In this case you describe your endpoints in Spring context.
这篇关于如何在没有内置码头的情况下运行cxf jax-ws(改用tomcat)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文