You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "funregis (JIRA)" <ji...@apache.org> on 2014/12/24 10:41:13 UTC

[jira] [Updated] (CXF-6176) org.apache.cxf.jaxrs.bus.providers property is not taken in account in cxf bus

     [ https://issues.apache.org/jira/browse/CXF-6176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

funregis updated CXF-6176:
--------------------------
    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="stimeExceptionMapper"/> 
	<ref bean="stimeContainerRequestFilter"/>
</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="fr.stime.argosetoile.restservice.DemandeRestService"
		address="/rest/v1/demandes/">
   <jaxrs:serviceBeans>
      <ref bean="demandeRestServiceImpl" />
   </jaxrs:serviceBeans>
      <jaxrs:providers>
	   <ref bean="jsonProvider" />
	   <ref bean="stimeExceptionMapper" />
	</jaxrs:providers>
</jaxrs:server>

Regards,

Régis LIMARE

  was:
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="stimeExceptionMapper"/> 
	<ref bean="stimeContainerRequestFilter"/>
</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="fr.stime.argosetoile.restservice.DemandeRestService"
		address="/rest/v1/demandes/">
   <jaxrs:serviceBeans>
      <ref bean="demandeRestServiceImpl" />
   </jaxrs:serviceBeans>
      <jaxrs:providers>
	   <ref bean="jsonProvider" />
	   <ref bean="stimeExceptionMapper" />
	</jaxrs:providers>
</jaxrs:server>


> org.apache.cxf.jaxrs.bus.providers property is not taken in account in cxf bus
> ------------------------------------------------------------------------------
>
>                 Key: CXF-6176
>                 URL: https://issues.apache.org/jira/browse/CXF-6176
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus, JAX-RS
>    Affects Versions: 3.0.1, 3.0.3
>         Environment: I'm on websphere 8.5.0.1 , and CXF 3.0.3
>            Reporter: funregis
>            Priority: Critical
>
> 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="stimeExceptionMapper"/> 
> 	<ref bean="stimeContainerRequestFilter"/>
> </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="fr.stime.argosetoile.restservice.DemandeRestService"
> 		address="/rest/v1/demandes/">
>    <jaxrs:serviceBeans>
>       <ref bean="demandeRestServiceImpl" />
>    </jaxrs:serviceBeans>
>       <jaxrs:providers>
> 	   <ref bean="jsonProvider" />
> 	   <ref bean="stimeExceptionMapper" />
> 	</jaxrs:providers>
> </jaxrs:server>
> Regards,
> Régis LIMARE



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)