1 Feb 2011 07:21
Unable to get the 'First Application' running
Shalabh <shalabhsvyas <at> gmail.com>
2011-02-01 06:21:19 GMT
2011-02-01 06:21:19 GMT
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: <at> 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 {(Continue reading)
------------------------------------------------------
RSS Feed