java - Application has stops at the invocation of the webservice. Please help me to resolve this error -
the application invokes webservice read user data , password stops go through invocation of web service, doing no wrong.
public webservice(context context) { contexto= context; } public arraylist login(string user, string password) { string namespace = "http://tempuri.org/"; string url = "http://192.168.30.8/genera/genera.asmx"; string soap_action = "http://tempuri.org/login"; string method_name = "login"; arraylist unidades =new arraylist(); try { **//create request , envelope** soapobject request = new soapobject(namespace, method_name); soapserializationenvelope envelope = new soapserializationenvelope(soapenvelope.ver11); request.addproperty("username", user.tolowercase()); request.addproperty("password", password.tolowercase()); envelope.dotnet = true; envelope.enc = soapserializationenvelope.enc2003; envelope.setoutputsoapobject(request); envelope.implicittypes = true; httptransportse ht = new httptransportse(url); //involve web service ht.setxmlversiontag("<?xml version=\"1.0\" encoding=\"utf-8\"?>"); ht.debug = true; ht.call(soap_action, envelope); **//in step, application stopped** soapobject response = (soapobject) envelope.getresponse(); response = (soapobject) response.getproperty(1); } catch (exception e) { mensajebox(e.getmessage(),contexto); return unidades; } }
Comments
Post a Comment