users@jersey.java.net

[Jersey] Re: com.sun.jersey.api.MessageException ?

From: Srinivas Naresh Bhimisetty <shri.naresh_at_gmail.com>
Date: Thu, 23 Jun 2011 16:50:35 +0530

On Thu, Jun 23, 2011 at 3:59 PM, susmitha <susmitha.shali_at_tcs.com> wrote:

> Its giving run time error as..
>
> A message body writer for Java class java.util.ArrayList, and Java type
> class java.util.ArrayList, and MIME media type image/jpeg was not found.
>

This means you have to provide a class which implements MessageBodyWriter
for the objects of type ArrayList and media type "image/jpeg" .

Before, that can you try this, if it helps:

*GenericEntity<List<InputStream>> entity = new
GenericEntity<List<InputStream>>(is);*
*return
Response.status(Response.Status.OK).type("image/jpeg").entity(entity).build();
*
*
*
- Naresh


> ********
> can we return list of inputstream in web service dta display multiple pics?
> I have written one web service where i will get one image when a web
> service
> is called. But i am unable to display multiple images... where i am doing
> wrong ?
>
>
>
>
> --
> View this message in context:
> http://jersey.576304.n2.nabble.com/com-sun-jersey-api-MessageException-tp6507380p6507851.html
> Sent from the Jersey mailing list archive at Nabble.com.
>