title: android-json-rpc, receiving invalid response
body: <p>I am trying to get responses from a JSON-RPC Service on Android, I'm currently developing on 3.0 Honeycomb.</p>
  
  <p>This is the library I am using:
  <a href="http://code.google.com/p/android-json-rpc/" rel="nofollow">http://code.google.com/p/android-json-rpc/</a></p>
  
  <p>and I am using this JSON-RPC service page for testing:
  <a href="http://www.raboof.com/projects/jayrock/demo.ashx" rel="nofollow">http://www.raboof.com/projects/jayrock/demo.ashx</a></p>
  
  <p>The connection seems to work, but I keep getting this Exception</p>
  
  <pre><code>org.alexd.jsonrpc.JSONRPCException: Invalid JSON response
  </code></pre>
  
  <p>I've tried different methods and survey pages, but I always get the same Exception. Where am I going wrong? </p>
  
  <p>The relevant code is below. AsyncTask is used because since 3.0 Android doesn't allow network connections in the main stream. Thanks in advance.</p>
  
  <pre><code> @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      JSONHandler task = new JSONHandler();
      task.execute(new String[] {"http://www.raboof.com/projects/jayrock/demo.ashx"});    
  }
  
  private class JSONHandler extends AsyncTask&lt;String, Void, String&gt; {
  
      @Override
      protected String doInBackground(String... urls) {
          for (String url : urls) {
              JSONRPCClient client = JSONRPCClient.create(url);
              client.setConnectionTimeout(2000);
              client.setSoTimeout(2000);
  
              try {
                  client.call("counter");
              } catch (JSONRPCException e) {
                  e.printStackTrace(); //Invalid JSON Response caught here
              }
          }
          return null;
      }
  }
  </code></pre>