I\'m having a problem trying to send an array of ints to a .NET web service which expects an array in one of the arguments. That\'s at least what I understand from the API d
Here is nice example that might help you:
http://code.google.com/p/ksoap2-android/wiki/CodingTipsAndTricks
Here is my quick fix to this issue:
SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(
SoapEnvelope.VER11);
SoapObject Request = new SoapObject(NAMESPACE, METHOD_NAME);
soapEnvelope.setOutputSoapObject(Request);
soapEnvelope.dotNet = true;
List companies = new ArrayList();
companies.add(65);
companies.add(66);
companies.add(67);
Request.addProperty("name", "test1");
SoapObject soapCompanies = new SoapObject(NAMESPACE, "companies");
for (Integer i : companies){
soapCompanies.addProperty("int", i);
}
Request.addSoapObject(soapCompanies);
Output XML:
65
66
67
test1