title: Android JSON web service issue
body: <p>I need to include JSON in my android app,
  I have followed some tutorials and have the app reading a test from twitter</p>
  
  <pre><code>package com.or.jsonswitch;
  
  import  ***
  
  public class JsonTestMySwitchActivity extends Activity {
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      Log.d("msg", "app started 1");
  
      String readResponse = readResponse(); //crea un string llenado por lo que devuelve la funcion()
  
      try {
          JSONArray jsonArray = new JSONArray(readResponse);
          Log.d("msg", "number of entries::"+jsonArray.length());
          Log.d("msg", "response::"+jsonArray);
  
      } catch (Exception e) {
          e.printStackTrace(); //donde va el stacktrace?
      }
  
  }
  
  public String readResponse() { //autogenera como private!, cambio a public!
  
      Log.d("msg" , "entra a buscar");
  
      StringBuilder builder = new StringBuilder();
      HttpClient client = new DefaultHttpClient();
      //HttpGet httpGet = new HttpGet("http://twitter.com/statuses/user_timeline/vogella.json");
      HttpGet httpGet = new HttpGet("http://myswitch.merged.stage.orchard.net.au/LifftService.svc/JSON/CoverageSearchByLatLong/-33.881393,151.214534");
  
      //httpGet.setHeader("Content-Type", "text/plain; charset=utf-8");
      //httpGet.setHeader("Content-Type", "json");
  
  
      try {
          HttpResponse response = client.execute(httpGet); //que es?
          StatusLine statusLine = response.getStatusLine(); //que es?
          int statusCode = statusLine.getStatusCode();
          if (statusCode == 200) { //200?
              HttpEntity entity = response.getEntity(); //que es?
              InputStream content = entity.getContent(); //que es?
              BufferedReader reader = new BufferedReader(new InputStreamReader(content)); //que es?
              String line;
              while ((line = reader.readLine()) != null) {
                  builder.append(line);
              }
          } else {
              Log.d("msg" , "Failed to download file");
          }
      } catch (ClientProtocolException e) {
          e.printStackTrace();
          Log.d("msg", "client protocol exception:"+e);
      } catch (IOException e) {
          e.printStackTrace();
          Log.d("msg", "client protocol exception:"+e);
      }       
      return builder.toString();
  }
  </code></pre>
  
  <p>Note that it works when fetching the JSON data from Twitter:</p>
  
  <pre><code>//HttpGet httpGet = new HttpGet("http://twitter.com/statuses/user_timeline/vogella.json");
  </code></pre>
  
  <p>but appears blank when fetching from my desired server:</p>
  
  <pre><code>HttpGet httpGet = new HttpGet("http://myswitch.merged.stage.orchard.net.au/LifftService.svc/JSON/CoverageSearchByLatLong/-33.881393,151.214534");
  </code></pre>
  
  <p>I have no error messages when it returns blank,</p>
  
  <p>do I have to set headers specifying it is JSON? How?</p>
  
  <pre><code>//httpGet.setHeader("Content-Type", "json");
  </code></pre>