users@jersey.java.net

Re: [Jersey] Message Body Error

From: Marc Hadley <marc.hadley_at_oracle.com>
Date: Tue, 6 Apr 2010 10:31:31 -0400

Do you have an implementation of MessageBodyReader<com.dsi.ecm.rest.beans.Objects> included with your application ?

https://jsr311.dev.java.net/nonav/releases/1.0/javax/ws/rs/ext/MessageBodyReader.html

You need to supply a provider that knows how to deserialize MediaType.MULTIPART_FORM_DATA as com.dsi.ecm.rest.beans.Objects.

Marc.

On Apr 6, 2010, at 10:01 AM, emile wrote:

>
> Hi,
>
> I am using a method in my resource as follows -
>
> @POST
> @Consumes(MediaType.MULTIPART_FORM_DATA)
> @Produces(MediaType.APPLICATION_JSON)
> public Response createDocument(Objects objDoc)
> {
> ....
> }
>
> and following is the curl command being used-
> curl --header "auth: dmadmin:cGFzc3dvcmQ=" -F "files=_at_doc.xml"
> "http://localhost:8076/dsi/rest/repositories/DEVDOC/documents.xml"
>
> I am facing the following error -
>
> SEVERE: A message body reader for Java type, class
> com.dsi.ecm.rest.beans.Objects, and MIME media type,
> multipart/form-data;boundary=----------------------------73505f6573a3, was
> not found
>
> TIA,
> Emile
>
>
> --
> View this message in context: http://n2.nabble.com/Message-Body-Error-tp4859126p4859126.html
> Sent from the Jersey mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>