Ksoap sending arguments and receiving results

2019-08-10 03:48发布

问题:

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?

回答1:

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