使用 OpenEJB 在 Tomcat 上部署 Web 服务
我需要在安装了 OpenEJB 的 Tomcat 上部署 Web 服务。 我编译了简单的 Hello 服务,仅使用 JAX-WS 打印“Hello”,并尝试在 tomcat 上部署,但在部署时出现错误: 错误 - 为 servlet helloservice.endpoint.Hello 部署 CXF Web 服务时出错 java.lang.IllegalArgumentException: 无法在 Web 应用程序上下文 /helloservice 中找到 servlet helloservice
请帮助解决此处的错误。 tomcat + openejb足以用于Web服务部署吗?
谢谢。
I need to deploy web service on Tomcat with installed OpenEJB.
I compiled simple Hello service that just prints "Hello" with JAX-WS and tried to deploy on tomcat, but got errors while deployment :
ERROR - Error deploying CXF webservice for servlet helloservice.endpoint.Hello
java.lang.IllegalArgumentException: Could not find servlet helloservice in web application context /helloservice
Please, help what is done wrong here.
Is tomcat + openejb is sufficient for web service deployment?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于其他可能希望使用 Tomcat/OpenEJB 执行 Web 服务的人,这里有一个简单的示例,它使用事务性 EJB Web 服务通过 JPA 添加/列出/删除记录:
https://svn.apache.org/repos/asf/openejb/tags/openejb-3.1 .2/examples/webapps/moviefun/
该示例还包括一个可以读取/写入 Web 服务的 Perl SOAP::Lite 客户端。
For others who might be looking to do web services with Tomcat/OpenEJB, here's a simple example that uses an transactional EJB web service to add/list/delete records with JPA:
https://svn.apache.org/repos/asf/openejb/tags/openejb-3.1.2/examples/webapps/moviefun/
The example also includes a Perl SOAP::Lite client that can read/write to the web service.
Servlet/JSP 引擎足以进行 Web 开发。为此,您不需要 OpenEJB。
“服务”是一个负载词。您的意思是“SOAP Web 服务”吗?或者“EJB 无状态会话 bean”?
检查您的 web.xml。听起来您未能声明名为 helloservice 的 servlet。它应该看起来像这样:
A servlet/JSP engine is sufficient for web development. You don't need OpenEJB for that.
"Service" is a loaded term. Do you mean "SOAP web service"? Or "EJB stateless session bean"?
Check your web.xml. Sounds like you failed to declare a servlet named helloservice. It ought to look like this: