因为你正在使用
<cxf:inInterceptors>
<ref bean="XCustomInterceptor"/>
</cxf:inInterceptors>
检查文档http://cxf.apache.org/docs/bus-configuration.html
inInterceptors 拦截器有助于入站消息拦截器链。s 或 s 的列表
您可以对服务器和客户端中的入站连接和出站连接使用特定的拦截器
例如,这里是一个 jax-ws 端点和带有输入和输出拦截器的客户端的配置
<!-- The SOAP endpoint -->
<jaxws:endpoint
id="helloWorld"
implementor="demo.spring.HelloWorldImpl"
address="http://localhost/HelloWorld">
<jaxws:inInterceptors>
<ref bean="customInInterceptor"/>
</jaxws:inInterceptors>
<jaxws:outInterceptors>
<ref bean="customOutInterceptor"/>
</jaxws:outInterceptors>
</jaxws:endpoint>
<!-- The SOAP client bean -->
<jaxws:client id="helloClient"
serviceClass="demo.spring.HelloWorld"
address="http://localhost/HelloWorld">
<jaxws:inInterceptors>
<ref bean="customClientInInterceptor"/>
</jaxws:inInterceptors>
<jaxws:outInterceptors>
<ref bean="customClientOutInterceptor"/>
</jaxws:outInterceptors>
</jaxws:client>