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?
歡迎來到StackOverflow!你使用哪種編程語言? – philtune 2014-12-03 16:15:27
對不起@philtune,我認爲這是顯而易見的,因爲這個帖子被spring-ws標記。答案是Java。 – nstoddar74 2014-12-03 16:53:04
很酷,我是Java文盲......只是想添加'java'標籤來吸引更多的回答者。 – philtune 2014-12-03 16:55:30