soumitra chatterjee
soumitra chatterjee

Reputation: 2318

How to get response of webservices in xml format using KSoap2 Android API?

I am using ksoap2 API to call .net webservices from Android. I am getting the response in the following format :

{a=1;b=2;c=3}

I want the response in XML format:

<a>1</a> 
<b>2</b> 
<c>3</c>

How I will get that?

Upvotes: 2

Views: 1650

Answers (2)

rams
rams

Reputation: 273

httpTransport.debug=true; 
httpTransport.call(SOAP_ACTION, envelope);
String ss=httpTransport.responseDump; 

and print ss. You will definitely get a XML format

Upvotes: 4

Oguz &#214;zkeroglu
Oguz &#214;zkeroglu

Reputation: 3057

In your webservice consumer method, you can use

HttpTransportSE.responseDump

after

HttpTransportSE.call(SOAP_ACTION, envelope);

code line. It gives you response in XML format.

Upvotes: 4

Related Questions