Hello Gabriel,

that's really weird, I've tried your sample code, and it simply works for
me. I've just created an Eclipse project with your source code and added
the org.restlet.jar taken from 2.0.11 version.
I will try in a servlet container, then in Netbeans.
Once added the jackson extension, your client test code is also able to
retrieve a json representation of the Contact, with correct values.

Best regards,
Thierry Boileau

Hello,
>
> I've attached a file with a very simple example based in the restlet
> example from the restlet web.
>
> In this example a very simple server is run that exposes the Contact
> resource as a Java Object representation.
> If the Contact resource that is retrieved by the client has any int field
> with a negative value (in the example attached I've changed the age field
> on the ContactServerResorce to be a "-1" ) then when the client tries to
> retrieve the Contact, it is always null.
> If the age field is positive the contact is retrieved without problem.
> I've test this in windows and linux, JDK 1.6 and JDK1.7, with
> restletjse2.1RC2 and the nightshot. Also with the 2.0.10, and it always is
> null if any integer is negative in the POJO.
>
> Also if I change the int for a double, it works.
> This is making me crazy.
> Can anybody help me please?
> Thank you in advance
> Gabriel
> PD: the attached file is a netbeans project, however it is not need to
> compile the source.
>
> ------------------------------------------------------
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2918603

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

Reply via email to