How can we access/edit the CXF Soap Interceptor List?

Solution Unverified - Updated -


  • JBoss Enterprise Application Platform (EAP) 6.x
  • JBoss Enterprise Application Platform (EAP) 5.x


  • We would like to know how to access the SOAP interceptor list on a JBossWS SOAP client and disable certain interceptors for debug purposes.


Take a look at this page:

Search for "InterceptorProviders" about 20% of the way down, and there's a code example:

To add an interceptor to an interceptor chain, you'll want to add it to one of the Interceptor Providers.
MyInterceptor interceptor = new MyInterceptor();

When you call provider.getInterceptors() this returns a collection object (probably a list of some sort) and while the example has you adding a new interceptor you should be able to iterate through it and change/remove interceptors as well.

As you iterate you should be able to check the class type and look for the interceptor type you want to remove. Here is some sample code for removing an Interceptor:

public static void removeInterceptor(Class<? extends Interceptor<?>> interceptorType, Message message) {
        Iterator<Interceptor<? extends Message>> iterator = message.getInterceptorChain().iterator();
        Interceptor<?> removeInterceptor = null;
        for (; iterator.hasNext();) {
            Interceptor<?> interceptor =;
            if (interceptorType.isInstance(interceptor)) {
                removeInterceptor = interceptor;

        if (removeInterceptor != null) {
            LOGGER.debug("Removing interceptor {}", removeInterceptor.getClass().getName());

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.