0

Here is the exception I am getting

org.xmlpull.v1.XmlPullParserException: Unexpected token (position:TEXT [{"Id":"57","Tit...@1:275 in java.io.InputStreamReader@b629f48)

with the following code

public String SuggestCity  (String CityName)  {
    SoapObject soapObject=new       SoapObject(Wsdl_Target_NameSpace,Operation_Name);
    PropertyInfo propertyInfo=new PropertyInfo();
    propertyInfo.setName("tryValue");
    propertyInfo.setValue(CityName);
    propertyInfo.setType(String.class);
    soapObject.addProperty(propertyInfo);
    SoapSerializationEnvelope serializationEnvelope=new SoapSerializationEnvelope(SoapEnvelope.VER11);
    serializationEnvelope.setOutputSoapObject(soapObject);
    serializationEnvelope.dotNet=true;
    String response=null;
    HttpTransportSE androidHttpTransport = new HttpTransportSE(Soap_Adrress);
   //androidHttpTransport.setXmlVersionTag("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
    androidHttpTransport.debug=true;


    try{
        androidHttpTransport.call(Soap_Action, serializationEnvelope);
        SoapPrimitive result = (SoapPrimitive) serializationEnvelope.getResponse();
        response=result.toString();
        Log.d("asdf",result.toString());
        //response=androidHttpTransport.responseDump;
    }
   catch (Exception e){
        Log.d("Haha",e.toString());
    }
    return response;

}

any ideas?

Matt Clark
  • 27,671
  • 19
  • 68
  • 123

0 Answers0