users@jersey.java.net

[Jersey] Re: Message Body Writer

From: Pavel Bucek <pavel.bucek_at_oracle.com>
Date: Wed, 13 Apr 2011 11:22:31 +0200

Can you share method declaration and optionally client code (or the way
how you are trying to invoke it)? Or whole resource..

BTW, you can check out our samples, we have covered there most of common
usecases, so it is probably you'll find there good starting point for
your application, see [1].

And BTW2, I recommend checking jersey user guide too: [2], especially
part called "Extracting request parameters" [3].

Pavel

[1] http://download.java.net/maven/2/com/sun/jersey/samples/
[2] http://jersey.java.net/nonav/documentation/latest/index.html
[3] http://jersey.java.net/nonav/documentation/latest/jax-rs.html#d4e246



On 4/13/11 11:03 AM, Rimy Sfm wrote:
> I'm fairly new to restful web services restful and jersey. Within my web
> service I have a method that takes 2integers as parameters and I'm getting
> this error:
>
> GRAVE: Mapped exception to response: 500 (Internal Server Error)
> javax.ws.rs.WebApplicationException: com.sun.jersey.api.MessageException: A
> message body writer for Java class java.lang.Integer, and Java type class
> java.lang.Integer, and MIME media type application/octet-stream was not
> found
>
>
> Can anyone tell me what to do??
>
> Thanks
>
> --
> View this message in context: http://jersey.576304.n2.nabble.com/Message-Body-Writer-tp6268231p6268231.html
> Sent from the Jersey mailing list archive at Nabble.com.
>