title: Calling a REST Webservice from Android Emulator
body: <p>I am trying to call a REST webservice from an Android app that I am running on an emulator. I can call the service from my browser with </p>
  
  <pre><code>http://localhost:39064/AndroidServiceImpl.svc/submitexcerpt?excerpt=...and+the+pirate+fell+off+the+boat
  </code></pre>
  
  <p>I can call the service from my emulator with </p>
  
  <pre><code>http://10.0.2.2:39064/AndroidServiceImpl.svc/submitexcerpt?excerpt=...and+the+pirate+fell+off+the+boat
  </code></pre>
  
  <p>But when I run this code:</p>
  
  <pre><code>HttpClient httpclient = new DefaultHttpClient();
  HttpResponse response1;
  response1 = httpclient.execute(new HttpGet("http://10.0.2.2:39064/AndroidServiceImpl.svc/submitexcerpt?excerpt=testingthisout"));
  </code></pre>
  
  <p>I get a <em>connection refused</em> exception. I have added the  <code>&lt;user-permission android:name="android.permission.INTERNET"&gt;&lt;/user-permission&gt;</code> to my Manifest file, and set the ThreadPolicy to LAX but still no luck. Any Suggestions?</p>