Details
Description
Hello
I tried to set common providers at bus level to avoid to declare it on each jax-rs endpoint :
<cxf:bus>
<cxf:outInterceptors>
<ref bean="changeEncodingInterceptor" />
</cxf:outInterceptors>
<cxf:properties>
<entry key="org.apache.cxf.jaxrs.bus.providers" value-ref="busProviders"/>
</cxf:properties>
</cxf:bus>
<!-- providers -->
<util:list id="busProviders">
<ref bean="jsonProvider"/>
<ref bean="myExceptionMapper"/>
</util:list>
when i call my web service : it's not working :
[ERROR] [WebContainer : 29] org.apache.cxf.jaxrs.utils.JAXRSUtils : No message body reader has been found for class fr.stime.argosetoile.parametres.json.article.FiltreArticle, ContentType: application/json
Cxf cannot find the json provider.
And it's working when I am declaring it at each Jax-rs :
<jaxrs:server serviceClass="my.package.restservice.DemandeRestService"
address="/rest/v1/demandes/">
<jaxrs:serviceBeans>
<ref bean="demandeRestServiceImpl" />
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref bean="jsonProvider" />
<ref bean="myExceptionMapper" />
</jaxrs:providers>
</jaxrs:server>
Regards,
RĂ©gis LIMARE