2014-12-03 152 views
1

AbstractAddressingEndpointMapping(AnnotationActionEndpointMapping的祖先)從BeanFactory檢索所有SmartInterceptors並將它們分配給實例變量。稍後MessageDispatcher(SoapMessageDispatcher)會在映射上調用getEndpoint()(從它自己的getEndpoint()方法中)。 AbstractAddressingEndpointMapping.getEndpoint()調用其自己的私有getEndpointInvocationChain()方法,該方法使用所有攔截器創建SoapEndpointInvocationChain的新實例。它從不會調用攔截器上的shouldIntercept()來確定它是否應該添加到鏈中。什麼是配置SoapActionSmartEndpointInterceptor以及AnnotationActionEndpointMapping的正確方法

將此約定爲SoapActionAnnotationMethodEndpointMapping,它繼承自AbstractEndpointMapping,它在檢索SmartInterceptors方面做了同樣的事情。但是,getEndpoint()方法實際上在每個攔截器上調用shouldIntercept(),並且只添加那些返回true的鏈。 AnnotationActionEndpointMapping和SoapActionAnnotationMethodEndpointMapping具有不同的祖先,所以它們的處理明顯不同。

所以問題是 - 是否有適當的方式來配置AnnotationActionEndpointMapping的SmartInterceptors?

+0

歡迎來到StackOverflow!你使用哪種編程語言? – philtune 2014-12-03 16:15:27

+0

對不起@philtune,我認爲這是顯而易見的,因爲這個帖子被spring-ws標記。答案是Java。 – nstoddar74 2014-12-03 16:53:04

+0

很酷,我是Java文盲......只是想添加'java'標籤來吸引更多的回答者。 – philtune 2014-12-03 16:55:30

回答

0

我認爲這是一個錯誤:AnnotationActionEndpointMapping也應該在其智能攔截器鏈上調用shouldIntercept。你能否爲這個here創建一個JIRA,可能鏈接到這個SO問題?或者更好的是,提供一個pull request

+0

Thanks @Arjen - 我已經打開https://jira.spring.io/browse/SWS-883拉請求。 – nstoddar74 2014-12-04 14:39:04

+0

SWS-883已通過https://github.com/spring-projects/spring-ws/pull/27解決。謝謝! – gregturn 2014-12-05 20:34:39

相關問題