I created the REST service,deployed it on GAE with URL 
http://rest4androidshalabh.appspot.com/. I tried the JavaSE client but got the 
Contact object as NULL.My Application class code is:

@Override
public Restlet createInboundRoot() {
Router router = new Router(getContext());
router.attach("/contacts/123",ContactServerResource.class);
return router;
}

I did not find any exceptions in the appspot log.However, I get the console 
output as:

Feb 1, 2011 11:36:45 AM org.restlet.engine.http.connector.HttpClientHelper start
INFO: Starting the default HTTP client
false true

My JavaSE client code is:

ClientResource cr = new 
ClientResource("http://rest4androidshalabh.appspot.com/contacts/123";);
                // Get the Contact object
                ContactResource resource = cr.wrap(ContactResource.class);
                Contact contact = resource.retrieve();

                if (contact != null) {
                    System.out.println("firstname: " + contact.getFirstName());
                    System.out.println(" lastname: " + contact.getLastName());
                    System.out.println("      age: " + contact.getAge());
                }
                else
                {
                        System.out.println((cr==null)+" "+(contact==null));
                }

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

Reply via email to