users@jersey.java.net

[Jersey] How to use Jersey in Android

From: santiago carrillo <sancarbar_at_gmail.com>
Date: Thu, 14 Jul 2011 19:42:38 -0500

Hi there,

I am trying to use Jersey in an Android app to call service running on a
server
 VM Ware vFabric provided by the Srping Source Tool Suite.


Is there any api to or way to used it because is not working properly,
I am gettin the expeption while calling it:
07-15 00:34:27.734: ERROR/AndroidRuntime(319):
java.lang.NullPointerException
07-15 00:34:27.734: ERROR/AndroidRuntime(319): at
javax.ws.rs.core.MediaType.valueOf(MediaType.java:119)
07-15 00:34:27.734: ERROR/AndroidRuntime(319): at
com.sun.jersey.api.client.PartialRequestBuilder.type(PartialRequestBuilder.java:92)
07-15 00:34:27.734: ERROR/AndroidRuntime(319): at
com.sun.jersey.api.client.WebResource.type(WebResource.java:304)
07-15 00:34:27.734: ERROR/AndroidRuntime(319): at
com.test.RestTestActivity.onClick(RestTestActivity.java:40)
07-15 00:34:27.734: ERROR/AndroidRuntime(319): at
android.view.View.performClick(View.java:2408)
07-15 00:34:27.734: ERROR/AndroidRuntime(319): at
android.view.View$PerformClick.run(View.java:8816)
07-15 00:34:27.734: ERROR/AndroidRuntime(319): at
android.os.Handler.handleCallback(Handler.java:587)
07-15 00:34:27.734: ERROR/AndroidRuntime(319): at
android.os.Handler.dispatchMessage(Handler.java:92)
07-15 00:34:27.734: ERROR/AndroidRuntime(319): at
android.os.Looper.loop(Looper.java:123)
07-15 00:34:27.734: ERROR/AndroidRuntime(319): at
android.app.ActivityThread.main(ActivityThread.java:4627)
07-15 00:34:27.734: ERROR/AndroidRuntime(319): at
java.lang.reflect.Method.invokeNative(Native Method)
07-15 00:34:27.734: ERROR/AndroidRuntime(319): at
java.lang.reflect.Method.invoke(Method.java:521)
07-15 00:34:27.734: ERROR/AndroidRuntime(319): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-15 00:34:27.734: ERROR/AndroidRuntime(319): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-15 00:34:27.734: ERROR/AndroidRuntime(319): at
dalvik.system.NativeStart.main(Native Method)



Thanks a lot

-- 
Santiago Carrillo