cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DanielTempleUK <danieltempl...@googlemail.com>
Subject Configuring Interceptors in Multiple Spring Config Files
Date Wed, 06 Nov 2013 17:25:35 GMT
Hello,

We're having some problems adding all of the custom CXF interceptors to our
webservice.

We have the following interceptors:
 - MdcClearInterceptor
 - MdcSetupInterceptor
 - OutboundRequestHeaderInterceptor

In one Spring Configuration file we have the
OutboundRequestHeaderInterceptor defined as a bean and have it configured in
a bus like this:

	<bean id="headerInterceptor" class="OutboundRequestHeaderInterceptor" />
	
	<cxf:bus>
		<cxf:outInterceptors>
			<ref bean="headerInterceptor" />
		</cxf:outInterceptors>
	</cxf:bus>


In a SEPARATE SPRING CONFIGURATION FILE we have the other 2 Interceptors
configured in the bus as follows:

	<bean id="mdcSetup"
class="com.williamhill.cxf.interceptor.MdcSetupInterceptor" />
	<bean id="mdcClear"
class="com.williamhill.cxf.interceptor.MdcClearInterceptor" />

	<cxf:bus>
		<cxf:inInterceptors>
			<ref bean="mdcSetup" />
		</cxf:inInterceptors>
		<cxf:outInterceptors>
			<ref bean="mdcClear" />
		</cxf:outInterceptors>
		<cxf:outFaultInterceptors>
			<ref bean="mdcClear" />
		</cxf:outFaultInterceptors>
	</cxf:bus>


The problem we're having is that we only end up with the
OutboundRequestHeaderInterceptor actually added to the bus when our web
service starts up.
Turning the CXF logging up to DEBUG confirms that only the
OutboundRequestHeaderInterceptor is added to the CXF interceptors.

The reason we have separate config files is that it keeps the config
separate for different aspects of the web service. It unfortunately supports
a lot of different functions.
We have moved the configuration into a single Spring configuration file and
it works fine. All of the interceptors are added as expected and are all
called where they should be.

Any help would be much appreciated.

Thanks,
Dan



--
View this message in context: http://cxf.547215.n5.nabble.com/Configuring-Interceptors-in-Multiple-Spring-Config-Files-tp5736041.html
Sent from the cxf-user mailing list archive at Nabble.com.

Mime
View raw message