cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mukarram Baig <>
Subject ParamConverterProviders getting jumbled up between jaxrs:server and jaxrs:client on
Date Tue, 01 Jul 2014 02:12:18 GMT
Hi All,

I am facing a weird issue with CXF 2.7.11 (also in 2.7.3)

Say I have an app1 that exposes a certain method in Service1 like:

void doSomething(@QueryParam("input") SpecialObject1 obj)

and the XML configuration for this is as:
    <jaxrs:server id="app1ServiceRS"
            <ref bean="service1" />
            <ref bean="jacksonJsonProvider"/>
            <ref bean="app1ParamConverterProvider" />

the app1ParamConverterProvider is the bean of a ParamConverterProvider
class in app1 that supplies the ParamConverter for handling SpecialObject1.
So far things work great. Now if this app1 needs to interact with another
app - app2 which exposes a method in Service2 like:

void doSomething(@QueryParam("inputThing") SpecialObject2 obj);

and the XML in app1 to access this as:
    <jaxrs:client id="service2" serviceClass="com.kilo.Service2"
            <ref bean="jacksonJsonProvider" />
            <ref bean="app2ParamConverterProvider" />

the app2ParamConverterProvider is a different bean of a
ParamConverterProvider class in app2 that supplies the ParamConverter for
handling SpecialObject2.

No other bus configuration is done - so everything else is default. When
any thread in app1 tries to access service2, somehow the control is passed
to app1ParamConverterProvider instead of app2ParamConverterProvider and the
call fails. Is this expected? From the docs at
it seems that if the two providers are mentioned with different ids, then
they should not be shared and shouldn't cause one to be invoked with the

This is somewhat random, but I think I have a test project (using jetty
container) where I am able to reproduce this consistently. Please let me
know if I am missing out on something elementary.

FWIW, I don't see this problem in CXF 3.0.0. Maybe because
ServerProviderFactory and ClientProviderFactory have been split up?

Thanks in advance!

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message