I'm currently trying to use Restlet to add an image that I selected from the 
android image gallery to the GAE that is also using Restlet. No matter what 
approach I take, I receive an EmptyRepresentation on the server.  I've also 
tried the following approach (android client code):

    ClientResource cr = new ClientResource("http://10.0.2.2:8888/blah/blah";);

    byte [] ba = bao.toByteArray();
    ByteArrayInputStream is = new ByteArrayInputStream(ba);                     
                                                                                
                                  
    Representation ir = new InputRepresentation(is, 
MediaType.APPLICATION_OCTET_STREAM);

    IComminication comm = cr.wrap(IComminication.class);
    cr.Upload(ir);

Server code is something like this:


        @Post
        public void Upload(Representation entity){
            //entity is NULL
        }

This is with Restlet 2.1 RC1.  Thank you.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2877296

Reply via email to