cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glynn, Eoghan" <eoghan.gl...@iona.com>
Subject Problem with <jaxws:client> not picking up interceptors
Date Thu, 17 May 2007 12:55:33 GMT


Folks,

Colm ran into a problem with config of the following form not working as
expected:

   <jaxws:client id="{http://cxf.iona.com/test/greeter}GreeterPort"
createdFromAPI="true">
      <jaxws:outInterceptors>
             <bean
class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor"/>
             <ref bean="colmsInterceptor"/>
         </jaxws:outInterceptors>
         <jaxws:features>
            <colmsFeature/>
        </jaxws:features>
    </jaxws:client>

The feature is applied as expected, but the configured interceptors are
not picked up.

I don't pretend to be an expert in the whole
spring-injection-into-endpoints thing, but I had a poke around, and it
looks like he's uncovered a kosher bug.

The relevant logic seems a tad byzantine to me, but it looks like the
injection is occuring from the JaxWsProxyBeanDefinitionParser into the
JaxWsClientFactoryBean which then delegates via
ClientProxyFactoryBean.create() to ClientFactoryBean.create() which then
actually creates the Client instance that the new proxy will reference. 

What seems to be missing from this call-chain is a propogation of the
injected interceptors from the ClientProxyFactoryBean to the Client
instance, as the proxy instance isn't itself an InterceptorProvider.
Have I got that straight?

If no-one corrects me on the above, I'll go ahead commit an explicit
interceptor propogation from ClientProxyFactoryBean -> Client.

/Eoghan

Mime
View raw message