我在 eclipse 下使用 JAX-WS 注释创建了我的 Web 服务,当我使用 tomcat 7 服务器编译项目时,我得到了这些错误:
juin 17, 2014 2:37:48 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized
Infos: WSSERVLET12: JAX-WS context listener initializing
juin 17, 2014 2:37:48 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized
Grave: WSSERVLET11: failed to parse runtime descriptor: class: ma.propar.FireApp.Metier.jaxws.Message could not be found
class: ma.propar.FireApp.Metier.jaxws.Message could not be found
at com.sun.xml.ws.modeler.RuntimeModeler.getClass(RuntimeModeler.java:269)
at com.sun.xml.ws.modeler.RuntimeModeler.processDocWrappedMethod(RuntimeModeler.java:558)
at com.sun.xml.ws.modeler.RuntimeModeler.processMethod(RuntimeModeler.java:505)
at com.sun.xml.ws.modeler.RuntimeModeler.processClass(RuntimeModeler.java:353)
at com.sun.xml.ws.modeler.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:249)
at com.sun.xml.ws.server.RuntimeEndpointInfo.createModel(RuntimeEndpointInfo.java:180)
at com.sun.xml.ws.server.RuntimeEndpointInfo.init(RuntimeEndpointInfo.java:326)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.createModelAndMetadata(WSServletContextListener.java:203)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:119)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
juin 17, 2014 2:37:48 PM org.apache.catalina.core.StandardContext listenerStart
Grave: Exception lors de l'envoi de l'évènement contexte initialisé (context initialized) à l'instance de classe d'écoute (listener) com.sun.xml.ws.transport.http.servlet.WSServletContextListener
WSSERVLET11: failed to parse runtime descriptor: class: ma.propar.FireApp.Metier.jaxws.Message could not be found
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:130)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: class: ma.propar.FireApp.Metier.jaxws.Message could not be found
at com.sun.xml.ws.modeler.RuntimeModeler.getClass(RuntimeModeler.java:269)
at com.sun.xml.ws.modeler.RuntimeModeler.processDocWrappedMethod(RuntimeModeler.java:558)
at com.sun.xml.ws.modeler.RuntimeModeler.processMethod(RuntimeModeler.java:505)
at com.sun.xml.ws.modeler.RuntimeModeler.processClass(RuntimeModeler.java:353)
at com.sun.xml.ws.modeler.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:249)
at com.sun.xml.ws.server.RuntimeEndpointInfo.createModel(RuntimeEndpointInfo.java:180)
at com.sun.xml.ws.server.RuntimeEndpointInfo.init(RuntimeEndpointInfo.java:326)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.createModelAndMetadata(WSServletContextListener.java:203)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:119)
... 9 more
任何人都可以帮我找出我的问题到底是什么吗?
最佳答案
Tomcat 不支持开箱即用的 JAX-WS。您必须将 JAX-WS 依赖项添加到 WEB-INF/lib 或 tomcat_home/lib 目录中。例如,请引用以下链接。
http://www.mkyong.com/webservices/jax-ws/deploy-jax-ws-web-services-on-tomcat/
关于spring - 无法部署 JAX-WS Web 服务 - tomcat,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24265444/