You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by "Glynn, Eoghan" <eo...@iona.com> on 2007/05/17 14:55:33 UTC

Problem with not picking up interceptors


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

RE: Problem with not picking up interceptors

Posted by "O hEigeartaigh, Colm" <Co...@iona.com>.
Thanks Eoghan, the config I'm using is now working as expected following
your merge.

Colm.

-----Original Message-----
From: Glynn, Eoghan 
Sent: 17 May 2007 14:17
To: 'cxf-dev@incubator.apache.org'
Cc: O hEigeartaigh, Colm
Subject: RE: Problem with <jaxws:client> not picking up interceptors 



Forgot to mention that this is related to the question Colm posted to
the list last week[1]. 

But the underlying issue sortta got obscured by the question of whether
both <jaxws:client> and <jaxws:endpoint> beans can be configured with
the same portname ID within the same Bus.

Anyway, the tests just came up green, and Colm is waiting on a fix, so
I'm just going to go ahead and commit.

/Eoghan

[1]
http://mail-archives.apache.org/mod_mbox/incubator-cxf-dev/200705.mbox/%
3cE91104197DA2654DA833B6EB53B6C488029D6D9E@emea-ems1.IONAGLOBAL.COM%3e 


> -----Original Message-----
> From: Glynn, Eoghan [mailto:eoghan.glynn@iona.com] 
> Sent: 17 May 2007 13:56
> To: cxf-dev@incubator.apache.org
> Cc: O hEigeartaigh, Colm
> Subject: Problem with <jaxws:client> not picking up interceptors 
> 
> 
> 
> 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
> 

RE: Problem with not picking up interceptors

Posted by "Glynn, Eoghan" <eo...@iona.com>.

Forgot to mention that this is related to the question Colm posted to
the list last week[1]. 

But the underlying issue sortta got obscured by the question of whether
both <jaxws:client> and <jaxws:endpoint> beans can be configured with
the same portname ID within the same Bus.

Anyway, the tests just came up green, and Colm is waiting on a fix, so
I'm just going to go ahead and commit.

/Eoghan

[1]
http://mail-archives.apache.org/mod_mbox/incubator-cxf-dev/200705.mbox/%
3cE91104197DA2654DA833B6EB53B6C488029D6D9E@emea-ems1.IONAGLOBAL.COM%3e 


> -----Original Message-----
> From: Glynn, Eoghan [mailto:eoghan.glynn@iona.com] 
> Sent: 17 May 2007 13:56
> To: cxf-dev@incubator.apache.org
> Cc: O hEigeartaigh, Colm
> Subject: Problem with <jaxws:client> not picking up interceptors 
> 
> 
> 
> 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
>