Home:ALL Converter>Display Soap Webservices Response in Android?

Display Soap Webservices Response in Android?

Ask Time:2012-05-25T17:50:03         Author:user1414667

Json Formatter

Hi Want display soap web services in Android by using ksoap2. I am using the following code . When I am testing in the Soap Ui Pro it shows ouput xml fine.

httpTransport.call(SOAP_ACTION, envelope);
Object result = (Object) envelope.getResponse();
System.out.println("The Result"+result);

but I am getting the Exception in my Eclipse Logcat, how can I overcome this in Android

Exception :

05-25 15:13:15.105: WARN/System.err(1160): org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://www.w3.org/2001/12/soap-envelope}Envelope (position:START_TAG <{http://schemas.xmlsoap.org/wsdl/}wsdl:definitions targetNamespace='urn:sap-com:document:sap:soap:functions:mc-style'>@1:686 in java.io.InputStreamReader@40546438) 
05-25 15:13:15.115: WARN/System.err(1160):     at org.kxml2.io.KXmlParser.exception(KXmlParser.java:273)

Please help me.

Author:user1414667,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/10752194/display-soap-webservices-response-in-android
Paresh Mayani :

You are actually getting InputStream in response, you just has to convert it into the String and then you would be able to display it.",
2012-05-25T10:00:21
yy