On 2011-7-20, at 上午5:09, kris wrote:
Hi,
I have problem with adding custom interceptor through configuration.
I'm
using XSF 2.4.1
web.xml:
<param-value>WEB-INF/beans.xml</param-value>
beans.xml:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:cxf="http://cxf.apache.org/core"
xsi:schemaLocation="
http://cxf.apache.org/core
http://cxf.apache.org/schemas/core.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<bean id="OwnInterceptor" class="pl.skoropada.OwnInterceptor" />
<cxf:bus>
<cxf:inInterceptors>
<list>
<ref bean="OwnInterceptor" />
</list>
</cxf:inInterceptors>
</cxf:bus>
</beans>
Hi,
Change it to
...
<cxf:bus>
<cxf:inInterceptors>
<ref bean="OwnInterceptor" />
</cxf:inInterceptors>
</cxf:bus>
...
Freeman
and class OwnInterceptor extends AbstractPhaseInterceptor<Message>
(package
pl.skoropada)
And this doesn't work, I think i do the same as here
http://cxf.apache.org/docs/bus-configuration.html
When I add my interceptor in java code it works fine.
Any hints ?
--
View this message in context:
http://cxf.547215.n5.nabble.com/Add-custom-inceptor-through-configuration-tp4613763p4613763.html
Sent from the cxf-user mailing list archive at Nabble.com.
---------------------------------------------
Freeman Fang
FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com