Search code examples
androidweb-servicesksoap2

Ksoap sending arguments and receiving results


I'm using KSoap within my Android application. My application using Web Service for communicate with the server. I have found a code sample of a KSoap wev service client. In the sample, the client uses the following code for communication with the server -

Request = new SoapObject(NAMESPACE, METHOD_NAME);

How do I pass arguments to the server?
How do I invoke the return value form the server?


Solution

  • You should use SoapObject.addProperty() to add argument and SoapSerializationEnvelope.getResponse() to get data returned by server.

    Here is example: http://android-devblog.blogspot.com/2010/06/soap-on-android.html