Hi

I checked, it supports it on the output only, when File is returned.
I need to verify if File has to be supported on the input - probably
yes...
in which case we'd need to copy the input stream to some temp storage...
Using InputStream is another option as a temp measure till I fix using
File on the input

Cheers, Sergey

-----Original Message-----
From: adam.galloway [mailto:[email protected]] 
Sent: 07 April 2009 18:32
To: [email protected]
Subject: java.io.File MessageBodyReader for JAX-RS


In reading the documentation for JAX-RS it says "By default, CXF
supports
String, byte[], InputStream, Reader, File ...".  I'm trying to create a
service that will accept a file upload  using the following signature:

@POST
@Path("/upload/")
@Consumes("application/octet-stream")
public Response upload(File myFile) {
   ...
}

However when I Post a file to the service I get ".No message body reader
found for request class : File, ContentType : application/octet-stream."
errors.  Is there a special ContentType I should use for the default
support
of java.io.File?

Thanks,
Adam
-- 
View this message in context:
http://www.nabble.com/java.io.File-MessageBodyReader-for-JAX-RS-tp229342
47p22934247.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to