2

I am getting response like that,

AuthenticateResponse
{
  AuthenticateResult=anyType{Photo=anyType{}; 
  Result=false; 
}; 

How can I parse it.I want only Result string like true or false.

Please help me..

Thank you

Akshay
  • 2,506
  • 4
  • 34
  • 55
Pearl
  • 333
  • 1
  • 3
  • 12
  • ducli's http://stackoverflow.com/questions/4162598/how-to-parse-a-complex-soap-response-in-android http://stackoverflow.com/questions/9409982/how-to-parse-soap-response-in-android http://stackoverflow.com/questions/8767389/how-to-send-soap-request-and-parse-soap-response-in-xml-format-in-android – J.K Aug 20 '12 at 07:48
  • yes..i will do it..can u plz tell me the answer..how can I parse.. – Pearl Aug 20 '12 at 07:55
  • 1
    http://www.android10.org/index.php/articleslibraries/167-using-ksoap2-for-android-soap-web-service – MKJParekh Aug 20 '12 at 11:53

1 Answers1

0

This is a JSON response, try to use the JSON api to parse its content and retrieve the value.

Alécio Carvalho
  • 13,481
  • 5
  • 68
  • 74
  • org.json.JSONException: Value AuthenticateResponse of type java.lang.String cannot be converted to JSONObject D/dalvikvm(513): GC_EXTERNAL_ALLOC freed 757 objects / 56160 bytes in 44ms – Pearl Aug 20 '12 at 08:04
  • that's true, at first glance it looked like a JSON...not sure anymore. I don't recognize this type of response. – Alécio Carvalho Aug 20 '12 at 08:50
  • SoapObject result = (SoapObject)envelope.bodyIn; Log.e("", "u urlenvelop-enevlop-result---"+result.toString() ); final String ResultObject = result.getProperty(0) .toString(); Log.v("", "we service result1111111 = "+ ResultObject.toString()); SoapObject sopObj; sopObj = result; String AnalystID = ResultObject.substring( ResultObject.lastIndexOf("Result")); Log.e("RBloginResponseAnalystID value", "schema" + AnalystID.toString()); – Pearl Aug 20 '12 at 11:26
  • see I am doing this but still not getting how to get the result string – Pearl Aug 20 '12 at 11:27