I'm just getting up to speed on Restlet and have some questions
related to object serialization.  I'm using 2.0-M5.

I downloaded the examples attached to
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2384438

I added the following statement:

testResource.store(result); (see below)

It works (i.e. no error) but when stepping through the code I noticed
the following:

When retrieving the resource the client uses the XstreamConverter.
When storing the resource it uses the DefaultConverter.  Is this the
expected behavior?

Regards,
Grant



public class TestClientResource {

    public static void main(String[] args) throws Exception {

        ClientResource clientResource = new ClientResource(
                "http://localhost:8182/rest/test";);
        TestResource testResource = clientResource.wrap(TestResource.class);

        // Retrieve the JSON value
        Customer result = testResource.retrieve();  // uses XstreamConverter

        if (result != null) {
            System.out.println(result);
            result.setFirstName("Testing");
        }

        testResource.store(result); // uses DefaultConverter

        // testResource.remove();
        testResource.stop();
    }

}

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

Reply via email to