You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Kruntz <ca...@ottolina.net> on 2009/07/24 14:03:55 UTC
Re: Error : No message body writer found for response class :
ArrayList. - A String is OK...
Sergey Beryozkin-2 wrote:
>
> If you do not want to use Spring then you can register your provider with
> CxfNonSpringJaxrsServlet :
>
Is there a way to register the provider programmatically, without Spring?
Thanks in advance.
--
View this message in context: http://www.nabble.com/Error-%3A-No-message-body-writer-found-for-response-class-%3A-ArrayList.----A-String-is-OK...-tp23141179p24643368.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Error : No message body writer found for response class :
ArrayList. - A String is OK...
Posted by Kruntz <ca...@ottolina.net>.
Sergey Beryozkin-2 wrote:
>
> sure, if you use JAXRSServerFactoryBean then it has a setter accepting a
> list of providers.
>
Thanks, Sergey.
This is what I did, and it works perfectly:
this.sfb = new JAXRSServerFactoryBean();
..
..
List providers = new ArrayList();
Object responseProvider = new ResponseProvider();
providers.add(responseProvider);
this.sfb.setProviders(providers);
..
..
this.sfb.create();
Cheers,
Carlo
--
View this message in context: http://www.nabble.com/Error-%3A-No-message-body-writer-found-for-response-class-%3A-ArrayList.----A-String-is-OK...-tp23141179p24646976.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Error : No message body writer found for response class : ArrayList. - A String is OK...
Posted by Sergey Beryozkin <sb...@progress.com>.
Hi
>
>
> Sergey Beryozkin-2 wrote:
>>
>> If you do not want to use Spring then you can register your provider with
>> CxfNonSpringJaxrsServlet :
>>
> Is there a way to register the provider programmatically, without Spring?
sure, if you use JAXRSServerFactoryBean then it has a setter accepting a list of providers.
if you use CxfNonSpringJaxrsServlet then you can use jaxrs.providers parameter to register a list of provider class names or you can
supply to it a JAXRS Application implementation if you prefer.
cheers, Sergey
>
> Thanks in advance.
> --
> View this message in context:
> http://www.nabble.com/Error-%3A-No-message-body-writer-found-for-response-class-%3A-ArrayList.----A-String-is-OK...-tp23141179p24643368.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>