Не удается развернуть веб-службу JAX-WS — tomcat

#spring #tomcat #tomcat7 #jax-ws

#весна #tomcat #tomcat7 #jax-ws

Вопрос:

Я создал свой веб-сервис с использованием аннотаций JAX-WS в eclipse, и когда я компилирую проект с помощью сервера 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
  

Может ли какой-либо орган помочь мне точно определить, в чем проблема в моем случае?

Ответ №1:

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/