0
我正在使用ksoap庫來調用android中的webservice。 我在這裏沒有看到請求超時屬性的情況下,因特網在呼叫中不可用,所以它很重要。Ksoap庫和請求超時?
有人建議我使用Sotimeout套接字類,但我不知道如何實現它在這裏任何一個建議我該怎麼辦?
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)
{}
}