I am new to android applications,I am using Ksoap2 to access .Net webservice and The call is executed just fine without parameters. But with parameters I am getting Empty. I followed all the steps provided in sites. I tried everything possible but no luck so far. I hope someone can help,
private static final String SOAP_ACTION = "http://www.agilelearning.com/GetProvincelist1"; private static final String METHOD_NAME = "GetProvincelist1 "; private static final String NAMESPACE = "http://www.agilelearning.com" ; private static final String URL = "http://192.168.1.24/Service.asmx";
//Method executed when Province is selected
private OnItemSelectedListener selectListener = new OnItemSelectedListener()
{
public void onItemSelected(AdapterView parent, View v, int position, long id)
{
try
{
ArrayList districts=new ArrayList();
int Provinceid=position+1;//parent.getItemAtPosition(position).toString();
SoapObject request1 = new SoapObject(NAMESPACE, METHOD_NAME1);
request1.addProperty("Provincename","East Province");
SoapSerializationEnvelope envelope1 = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope1.dotNet = true;
envelope1.setOutputSoapObject(request1);
HttpTransportSE at = new HttpTransportSE(URL);
at.debug = true;
at.setXmlVersionTag("");
at.call(SOAP_ACTION1, envelope1);
SoapObject rs = (SoapObject)envelope1.getResponse(); int count=rs.getPropertyCount();
for(int i=0;i aa;
aa = new ArrayAdapter(home1.this, android.R.layout.simple_spinner_item, districts);
aa.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
sd.setAdapter(aa);
}
catch(Exception ex)
{
MessageBox("No Districts found");
}
}