Ksoap发送参数并接收结果 [英] Ksoap sending arguments and receiving results
问题描述
我在我的Android应用程序中使用KSoap. 我的应用程序使用Web Service与服务器进行通信. 我已经找到了KSoap Wev服务客户端的代码示例. 在该示例中,客户端使用以下代码与服务器进行通信-
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?
推荐答案
您应该使用SoapObject.addProperty()添加参数,并使用SoapSerializationEnvelope.getResponse()获取服务器返回的数据.
例如: http://android-devblog. blogspot.com/2010/06/soap-on-android.html
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
这篇关于Ksoap发送参数并接收结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!