简体   繁体   中英

Deploy web service on Tomcat with OpenEJB

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.

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM