ksoap2
Generating Java from WSDL for use on Android with ksoap2-android SOAP client?
I found this tool to auto generate wsdl to android code, http://www.wsdl2code.com/example.aspx Here is the code: public void callWebService() { SampleService srv1 = new SampleService(); Request req = new Request(); req.companyId = “1”; req.userName = “userName”; req.password = “pas”; Response response = srv1.ServiceSample(req); }
How to call a .NET Webservice from Android using KSOAP2?
It’s very simple. You are getting the result into an Object which is a primitive one. Your code: Object result = (Object)envelope.getResponse(); Correct code: SoapObject result=(SoapObject)envelope.getResponse(); //To get the data. String resultData=result.getProperty(0).toString(); // 0 is the first object of data. I think this should definitely work.