java.net.SocketTimeoutException: Connection timed out
<p>Hi, I have some issues with the following piece of code:</p>

<pre><code>package app.test.testapplication;

import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.PropertyInfo;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;

import android.os.Bundle;
import android.app.Activity;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class MainActivity extends Activity 
{
/** Called when the activity is first created. */
private static final String SOAP_ACTION = "http://tempuri.org/findContact";

private static final String OPERATION_NAME = "findContact";// your webservice web method name

private static final String WSDL_TARGET_NAMESPACE = "http://tempuri.org/";

private static final String SOAP_ADDRESS = "http://10.0.2.2:50426/Service.asmx";


TextView tvData1;
EditText edata;
Button button;
String studentNo;

@Override
public void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    tvData1 = (TextView)findViewById(R.id.textView1);


    button=(Button)findViewById(R.id.button1);

    button.setOnClickListener(new OnClickListener() {
        public void onClick(View v) {
              SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE,OPERATION_NAME);
                PropertyInfo propertyInfo = new PropertyInfo();
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "eid";

                edata =(EditText)findViewById(R.id.editText1);
                studentNo=edata.getText().toString();

                request.addProperty(propertyInfo,studentNo);

                        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
                        SoapEnvelope.VER11);
                        envelope.dotNet = true;

                        envelope.setOutputSoapObject(request);

                        HttpTransportSE httpTransport = new HttpTransportSE(SOAP_ADDRESS);
                        try  {                    
                        httpTransport.call(SOAP_ACTION, envelope);                    
                        Object response = envelope.getResponse();                    
                        tvData1.setText(response.toString());                    
                        }  catch (Exception exception)   {
                                      tvData1.setText(exception.toString()+" Or enter number is not Available!");                    
                        }

                tvData1 = (TextView)findViewById(R.id.textView1);

        }
    });

}}
</code></pre>

<p>First, I am getting the following warning:</p>

<blockquote>
  <p>The method addProperty(PropertyInfo, Object) from the type SoapObject is deprecated</p>
</blockquote>

<p>Then, I am getting a java.net.SocketTimoutException on the mobile phone, and a org.xmlpull.v1.XmlPullParserException on the emulator.</p>

<p>Could someone help me with this? Thanks in advance.</p>
