如何在tomcat 6.0中发布Apache-Axis Web服务

时间:2010-09-16 10:44:58

标签: java web-services eclipse tomcat

我使用Eclipse IDE开发了一个简单的Apache-Axis java Web服务,现在它可以成功运行。我也生成了测试客户端,它自动由IDE提供。当我展开它时,我可以看到部署的Web服务在IDE服务器节点中。 (我已经将tomcat 6.0服务器添加到Eclipse中)。

但问题是,只有当我打开Eclipse并从Eclipse服务器选项卡启动服务器时,Web服务才会启动。如果我退出Eclipse,Web服务将会关闭。我想知道如何将我的Web服务永久地发布到tomcat服务器中并始终在不打开Eclipse IDE的情况下将其永久保存?

提前谢谢大家。

注意:我只是想出了问题。当我部署war文件时,它与eclipse中的实际Web服务项目名称相比具有不同的名称。我只是打开wsdl并从中获取实际的url并在地址栏中输入它。然后它的工作!非常感谢你的帮助。很抱歉给您带来不便......

tomcat日志文件:

Sep 16, 2010 7:33:46 PM org.apache.catalina.core.AprLifecycleListener 
init
INFO: Loaded APR based Apache Tomcat Native library 1.1.20.
Sep 16, 2010 7:33:46 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Sep 16, 2010 7:33:47 PM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Sep 16, 2010 7:33:47 PM org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
Sep 16, 2010 7:33:47 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1403 ms
Sep 16, 2010 7:33:48 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Sep 16, 2010 7:33:48 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.26
Sep 16, 2010 7:33:48 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
Sep 16, 2010 7:33:48 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
Sep 16, 2010 7:33:49 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory beerV1
Sep 16, 2010 7:33:49 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
Sep 16, 2010 7:33:49 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
Sep 16, 2010 7:33:50 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Sep 16, 2010 7:33:51 PM org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Sep 16, 2010 7:33:51 PM org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
Sep 16, 2010 7:33:51 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3259 ms
Sep 16, 2010 7:34:05 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive Server.war
Sep 16, 2010 7:34:06 PM org.apache.axis.utils.JavaUtils isAttachmentSupported
WARNING: Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.

1 个答案:

答案 0 :(得分:1)

目前,您正在使用Eclipse中的Tomcat,当您关闭日食时,它将关闭。

将您的war文件复制到tomcat / webapps /

启动tomcat /tomcat/bin/tomcat.exe [或.sh]而不依赖于日食

  • 停止Tomcat。

  • 删除现有部署。如果你 之前曾部署过“foo.war” TOMCAT_HOME / webapps,然后就是 解压缩到webapps / foo / ...你 必须删除此目录和所有 它的内容。在Unix上,这可以 完成rm -r $ TOMCAT_HOME / webapps / foo

  • 将WAR文件复制到 TOMCAT_HOME / webapps /目录。

  • 启动Tomcat。