0

I am consuming soap web service to get data response from server is proper json (checked on server side ) but when i get this response in android some junk values are added in it

here is the junked response

{"error":"0","message":"Record found.","user_info":"[{\"UserId\":\"465\",\"Name\":\"ENG ABDALLA M SHEIKH\",\"Email\":\"amsheik@gmail.com\",\"Tel\":\"+971507344068\",\"Balance\":\"100\"}]"}

in the above response you can see slashes() and extra quotes(") are added

here is my soap code

SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
     request.addProperty("username", "user01");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
            SoapEnvelope.VER11);

     envelope.dotNet = true;

    envelope.setOutputSoapObject(request);

    HttpTransportSE androidHttpTransport = new HttpTransportSE(URL,30000);

    androidHttpTransport.debug = true;
    SoapPrimitive response = null;
    try {
        //Invole web service
        androidHttpTransport.call(SOAP_ACTION+method_name, envelope);
        //Get the responseS
         response = (SoapPrimitive) envelope.getResponse();


  Log.e("relust", ""+response);
    } catch (Exception e) {
        e.printStackTrace();
    }

Note response is in proper json tested from php

hussi
  • 77
  • 2
  • 9

1 Answers1

0

That's not junk, but standard syntax for Unicode encoding. You can convert to UTF-8 to make those characters go away.

JASON G PETERSON
  • 2,193
  • 1
  • 18
  • 19