Hello Daniel,

could you test with an ArrayList?
I suspect List is not recognized as an implementation of the Serializable
interface.

Best regards,
Thierry Boileau


Hi all
>
> Another question!
>
> I´m having issues with a List being returned as null, even though
> everything
> looks good on the server side.
>
> My resource interface looks like this:
>
> public interface PassListResource {
>
>    @Get
>    public List<HashMap<String, String>> retrieve();
>
> }
>
> The implementation for this interface is simply
>
>        @Get
>        public List<HashMap<String, String>> retrieve() {
>                List<HashMap<String, String>> result = null;
>                try {
>                        FriskisDataService service = new
> FriskisDataService();
>                        result = service.getAllSessions();
>                } catch (Exception e) {
>                        System.err.println(e);
>                }
>
>                return result;
>
>        }
>
> This method returns a List<HashMap<String, String>>, and if I
> trace
> the code through the restlet source, I can see that an ObjectRepresentation
> with this List is put in the response back to my client.
>
> However, back on the client-side, the object has dissapeared, and the
> retrieve-method returns null. Any clues as to what I might have missed?
>
> Regards
> Daniel
>
> --
> View this message in context:
> http://restlet-discuss.1400322.n2.nabble.com/ArrayList-returned-as-to-client-as-null-tp6174616p6174616.html
> Sent from the Restlet Discuss mailing list archive at Nabble.com.
>
> ------------------------------------------------------
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2711774
>

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

Reply via email to