it may sounds stupid but i would like to know whether is it possible send and receive. maybe image/XML file vai kSOAP?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I have been able to transmit WebRowSet XML documents using kSOAP2.
http://roderickbarnes.com/blog/droid-chronicles-web-services-handling-complex-parameters
In this example I am sending an XML document from the web service to my Android based client. I hope this helps bro.
回答2:
It is possible to send image via ksoap by following steps:
- convert the
Image
intobyte[]
- add
byte[]
of the image as property - register SoapSerializationEnvelope with MarshalBase64() like this :
new MarshalBase64().register(envelope);
- call your web service which takes
byte[]
as parameter
Then receiving the message you can convert the receieved byte[]
into image file.