android - error that occurs while the data from the webservice Ksoap -


error occurs when requesting data internet in ksoap object

    public string[] getprofile(string email) {      string[] profilearray = new string[3];     method_name = "getprofile";     soapobject getprofilesoapobject = new soapobject(namespace,method_name);             //to avoid code duplication getproperty. set info      getprofilesoapobject.addproperty(setproperty("email", email));      soapserializationenvelope envelope = new soapserializationenvelope(soapenvelope.ver11);     envelope.setoutputsoapobject(getprofilesoapobject);      httptransportse http = new httptransportse(url);     try { //call httptransport         http.call(soap_action, envelope);          soapobject  soapobject2 = (soapobject) envelope.bodyin;          //set  profile detail         profilearray[0] =  soapobject2.getproperty(0).tostring();         profilearray[1] =  soapobject2.getproperty(1).tostring();         profilearray[2] =  soapobject2.getproperty(2).tostring();         return profilearray;     } catch (exception e) {         //system.out.println(e.getmessage());      }     return profilearray; } 

nullpointerexception error occurs after http.call


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -