Hello Arnaud,

can you add the Jackson extension on server side (it provides an automatic
converter for json representations), and from the client side ask for the
json representation of the resource.
Either by setting up the "accept" header of the HTTP request, of by adding
the "media=json" parameter in the query string.

I've entered a new issue for that :
https://github.com/restlet/restlet-framework-java/issues/688

Best regards,
Thierry Boileau


Hi,
> On GAE Server I have these two entities:
> public class Convive implements Serializable, HasKey {
>         @Id
>         private Long id;
>         private String identifiant;
>         private Key<TypeConvive> typeConvive;
>         private boolean groupe;
>         private int nombreConvives;
>         private Key<?> entiteLiee;
>         private Date dateEntree;
>         private Date dateSortie;
>         private Key<LieuLivraisonRepas> lieuLivraisonRepas;
>         private List<Key<ItemProfilAlimentaire>> itemsProfilAlimentaire;
>         private List<Key<ItemDoublePortion>> itemsDoublePortion;
>         private List<Key<ItemFinition>> itemsFinition;
>         private List<Key<TypeRepas>> typesRepasPresentDefaut;
>         private String photoBlobKey;
> .
> .
> .
> }
>
> public class Plat implements Serializable, HasKey {
>         @Id
>         private Long id;
>         private String nom;
>         private String ttsName;
>         private String photoBlobKey;
>         private List<Key<TypePlat>> typesPlat;
>         private List<Key<ItemProfilAlimentaire>>
> compatibilitesAlimentaires;
>         private List<Key<ItemDoublePortion>> compatibilitesDoublesPortions;
> .
> .
> .
> }
>
> If I want to retrieve a List of all the Convive entities on a Java SE
> client, it works perfectly. The beginning of the response:
> HTTP/1.1 200 OK
> Content-Type: application/x-java-serialized-object
> Accept-Ranges: bytes
> Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
> Date: Fri, 07 Sep 2012 15:13:59 GMT
> Server: Google Frontend
> Content-Length: 25130
>
> If I do the same thing with a List of all Plat entities, the entities are
> returned (I can see them in Fiddler), but the deserialized object is null
> (without an error message). The beginning of the response:
> HTTP/1.1 200 OK
> Content-Type: application/x-java-serialized-object
> Date: Fri, 07 Sep 2012 15:20:04 GMT
> Accept-Ranges: bytes
> Server: Restlet-Framework/2.1m7
> Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
> Content-Length: 22172
> I thought it was a matter of length, but as you can see the content length
> of the Convive List is higher. But If I reduce the size of the returned
> Plat Entities to 14 entities, I have got the List deserialized (I tested
> that it is not the fifteenth entity which causes the trouble). But  The
> "funniest" thing is that if try these on a GWT client, everything works
> fine (using application/x-java-serialized-object+gwt serialization on the
> Java SE client might have solved the problem, but it seems that it is not
> possible: http://tinyurl.com/cap425w).
> Any clue will be welcomed.
> Thanks for your reading...
>
> ------------------------------------------------------
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3004282
>

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

Reply via email to