package com;

import java.util.ArrayList;

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.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class activity extends Activity {
    /** Called when the activity is first created. */

    private static final String SOAP_ACTION = "
http://quiver.in/mis/WriteAndroideData";;

    private static final String OPERATION_NAME = "WriteAndroideData";

    private static final String WSDL_TARGET_NAMESPACE = "
http://quiver.in/mis/";;

    private static final String URL = "http://quiver.in/mis/GPSManager.asmx
";


    public void GetAdd() {

        SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE,
OPERATION_NAME);


        PropertyInfo pi = new PropertyInfo();
        pi.setName("device_id");
        pi.setValue("1");
        pi.setType(String.class);
        request.addProperty(pi);

        PropertyInfo pi0 = new PropertyInfo();
        pi0.setName("id");
        pi0.setValue(101);
        pi0.setType(long.class);
        request.addProperty(pi0);

        PropertyInfo pi1 = new PropertyInfo();
         pi1.setName("lat");
         pi1.setValue(2);
         pi1.setType(long.class);
         request.addProperty(pi1);

          PropertyInfo pi2=new PropertyInfo();
          pi2.setName("lon");
          pi2.setValue(3);
          pi2.setType(double.class);
          request.addProperty(pi2);


          PropertyInfo pi3=new PropertyInfo();
          pi3.setName("name");
          pi3.setValue("gajedra");
          pi3.setType(String.class);
          request.addProperty(pi3);

          PropertyInfo pi4=new PropertyInfo();
          pi4.setName("village");
          pi4.setValue("village");
          pi4.setType(String.class);
          request.addProperty(pi4);

          PropertyInfo pi5=new PropertyInfo();
          pi5.setName("mobile_no");
          pi5.setValue("8982820806");
          pi5.setType(String.class);
          request.addProperty(pi5);

          PropertyInfo pi6=new PropertyInfo();
          pi6.setName("district");
          pi6.setValue("Nodia");
          pi6.setType(String.class);
          request.addProperty(pi6);

          PropertyInfo pi7=new PropertyInfo();
          pi7.setName("gram_name");
          pi7.setValue("gram");
          pi7.setType(String.class);
          request.addProperty(pi7);

          PropertyInfo pi8=new PropertyInfo();
          pi8.setName("block");
          pi8.setValue("D");
          pi8.setType(String.class);
          request.addProperty(pi8);


          PropertyInfo pi9=new PropertyInfo();
          pi9.setName("date");
          pi9.setValue("21");
          pi9.setType(String.class);
          request.addProperty(pi9);

          PropertyInfo pi10=new PropertyInfo();
          pi10.setName("time");
          pi10.setValue("21");
          pi10.setType(String.class);
          request.addProperty(pi10);

          PropertyInfo pi11=new PropertyInfo();
          pi11.setName("product");
          pi11.setValue("tot");
          pi11.setType(String.class);
          request.addProperty(pi11);

        SoapSerializationEnvelope envelope =
        new SoapSerializationEnvelope(SoapEnvelope.VER11);
        envelope.dotNet = true;
        envelope.setOutputSoapObject(request);
        HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);

        try
        {
        androidHttpTransport.call(SOAP_ACTION, envelope);
        java.lang.Integer receivedInt = (Integer)envelope.getResponse();

        }
        catch(Exception e)
        {

        }


    ArrayList<String> device_id = new ArrayList<String>();
    try
    {
    androidHttpTransport.call(SOAP_ACTION, envelope);
    java.util.Vector<Object> receivedStrings =
(java.util.Vector<Object>)envelope.getResponse();
    if(receivedStrings != null)
    {
    for(Object curStrings : receivedStrings)
    {
    device_id.add(curStrings.toString());
    }
    }
    }
    catch(Exception e)
    {

}
    }
}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to