ZeissS/wobble — Issue #40: invalid JSON RPC for system.listMethods?
Author: Velrok
Created: 2011-12-21 19:20:46+00:00
State: open

I'm using this [JSON RPC for android lib](https://code.google.com/p/android-json-rpc/) to handle the rpc calls to your wobble project.

When calling for ```system.listMethods``` I get a ```JSONRPCException: Invalid JSON response``` .

Here is the java code:

```java
try {
JSONObject r = client.callJSONObject("system.listMethods");
result = r.toString();
} catch (JSONRPCException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
```

And the stack trace:

```java
12-21 20:12:22.747: W/System.err(794): org.alexd.jsonrpc.JSONRPCException: Invalid JSON response
12-21 20:12:22.747: W/System.err(794):	at org.alexd.jsonrpc.JSONRPCHttpClient.doJSONRequest(JSONRPCHttpClient.java:103)
12-21 20:12:22.757: W/System.err(794):	at org.alexd.jsonrpc.JSONRPCClient.doRequest(JSONRPCClient.java:44)
12-21 20:12:22.757: W/System.err(794):	at org.alexd.jsonrpc.JSONRPCClient.callJSONObject(JSONRPCClient.java:240)
12-21 20:12:22.757: W/System.err(794):	at de.meinsinn.androbble.AndrobbleActivity$1.onClick(AndrobbleActivity.java:31)
12-21 20:12:22.757: W/System.err(794):	at android.view.View.performClick(View.java:2408)
12-21 20:12:22.757: W/System.err(794):	at android.view.View$PerformClick.run(View.java:8816)
12-21 20:12:22.757: W/System.err(794):	at android.os.Handler.handleCallback(Handler.java:587)
12-21 20:12:22.757: W/System.err(794):	at android.os.Handler.dispatchMessage(Handler.java:92)
12-21 20:12:22.757: W/System.err(794):	at android.os.Looper.loop(Looper.java:123)
12-21 20:12:22.757: W/System.err(794):	at android.app.ActivityThread.main(ActivityThread.java:4627)
12-21 20:12:22.767: W/System.err(794):	at java.lang.reflect.Method.invokeNative(Native Method)
12-21 20:12:22.767: W/System.err(794):	at java.lang.reflect.Method.invoke(Method.java:521)
12-21 20:12:22.767: W/System.err(794):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
12-21 20:12:22.767: W/System.err(794):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
12-21 20:12:22.767: W/System.err(794):	at dalvik.system.NativeStart.main(Native Method)
12-21 20:12:22.767: W/System.err(794): Caused by: org.json.JSONException: No value for error
12-21 20:12:22.777: W/System.err(794):	at org.json.JSONObject.get(JSONObject.java:354)
12-21 20:12:22.777: W/System.err(794):	at org.alexd.jsonrpc.JSONRPCHttpClient.doJSONRequest(JSONRPCHttpClient.java:82)
12-21 20:12:22.777: W/System.err(794):	... 14 more
```