Hi, im trying to consume a restlet get method i've implemented, but i get this
exception.
11-11 11:08:58.224: ERROR/AndroidRuntime(446): FATAL EXCEPTION: main
11-11 11:08:58.224: ERROR/AndroidRuntime(446): java.lang.NullPointerException
11-11 11:08:58.224: ERROR/AndroidRuntime(446): at
org.restlet.data.ClientInfo.getAgentAttributes(ClientInfo.java:465)
11-11 11:08:58.224: ERROR/AndroidRuntime(446): at
org.restlet.Request.<init>(Request.java:244)
11-11 11:08:58.224: ERROR/AndroidRuntime(446): at
org.restlet.resource.ClientResource.handle(ClientResource.java:845)
11-11 11:08:58.224: ERROR/AndroidRuntime(446): at
org.restlet.resource.ClientResource.handle(ClientResource.java:819)
11-11 11:08:58.224: ERROR/AndroidRuntime(446): at
org.restlet.resource.ClientResource.handle(ClientResource.java:777)
11-11 11:08:58.224: ERROR/AndroidRuntime(446): at
org.restlet.resource.ClientResource.get(ClientResource.java:514)
11-11 11:08:58.224: ERROR/AndroidRuntime(446): at
org.me.rest.RestApi2.getFolk(RestApi2.java:44)
it seems agentattributes is null...
The Client code
////////////////////////////////
ClientResource itemResource = new
ClientResource("http://10.0.2.2:8084/firstStepsServlet/hello");
Representation rep = itemResource.get();
///////////////////////////////
Im working with a tomcat server, and a Android client.
I've tried using the "request way" of the Restlet Framework 1.0 and it works :
//////////////////////
Request request = new Request(Method.GET,
"http://10.0.2.2:8084/firstStepsServlet/hello");
Client client = new Client(Protocol.HTTP);
Response response = client.handle(request);
Representation st= response.getEntity();
///////////////////////
...but i would like to know why the "client resorce way" is not working.
Thanks¡¡¡¡¡
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2680985