开发者

Webservice response is not XML

开发者 https://www.devze.com 2023-02-19 23:52 出处:网络
I am new to Android. I\'m trying to consume a web service that\'s response is not XML. It\'s a string. Also my friend who\'s developing iPhone application get an XML response.

I am new to Android. I'm trying to consume a web service that's response is not XML. It's a string. Also my friend who's developing iPhone application get an XML response. I'm using ksoap2 lib and .asmx w开发者_开发问答eb service. Can you please say me how to get an XML response from webservice. Thanks.


You can get the response in XML by using HttpTransportSE.responseDump which will give you the response in XML format.


httpTransport.debug=true; 

httpTransport.call(SOAP_ACTION, envelope);

 String ss=httpTransport.responseDump; 

Then you have to print ss.u definitely get a xml format response.

0

精彩评论

暂无评论...
验证码 换一张
取 消