從版本 1.0-RC2 升級到 1.0
自 RC2 以來沒有發生重大變更。
從版本 1.0-RC1 升級到 1.0-RC2
在專案 1.0 Release Candidate 1 和 2 版本之間進行了一些最後的微小更改。以下內容應有助於大多數使用者更新他們的應用程式
客戶端
已解決一些問題,使得 WebServiceTemplate 在 Plain Old XML 設定中更易於使用,且不那麼 SOAP 特定。
- 各種過載的sendAndReceive()方法已重新命名以方便理解。方法簽名現在反映了傳送的內容(例如,Source),以及接收的內容(例如,Result)。
- 該WebServiceMessageCallbackmethoddoInMessage()已重新命名為doWithMessage(),因為它命名不當。
- 該FaultResolver已重新命名為FaultMessageReceiver以更清晰地表明其職責。
- 該SoapActionCallback已移至org.springframework.ws.soap.client.core.
從版本 1.0-M3 升級到 1.0-RC1
在專案 1.0 Milestone 3 和 Release Candidate 1 版本之間進行了一些微小的更改。以下內容應有助於大多數使用者更新他們的應用程式
附件
附件支援已被移動和更改,以支援 MTOM。
- 該Attachment介面已從org.springframework.ws.soap到org.springframework.ws.mime.
- 該id屬性在Attachment>> 被重新命名為 <<contentId.
- 獲取和新增附件的方法已從SoapMessage中提取到一個新的介面MimeMessage中。現在新增附件需要一個 content id。
WebServiceTemplate
該WebServiceTemplate不再為每個方法宣告 IOException。相反,在org.springframework.ws.client.
中建立了一個執行時異常層次結構。HttpUrlConnectionMessageSender 和 CommonsHttpMessageSender
該HttpUrlConnectionMessageSender和CommonsHttpMessageSender已失去其url屬性。URL(或者更準確地說:URI)現在在WebServiceTemplate中定義,透過指定一個預設 URI,或將 URI 作為引數提供。
EndpointInterceptor
該EndpointInterceptor現在有一個handleFault方法,當handleResponse(而不是WebServiceMessage.hasFault()對於響應為 true 時,會呼叫該方法。
SoapMessageDispatcher
- SoapMessageDispatcher 的所有策略介面(SoapEndpointInterceptor, SoapEndpointMapping)已從org.springframework.ws.soap到org.springframework.ws.soap.server.
從版本 1.0-M2 升級到 1.0-M3
在專案 1.0 Milestone 2 和 Milestone 3 之間進行了幾項更改。這些更改增加了程式碼的模組化,增強了單元測試,使包的角色更清晰,併為介面卡和使用 web.xml 安全約束保護 HTTP 資源提供了有吸引力的替代方案。
不幸的是,API 和包位置的更改是必需的。以下內容應有助於大多數使用者更新他們的應用程式
MessageContextFactory
MessageContextFactory 已重構為 WebServiceMessageFactory,並且不再建立 MessageContext,而是建立 WebServiceMessages。此更改主要是內部的,但您需要更改工廠的名稱
- 如果您之前使用了AxiomSoapMessageContextFactory,請將其替換為AxiomSoapMessageFactory.
- 如果您之前使用了SaajSoapMessageContextFactory之前,請替換為SaajSoapMessageFactory.
MessageDispatcher
為了清晰地區分伺服器端和客戶端程式碼,我們不得不移動各種伺服器端類。
- 該MessageDispatcher已移至org.springframework.ws.server包。
- 該SoapMessageDispatcher已移至org.springframework.ws.soap.server包。
- MessageDispatcher 的所有策略介面(EndpointAdapter, EndpointInterceptor, EndpointMapping, EndpointExceptionResolver)已從org.springframework.ws到org.springframework.ws.server.
Endpoints
- org.springframework.ws.endpoint 中的所有端點實現和介面卡org.springframework.ws.endpoint已移至org.springframework.ws.server.endpoint.
- TransformerObjectSupport已移至 Spring-XML 模組。
Endpoint interceptors
- 所有EndpointInterceptor在org.springframework.ws.endpoint.interceptor已移至org.springframework.ws.server.endpoint.interceptor.
- 所有EndpointInterceptor在org.springframework.ws.soap.endpoint.interceptor已移至org.springframework.ws.soap.server.endpoint.interceptor.
- 該PayloadValidatingInterceptor已移至org.springframework.ws.soap.server.endpoint.interceptor也一樣。
Endpoint mappings
- 所有EndpointMapping在org.springframework.ws.endpoint.mapping已移至org.springframework.ws.server.endpoint.mapping.
- 所有EndpointInterceptor在org.springframework.ws.soap.endpoint.mapping已移至org.springframework.ws.soap.server.endpoint.mapping.
Endpoint exception resolvers
- 所有EndpointExceptionResolver在org.springframework.ws.soap.endpoint已移至org.springframework.ws.soap.server.endpoint.
TransportContext
- TransportContext和TransportContextHolder已移至org.springframework.ws.transport.context包。
MessageEndpointAdapter
- 該MessageEndpointAdapter已重新命名為WebServiceMessageReceiverHandlerAdapter,但仍保留在同一包中(org.springframework.ws.transport.http).
SoapMessageContext
- 該SoapMessageContext已被移除。雖然MessageContext提供了相同的功能,但可能需要進行型別轉換。