2
我使用ksoap2 API从Android调用.net webservices。 我收到的格式如下回应:如何使用KSoap2 Android API以xml格式获得webservices响应?
{a=1;b=2;c=3}
我想在XML格式的响应:
<a>1</a>
<b>2</b>
<c>3</c>
我怎么会明白了吗?
我使用ksoap2 API从Android调用.net webservices。 我收到的格式如下回应:如何使用KSoap2 Android API以xml格式获得webservices响应?
{a=1;b=2;c=3}
我想在XML格式的响应:
<a>1</a>
<b>2</b>
<c>3</c>
我怎么会明白了吗?
在你的web服务消费方法,你可以以后
HttpTransportSE.call(SOAP_ACTION, envelope);
代码行中使用
HttpTransportSE.responseDump
。它以XML格式提供响应。
httpTransport.debug=true;
httpTransport.call(SOAP_ACTION, envelope);
String ss=httpTransport.responseDump;
and print ss
。你一定会得到一个XML格式
没有老板它没有wrking ....我写的代码为 // Object response = envelope.getResponse(); SoapObject result =(SoapObject)envelope.getResponse(); String ss = httpTransport.responseDump; – 2012-01-20 18:19:59