views:

23

answers:

0

public class Adder extends Activity { private static final String SOAP_ACTION = "http://www.safecab.com/SignIn"; private static final String METHOD_NAME = "SignIn"; private static final String NAMESPACE = "http://www.safecab.com/"; private static final String URL = "http://www.safecab.com/ClientInterface.asmx"; private TextView tv; /** Called when the activity is first created. */ private static final String ENCODING_UTF_8 = null; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); tv = (TextView)findViewById(R.id.TextView01);

    String abc = "1234";
    SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
    SoapObject inAddIntegers = new SoapObject(NAMESPACE, "InAddIntegers");
    request.addProperty("MobilePhone",abc.trim());
    //inAddIntegers.addProperty("b", "asd");
    //request.addProperty("InAddIntegers", inAddIntegers);
    SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    envelope.setOutputSoapObject(request);
    AndroidHttpTransport androidHttpTransport = new AndroidHttpTransport (URL);
    envelope.dotNet = true;
    try {
        androidHttpTransport.call(SOAP_ACTION, envelope);           
        Object result = envelope.getResponse();
        String results = (String) result;
    } catch(Exception E) {
        String str = E.toString();
    }          
}        

}

related questions