Jaxb Spring WS with webServiceTemplate.MarshallSendAndReceive返回请求的接收错误,服务不可用:找不到[404]

Jaxb Spring WS with webServiceTemplate.MarshallSendAndReceive返回请求的接收错误,服务不可用:找不到[404],jaxb,spring-ws,webservicetemplate,Jaxb,Spring Ws,Webservicetemplate,我正在尝试在Tomcat上使用SpringWS和JAXB的现有SOAP Web服务。我已经用我的更改创建了新的WAR文件,并将其部署在Tomcat安装下的webapps foder中 调用服务的原始(已经存在)方法时,服务SOAP请求和响应是正常的。但是当在新方法上调用服务时,我得到了服务不可用和未找到的服务SOAP响应[404] 2011-07-25 12:58:23,365 DEBUG [org.springframework.ws.client.core.WebServiceTemplat

我正在尝试在Tomcat上使用SpringWS和JAXB的现有SOAP Web服务。我已经用我的更改创建了新的WAR文件,并将其部署在Tomcat安装下的webapps foder中

调用服务的原始(已经存在)方法时,服务SOAP请求和响应是正常的。但是当在新方法上调用服务时,我得到了服务不可用和未找到的服务SOAP响应[404]

2011-07-25 12:58:23,365 DEBUG [org.springframework.ws.client.core.WebServiceTemplate] - Opening [org.springframework.ws.transport.http.HttpUrlConnection@12b9f14] to [http://<service URL>]
2011-07-25 12:58:23,521 DEBUG [org.springframework.ws.soap.saaj.support.SaajUtils] - SOAPElement [com.sun.xml.internal.messaging.saaj.soap.ver1_1.Envelope1_1Impl] implements SAAJ 1.3
2011-07-25 12:58:23,552 DEBUG [org.springframework.ws.soap.saaj.support.SaajUtils] - SOAPElement [com.sun.xml.internal.messaging.saaj.soap.ver1_1.Body1_1Impl] implements SAAJ 1.3
2011-07-25 12:58:23,896 DEBUG [org.springframework.ws.client.MessageTracing.sent] - Sent request [<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><ns2:DelRequest xmlns:ns2="http://<changed_address>"><ns2:userId>ncc1@%</ns2:userId><ns2:dateFromMillis>1308956400000</ns2:dateFromMillis><ns2:dateToMillis>1311634800000</ns2:dateToMillis></ns2:DelRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>]
2011-07-25 12:58:25,318 DEBUG [org.springframework.ws.client.core.WebServiceTemplate] - Received error for request [SaajSoapMessage {http://<changed_address>}DelRequest]
2011-07-25 12:58:23365调试[org.springframework.ws.client.core.WebServiceTemplate]-打开[org.springframework.ws.transport.http。HttpUrlConnection@12b9f14]至[http://]
2011-07-25 12:58:23521调试[org.springframework.ws.soap.saaj.support.SaajUtils]-SOAPElement[com.sun.xml.internal.messaging.saaj.soap.ver1_1.Envelope1_1Impl]实现了saaj 1.3
2011-07-25 12:58:23552调试[org.springframework.ws.soap.saaj.support.SaajUtils]-SOAPElement[com.sun.xml.internal.messaging.saaj.soap.ver1_1.Body1_1Impl]实现了saaj 1.3
2011-07-25 12:58:23896调试[org.springframework.ws.client.MessageTracing.sent]-发送请求[ncc1@%1308956400000131163480000]
2011-07-25 12:58:25318调试[org.springframework.ws.client.core.WebServiceTemplate]-收到请求错误[SaajSoapMessage{http://}DelRequest]
2011-07-25 12:58:25318错误[net.msgplugin.controller.DeleteController]-会话服务在以下位置不可用:http://,找不到[404],null

我已将项目导入Eclipse,并对项目属性进行了以下更改:

1) 对于项目内的Facets,我检查了“动态Web模块”和“Java”Facets。 2) 在JavaEE模块依赖项中,我检查了Maven依赖项

这里需要注意的两件事是:

a) 开发人员在开发Web服务时使用JBoss,但最近该项目被转让给了Tomcat。 b) 该项目有一个MAVEN文件夹结构,因此web.xml文件位于src/main/webapp/web-INF文件夹中,而不是WebContent/web-INF,它是在我选择“动态web模块”方面时创建的

有什么建议我们将不胜感激

谢谢

========================================================================

我设法修复了Not Found[404]错误,但现在又出现了另一个错误。 在进一步调查和调试WebServiceTemplate和MessageDispatcher类后,我发现控制台上有以下输出:

DEBUG [org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter] - Accepting incoming [org.springframework.ws.transport.http.HttpServletConnection@11f05a1] to [http://<Service_URL>]

TRACE [org.springframework.ws.server.MessageTracing.received] - Received request [<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><ns2:DelRequest xmlns:ns2="http://<changed_address>"><ns2:userId>ncc1@%</ns2:userId><ns2:dateFromMillis>1309042800000</ns2:dateFromMillis><ns2:dateToMillis>1311721200000</ns2:dateToMillis></ns2:DelRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>]

DEBUG [org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping] - Looking up endpoint for [{<changed_address>}DelRequest]

DEBUG [org.springframework.ws.soap.server.SoapMessageDispatcher] - Endpoint mapping [org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping@6ee035] maps request to endpoint [public final net.org.messagehistory.schema.GetDelResponse net.org.messagehistory.service.endpoint.MessageHistoryEndpoint.delHistory(net.org.messagehistory.schema.GetListRequest) throws javax.xml.datatype.DatatypeConfigurationException]

DEBUG [org.springframework.ws.soap.server.SoapMessageDispatcher] - Testing endpoint adapter [org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter@1a23f67]

DEBUG [org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter] - Unmarshalled payload request to [net.org.messagehistory.schema.DelRequest@c76003]
DEBUG[org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter]-接受传入的[org.springframework.ws.transport.http]。HttpServletConnection@11f05a1]至[http://]
跟踪[org.springframework.ws.server.MessageTracing.received]-收到的请求[ncc1@%13090428000011172120000]
调试[org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping]-查找[{}DelRequest]的端点
调试[org.springframework.ws.soap.server.SoapMessageDispatcher]-端点映射[org.springframework.ws.server.Endpoint.mapping。PayloadRootAnnotationMethodEndpointMapping@6ee035]将请求映射到端点[public final net.org.messagehistory.schema.GetDelResponse net.org.messagehistory.service.endpoint.MessageHistoryEndpoint.delHistory](net.org.messagehistory.schema.GetListRequest)抛出javax.xml.datatype.DatatypeConfigurationException]
调试[org.springframework.ws.soap.server.SoapMessageDispatcher]-测试端点适配器[org.springframework.ws.server.endpoint.adapter]。GenericMarshallingMethodEndpointAdapter@1a23f67]
调试[org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter]-对[net.org.messagehistory.schema]的解组有效负载请求。DelRequest@c76003]
结束错误消息现在是“参数类型不匹配”,我发现它是从WebServiceTemplate.class中的一个方法生成的


有人能提出这里的问题是什么吗?

设法解决了这个问题。所以,我想分享一些可能有帮助的解决方案

确保端点方法使用以下注释 @PayloadRoot(localPart=MESSAGES\u TO\u DELETE,namespace=MESSAGE\u namespace) 其中localpart与schema.xsd中的有效负载请求相同


谢谢

这不是你的问题的副本吗?我在当时发布了我认为合适的答案,因为它似乎起了作用。但我仍然有同样的问题。