Folks,

I have a requirement to use a JAX-WS client proxy using custom
interceptors which change from request to request.

I'm currently doing this by using JaxWsProxyFactoryBean to create a new
proxy client each time, and injecting the interceptor each time.
However, this means going through the whole client creation process each
time, which is inefficient and inelegant.

The interaction between ClientFactoryBean and ClientProxyFactoryBean
suggests that this is unavoidable - there seems to be no simple way to
decorate the client proxy with interceptors that are private to the
current thread.  I could just store the interceptor in a ThreadLocal,
and then retrieve it using a fixed, delegating interceptor, but again
that seems a bit clunky.

So, is it possible in the CXF API to have a single instance of a proxy
client, which I can decorate with additional interceptors on a
per-request basis?

kenny

Reply via email to