android - Ksoap Library and Request Time out? -
i using ksoap library call webservice in android. dont see request timeout property here in case of internet not available in middle of call important have it.
some 1 suggested me use socket class has sotimeout dont know how implement here 1 suggest me should do?
public void callwebservice() { try { soapobject request = new soapobject(namespace, method_name); request.addproperty("passonstring", "anything"); soapserializationenvelope envelope = new soapserializationenvelope(soapenvelope.ver11); envelope.dotnet=true; envelope.setoutputsoapobject(request); httptransportse androidhttptransport = new httptransportse(url); androidhttptransport.call(soap_action, envelope); .. ... }catch(exception ex) {} }
you have modify httptransportse class take timeout parameter passes through socket. pretty simple implement, looking @ httpstransportse class this.
then catch sockettimeoutexception , whatever necessary. feel free create issue on project , or contribute enhancement.
Comments
Post a Comment