请求连接时无法使用Spring WS [英] Spring WS unavailable upon requesting connection

查看:101
本文介绍了请求连接时无法使用Spring WS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Spring WS,可以成功调用2个请求.输出如下:

I've got a Spring WS which I'm able to call successfully for 2 requests. Here is the output:

2011-07-20 18:25:33,743 DEBUG [org.springframework.ws.client.core.WebServiceTemplate] -    Opening [org.springframework.ws.transport.http.HttpUrlConnection@1696452] to         [http://mymachine:8080/test-service/HistoryService]
2011-07-20 18:25:33,868 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-20 18:25:33,900 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-20 18:25:34,259 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:GetListRequest xmlns:ns2="http://address_changed"><ns2:userId>ncc1@%</ns2:userId><ns2:dateFromMillis>1308524400000</ns2:dateFromMillis><ns2:dateToMillis>1311202800000</ns2:dateToMillis></ns2:GetListRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>]

2011-07-20 18:25:36,728 DEBUG [org.springframework.ws.client.MessageTracing.received] - Received response [<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><ns2:GetListResponse xmlns:ns2="address_changed"><ns2:conversations><ns2:conversationID>1</ns2:conversationID><ns2:conversationStartDate>2011-06-30T10:37:53.964+01:00</ns2:conversationStartDate><ns2:conversationEndDate>2011-06-30T10:37:58.543+01:00</ns2:conversationEndDate><ns2:participants>usr1</ns2:participants><ns2:participants>usr1</ns2:participants></ns2:conversations></ns2:GetListResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>] for request [<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><ns2:GetListRequest xmlns:ns2="address_changed"><ns2:userId>ncc1@%</ns2:userId><ns2:dateFromMillis>1308524400000</ns2:dateFromMillis><ns2:dateToMillis>1311202800000</ns2:dateToMillis></ns2:GetListRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>] 

但是,当对新创建的方法进行请求调用时,尽管服务可用于其他(最初存在的)方法调用,但出现服务不可用的错误.输出为:

But when making a request call to a newly created method, I get an error that Service is not available, although the service is available for other (originally present) method calls. The output is:

2011-07-20 18:25:53,166 DEBUG [org.springframework.ws.client.core.WebServiceTemplate] - Opening [org.springframework.ws.transport.http.HttpUrlConnection@1f2e95f] to [http://mymachine:8080/test-service/HistoryService]
2011-07-20 18:25:53,166 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:DelConversationListRequest xmlns:ns2="http://astrium.eads.net/eow"><ns2:userId>ncc1@%</ns2:userId><ns2:dateFromMillis>1308524400000</ns2:dateFromMillis><ns2:dateToMillis>1311202800000</ns2:dateToMillis></ns2:DelConversationListRequest></SOAP-ENV:Body></SOAP- ENV:Envelope>]
2011-07-20 18:25:53,181 DEBUG [org.springframework.ws.client.core.WebServiceTemplate] - Received error for request [SaajSoapMessage {http://changedAddress}DelConversationListRequest]
2011-07-20 18:25:53,197 ERROR [net.org.controller.GetConvController] - Service unavailable at: http://mymachine:8080/test-service/HistoryService, Not Found [404]

请提出建议.

推荐答案

已设法解决此问题.问题是我在Tomcat中部署的WAR文件(webapps文件夹)没有包含最新的代码更改和主项目POM文件.

Managed to get this issue resolved. The problem was that the WAR file that I was deploying in the Tomcat (webapps folder) did not contain the latest code changes and the main project POM file.

要在Eclipse IDE中包含MAVEN目录, 右键单击WS项目->属性-> Java EE模块依赖关系->选中Maven依赖关系复选框.然后重建您的项目并在Tomcat中重新部署WAR文件.现在,它将包括POM文件以及其他MAVEN依赖项.

To include the MAVEN directories, in Eclipse IDE, Right click on the WS project --> Properties --> Java EE Module Dependencies --> check the Maven Dependencies checkbox. Then rebuild your project and re-deploy the WAR file in Tomcat. This will now include the POM file along with other MAVEN Dependencies.

这篇关于请求连接时无法使用Spring WS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆