Hi
CXF provides a flexible configuration of interceptor. You can configure the interceptor in Bus level or in Endpoint level. For you case, I think you can define the WSS4J interceptor in your Endpoint B, and add the SAAJ*Interceptor in the bus. In this way, the EndpointA will not check the security any more.

<jaxws:endpoint id="EndpointB" ... >
 <jaxws:inInterceptors>
      <ref bean="WSS4JInConfiguration"/>
 </jaxws:inInterceptors>
 <jaxws:outInterceptors>
      <ref bean="WSS4JOutConfiguration"/>
 </jaxws:outInterceptors>
</jaxws:endpoint>

Willem.
Mayank Mishra wrote:
Hi all,

I understand the way of plugging in In and Out Interceptors to CXF bus like,

<bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
       <property name="inInterceptors">
           <list>
               <ref bean="SAAJInInterceptor"/>
               <ref bean="WSS4JInConfiguration"/>
           </list>
       </property>
       <property name="outInterceptors">
           <list>
               <ref bean="SAAJOutInterceptor"/>
               <ref bean="WSS4JOutConfiguration"/>
           </list>
       </property>
</bean>
<bean id ="WSS4JIn..
<bean id = "WSS4JOut...
...

We can specify a set of configuration inside each of WSS4J In and Out interceptors.

My requirement is to specify an alternative configuration also along with this configuration. So, if service configured for configuration A and B. If the incoming message adheres to Configuration B rather than A, CXFBus can pass the message to WSSInInterceptor configured for B configuration, without WSSInInterceptor A giving Security Failure.

Is it somehow feasible using CXF Spring Configuration or the way we specify Interceptors to CXFBus?

With Regards,
Mayank

Reply via email to