i have a strange problem with AndroidHttpClient. Sometimes i got the error connection refused on the same internal webservice. In the access log on my server I have no log entry for the request, so it seems that the server is not called. Connection with wifi is ok.
I tried to connect to different servers, the problem occurs on other servers too. Has anyone an explanation for this?
Code:
HttpParams httpParams = new BasicHttpParams();
HttpConnectionParams.setConnectionTimeout(httpParams, 120000);
HttpConnectionParams.setSoTimeout(httpParams, 120000);
AndroidHttpClient httpclient = AndroidHttpClient.newInstance("Android");
HttpPost httppost = new HttpPost(url);
httppost.setParams(httpParams);
ResponseHandler<String> responseHandler = new BasicResponseHandler();
String responseBody = httpclient.execute(httppost, responseHandler);
Best regards, Peter