开发者

Deploy web service on Tomcat with OpenEJB

开发者 https://www.devze.com 2023-01-02 05:53 出处:网络
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 :

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 /hellose开发者_C百科rvice

Please, help what is done wrong here. Is tomcat + openejb is sufficient for web service deployment?

Thanks.


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.


Please, help what is done wrong here. Is tomcat + openejb is sufficient for web service deployment?

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:

<servlet>
    <servlet-name>helloservlet</servlet-name>
    <servlet-class>com.your.package.HelloServlet</servlet-class>
</servlet>

<servlet-mapping>
    <servlet-name>helloservlet</servlet-name> <!-- names must match -->
    <url-pattern>*.html</url-pattern>
</servlet-mapping>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号