I am using the Android-2.0.1 and have interface:

public interface FarmerResource 
{
    @Get
    public Farmer[] retrieve();

    @Put("json")
    public Farmer store(Farmer farmer);

    @Post("json")
    public void update(Farmer farmer);

    @Delete
    public void remove();
}

Then:

ClientResource cr = new ClientResource("http://host/some/path";);
FarmerResource fr = cr.wrap(farmerResource.class);
Farmer f = new Farmer();
fr.update(f);

Then JacksonConverter.score(Object source, Variant target, UniformResource 
resource) is called with target==null.

Then the request is sent with Content-Type=application/x-java-serialized-object 
and with size==0.

How do I get the automatic conversion of Farmer->json POSTed with the right 
Content-Type?

More generally, does the client proxy mechanism I am using work correctly in 
Android?  

How do I debug a problem like this as I don't have access to readable proxy 
code (it seems to be generated by ClientResource.wrap())?

Is there a way to get the automatic conversion calling post() directly on 
ClientResource?

What is the right way to do this?

Thanks, scott

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

Reply via email to