SWS-684 - Added support for <ref> elements inside the <interceptors> element

This commit is contained in:
Tareq Abedrabbo
2011-02-03 12:35:38 +00:00
parent b1eefff62e
commit eb54ee8e7c
4 changed files with 109 additions and 7 deletions

View File

@@ -41,13 +41,13 @@ public class InterceptorsBeanDefinitionParserTest {
@Test
public void namespace() throws Exception {
Map<String, ?> result = applicationContext.getBeansOfType(DelegatingSmartEndpointInterceptor.class);
assertEquals("no smart interceptors found", 5, result.size());
assertEquals("no smart interceptors found", 8, result.size());
result = applicationContext.getBeansOfType(PayloadRootSmartSoapEndpointInterceptor.class);
assertEquals("no interceptors found", 2, result.size());
assertEquals("no interceptors found", 3, result.size());
result = applicationContext.getBeansOfType(SoapActionSmartEndpointInterceptor.class);
assertEquals("no interceptors found", 2, result.size());
assertEquals("no interceptors found", 3, result.size());
}
}

View File

@@ -7,16 +7,23 @@
<sws:interceptors>
<bean class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor"/>
<ref bean="externalGlobalInterceptor"/>
<sws:payloadRoot namespaceUri="http://www.springframework.org/spring-ws">
<bean class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor"/>
<ref bean="externalPayloadRootInterceptor"/>
<bean class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor"/>
</sws:payloadRoot>
<sws:soapAction value="mySoapAction">
<bean class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor"/>
<ref local="externalSoapActionInterceptor"/>
<bean class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor"/>
</sws:soapAction>
</sws:interceptors>
<bean id="externalGlobalInterceptor" class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor"/>
<bean id="externalPayloadRootInterceptor" class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor"/>
<bean id="externalSoapActionInterceptor" class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor"/>
</beans>