Several things to address here: - You have to decide whether or not to use annotations. Currently you're trying to do it both ways, (a) by implementing AccountsResource, which has represent() and add() methods annotated with @Get and @Post, and (b) by overriding ServerResource.get(). - The default converter registered with the ConverterService does not know how to serialize List<String>, but there are several Restlet extensions that register ConverterHelpers that do know how. You need to pick one of them and include its jar in your build.
--tim On Sun, Jan 15, 2012 at 7:46 PM, martin <[email protected]> wrote: > Hi, > I am trying to modify AccountsResource in sample > org.restlet.example.book.restlet.ch03.sec3 to have the method represent() > returning a List<String> instead of a String containing all accounts. > > I got a converter service error: > org.restlet.service.ConverterService toObject > ATTENTION: Unable to find a converter for this representation : > [application/x-java-serialized-object] > > As List<T> interface does not extends Serializable, I modified represent() > to return a LinkList<String> without success. > I also tried to override method ServerResource.get() to enforce an > ObjectRepresentation<U>, but I can't make it work either. > > Having the client/server exchanging Serializable object would be fine for > me as I latter expect to exchange large objects that would most probably be > more compact in binary form over the network. > > Any suggestion to deal with this error? > Thanks in advance, > Martin > > ------------------------------------------------------ > > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2908993 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2909186

