On 15 Nov 2012, Martin Hoeller wrote: > On 14 Nov 2012, Ryan Baxter wrote: > > > If I had to guess that error is coming from RpcServlet.process. But it > > looks like you would only get that is your JSON was invalid. I ran the > > JSON in your email through a validator and it looks correct, so I am not > > really sure. You might want to set a breakpoint in RpcServlet.process and > > see if you see anything else. > > An exception is thrown in the first line of the RpcServlet.process method: > > JSONObject req = new JSONObject(body); > > The message of the exception says > > org.json.JSONException: A JSONObject text must begin with '{' at > character 1 of [{"method":"gadgets.metadata","id":"gadgets.metadata", > "params" ... "groupId":"@self"}}]
I did some more debugging and according to Firebug, the working example shipped with Shindig sends a request that is almost identical! So I'm confused why the RpcServlet can interpret the posted data one time while it cannot handle it another time with no significant change. Both requests have JSON data starting with '[{"method":...'. I'm still debuging and post back when I know more... - martin
signature.asc
Description: PGP signature