s***@public.gmane.org
2012-01-25 22:17:46 UTC
Hi there,
I have a problem on Android with jersey-client...
I'm using jersey-core-1.11 and jersey-client-1.11
I'm trying to execute this code :
WebResource webResource = Client.create().resource(nodeEntryPointUri);
ClientResponse response = webResource.path("signalised")
.queryParam("representationJSON", object.toString())
.accept("application/json")
.get( ClientResponse.class );
Log.d(TAG,"object " + response);
String output = response.getEntity(String.class);
But on the last line i have this error :
01-25 21:52:46.273: E/AndroidRuntime(233): Uncaught handler: thread
main exiting due to uncaught exception
01-25 21:52:46.282: E/AndroidRuntime(233):
java.lang.NullPointerException
01-25 21:52:46.282: E/AndroidRuntime(233): at
javax.ws.rs.core.MediaType.valueOf(MediaType.java:119)
01-25 21:52:46.282: E/AndroidRuntime(233): at
com.sun.jersey.api.client.ClientResponse.getType(ClientResponse.java:61
5)
01-25 21:52:46.282: E/AndroidRuntime(233): at
com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:
532)
Is there a solution ? can someone help me ?
Thx in advance.
I have a problem on Android with jersey-client...
I'm using jersey-core-1.11 and jersey-client-1.11
I'm trying to execute this code :
WebResource webResource = Client.create().resource(nodeEntryPointUri);
ClientResponse response = webResource.path("signalised")
.queryParam("representationJSON", object.toString())
.accept("application/json")
.get( ClientResponse.class );
Log.d(TAG,"object " + response);
String output = response.getEntity(String.class);
But on the last line i have this error :
01-25 21:52:46.273: E/AndroidRuntime(233): Uncaught handler: thread
main exiting due to uncaught exception
01-25 21:52:46.282: E/AndroidRuntime(233):
java.lang.NullPointerException
01-25 21:52:46.282: E/AndroidRuntime(233): at
javax.ws.rs.core.MediaType.valueOf(MediaType.java:119)
01-25 21:52:46.282: E/AndroidRuntime(233): at
com.sun.jersey.api.client.ClientResponse.getType(ClientResponse.java:61
5)
01-25 21:52:46.282: E/AndroidRuntime(233): at
com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:
532)
Is there a solution ? can someone help me ?
Thx in advance.