Login with Android using Ksoap -


i trying make login android application using ksoap.
here code:

@override public void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     setcontentview(r.layout.main);      this.login = (button) this.findviewbyid(r.id.btn_sign_in);     this.login.setonclicklistener(new onclicklistener() {          @override         // action of button         public void onclick(view v) {      username= (edittext)findviewbyid(r.id.txt_username);     password= (edittext)findviewbyid(r.id.txt_password);     string username = username.gettext().tostring();     string password = password.gettext().tostring();      soapobject loginrequest = new soapobject(namespace, method_name);     loginrequest.addproperty("username", username);     loginrequest.addproperty("password", password);      soapserializationenvelope soapenvelope = new soapserializationenvelope(soapenvelope.ver11);     soapenvelope.dotnet=true;     soapenvelope.setoutputsoapobject(loginrequest);     log.i("logindetail", "username " + username + "password " + password);      httptransportse aht = new httptransportse(url);     aht.setxmlversiontag("<?xml version=\"1.0\" encoding=\"utf-8\"?>");      fakex509trustmanager.allowallssl(); // class may allow ssl      try{         aht.call(soap_action, soapenvelope);         soapprimitive resultstring = (soapprimitive)soapenvelope.getresponse();         log.i("output", resultstring.tostring());     }      catch (xmlpullparserexception ex) {          string msg = ex.tostring();          system.out.println(msg);          }        catch (exception e){         e.printstacktrace();     }     

this get:
04-11 16:01:39.705: info/system.out(521): org.xmlpull.v1.xmlpullparserexception: unexpected type (position:text not have ...@1:50 in java.io.inputstreamreader@44ec2250)

what doing wrong?

please refer this

this solve problem. used authenticate user using soap web service.


Comments

Popular posts from this blog

how to build hyperlink for query string in php -

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

queue - mq_receive: message too long -