You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Nishant Chandra <ni...@gmail.com> on 2009/09/19 16:16:29 UTC
REST and MediaType
Hi,
I am setting the @Produces("text/html") and the following exception is thrown:
No message body writer found for response class Myclass
How do I configure for "text/html". Is there any wiki to do so?Also,
Is there a way to support multiple media types?
Thanks,
Nishant Chandra
Re: REST and MediaType
Posted by Sergey Beryozkin <sb...@progress.com>.
Some info is here :
http://cxf.apache.org/docs/jax-rs.html#JAX-RS-Resourcemethodsandmediatypes
>> I am setting the @Produces("text/html") and the following exception is thrown:
> >> No message body writer found for response class Myclass
It means that there's no writer has been registered which can convert an instance of Myclass into html page.
cheers, Sergey
----- Original Message -----
From: "Nishant Chandra" <ni...@gmail.com>
To: <us...@cxf.apache.org>
Sent: Monday, September 21, 2009 6:46 AM
Subject: Re: REST and MediaType
> Any help on this please.
>
> Nishant
>
> On Sat, Sep 19, 2009 at 7:46 PM, Nishant Chandra
> <ni...@gmail.com> wrote:
>> Hi,
>>
>> I am setting the @Produces("text/html") and the following exception is thrown:
>>
>> No message body writer found for response class Myclass
>>
>> How do I configure for "text/html". Is there any wiki to do so?Also,
>> Is there a way to support multiple media types?
>>
>> Thanks,
>> Nishant Chandra
>>
>
>
>
> --
> Nishant Chandra
> Hyderabad, India
> Cell : +91 9949828480
Re: REST and MediaType
Posted by Nishant Chandra <ni...@gmail.com>.
Any help on this please.
Nishant
On Sat, Sep 19, 2009 at 7:46 PM, Nishant Chandra
<ni...@gmail.com> wrote:
> Hi,
>
> I am setting the @Produces("text/html") and the following exception is thrown:
>
> No message body writer found for response class Myclass
>
> How do I configure for "text/html". Is there any wiki to do so?Also,
> Is there a way to support multiple media types?
>
> Thanks,
> Nishant Chandra
>
--
Nishant Chandra
Hyderabad, India
Cell : +91 9949828480