You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Troy Mutter <Tr...@planwithvoyant.com> on 2013/12/11 21:55:07 UTC

Configure REST Services to exclude SOAP Interceptors

I found a thread in the archives on this topic and would like to see if anything has changed in the more recent releases. Not sure what version was being referenced in the older thread below but we're using CXF version 2.7.8.

http://cxf.547215.n5.nabble.com/how-do-I-exclude-rest-services-from-soap-interceptors-td5666602.html

The issue is that the SOAP interceptors are defined on the cxf:bus and are applied to both WS and RS endpoints. I can't find a way to exclude the SOAP interceptors for the REST services except by removing the SOAP interceptors from the bus definition and adding them to every jaxws endpoint. Unfortunately we have way to many endpoints and so I'd prefer not to go with this approach.

Have I missed anything in the more recent releases to make this easier?

Thanks,
Troy


Re: Configure REST Services to exclude SOAP Interceptors

Posted by Daniel Kulp <dk...@apache.org>.
My suggestion would be to write a server lifecycle listener (and/or client) that is added to the bus.  The listener would then look at the endpoint/etc… and figure out which interceptors should be added or not.

Dan



On Dec 11, 2013, at 3:55 PM, Troy Mutter <Tr...@planwithvoyant.com> wrote:

> I found a thread in the archives on this topic and would like to see if anything has changed in the more recent releases. Not sure what version was being referenced in the older thread below but we're using CXF version 2.7.8.
> 
> http://cxf.547215.n5.nabble.com/how-do-I-exclude-rest-services-from-soap-interceptors-td5666602.
> 
> The issue is that the SOAP interceptors are defined on the cxf:bus and are applied to both WS and RS endpoints. I can't find a way to exclude the SOAP interceptors for the REST services except by removing the SOAP interceptors from the bus definition and adding them to every jaxws endpoint. Unfortunately we have way to many endpoints and so I'd prefer not to go with this approach.
> 
> Have I missed anything in the more recent releases to make this easier?
> 
> Thanks,
> Troy
> 

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com