Search code examples
androidweb-servicesksoap2

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?


Solution

  • 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.