2011-07-25 40 views
-1

我試圖推薦一個在Tomcat上使用Spring-WS和JAXB的現有SOAP Web服務。我已經使用我的更改創建了新的WAR文件,並將它部署在Tomcat安裝下的webapps foder中。帶有webServiceTemplate.marshalSendAndReceive的Spring WS返回接收到的請求錯誤,服務不可用:未找到[404]

當調用服務的原始(已存在的)方法時,服務SOAP請求和響應沒問題。但呼籲新方法的服務的時候,我得到的服務的服務SOAP響應不可用,並沒有發現[404]

2011-07-25 12:58:23,365 DEBUG [org.springframework.ws.client.core.WebServiceTemplate] - Opening [[email protected]] 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>[email protected]%</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:25318 ERROR [net.msgplugin.controller.DeleteController - 對話服務不可點擊:http://,未找到[404],空

我已經導入項目到Eclipse中,並取得了以下更改項目性質:

1)隨着Project Facets,我已經檢查了'Dynamic Web Module'和'Java'Facets。 2)在Java EE Module Dependencies中,我檢查了Maven Dependencies。

兩個東西是這裏要注意的是:

一)開發web服務,但最近該項目被chagned到Tomcat時,開發商是使用JBoss。 b)該項目具有MAVEN文件夾結構,因此web.xml文件位於src/main/webapp/WEB-INF文件夾中,而不是WebContent/WEB-INF,當我選擇「動態Web模塊」方面時創建了該文件。

任何建議我們將不勝感激?

感謝

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

HI

我設法解決所述未找到[404]錯誤,但現在正在發生另一個錯誤。 經進一步調查和debuggin成WebServiceTemplate和MessageDispatcher類,我發現,以下在控制檯上的輸出:

DEBUG [org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter] - Accepting incoming [[email protected]5a1] 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>[email protected]%</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.ser[email protected]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.[email protected]1a23f67] 

DEBUG [org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter] - Unmarshalled payload request to [[email protected]] 

現在「參數類型不匹配」我發現是從來自該方法中的一個產生的端部的錯誤信息在WebServiceTemplate.class

有人可以提出什麼coudl是這裏的問題?

+0

這不是你的[上一個問題](http://stackoverflow.com/questions/6766328/spring-ws-unavailable-upon-requesting-connection)的重複? –

+0

我通過發佈我認爲當時恰當的答案來解決這個問題,因爲它似乎已經奏效。但我仍然有同樣的問題。 –

回答

0

管理得到這個排序。所以,只是想分享一些人可能會覺得有幫助的解決方案。

確保端點方法標註有以下 @PayloadRoot(LocalPart依照= MESSAGES_TO_DELETE,命名空間= MESSAGE_NAMESPACE) 其中的localpart是一樣的,在schema.xsd的有效載荷的要求

感謝

相關問題