title: Connecting to web service ends with SocketTimeoutException
body: <p>I have code segment that connects to a web service. My app has a button, when pressed fetches some data from server and shows to user. It is very simple, but never works. I have read all of post regards to my problem, but none of them solved it. The code is used from <a href="https://www.codeproject.com/articles/304302/calling-asp-net-webservice-asmx-from-an-android-ap" rel="nofollow noreferrer">codeproject sample</a>:</p>
  
  <pre><code>public void onClick(View v) {
      SoapObject request = new SoapObject("http://tempuri.org/", "Add");
      PropertyInfo pi=new PropertyInfo();
      pi.setName("a");
      pi.setValue(10);
      pi.setType(Integer.class);
      request.addProperty(pi);
      pi=new PropertyInfo();
      pi.setName("b");
      pi.setValue(15);
      pi.setType(Integer.class);
      request.addProperty(pi);
  
      SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
              SoapEnvelope.VER11);
      envelope.dotNet = true;
  
      envelope.setOutputSoapObject(request);
  
      HttpTransportSE httpTransport = new HttpTransportSE("http://grasshoppernetwork.com/NewFile.asmx");
      String response="";
      try
      {
          httpTransport.call("http://tempuri.org/Add", envelope);
          response = (envelope.getResponse()).toString();
      }
      catch (Exception exception)
      {
          response=exception.toString();
      }
  
  
      onSoapRequestFinished(response.toString());
  }
  </code></pre>
  
  <p>I have added 2 permissions: Network_Access and Internet.  Surprisingly, the web service is accessible from AVD's browser.</p>
  
  <p>The errors are:</p>
  
  <pre><code>java.net.MalformedURLException: no protocol: java.net.SocketTimeoutException
      at java.net.URL.&lt;init&gt;(URL.java:589)
      at java.net.URL.&lt;init&gt;(URL.java:486)
      at java.net.URL.&lt;init&gt;(URL.java:435)
      at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:115)
      at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:155)
      at ir.dana.sharif.testxml.MainActivity.onSoapRequestFinished(MainActivity.java:103)
      at ir.dana.sharif.testxml.MainActivity.onClick(MainActivity.java:84)
      at android.view.View.performClick(View.java:5610)
      at android.view.View$PerformClick.run(View.java:22265)
      at android.os.Handler.handleCallback(Handler.java:751)
      at android.os.Handler.dispatchMessage(Handler.java:95)
      at android.os.Looper.loop(Looper.java:154)
      at android.app.ActivityThread.main(ActivityThread.java:6077)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
  </code></pre>