In researching this in the past, I found that there's a "problem" with just setting the SoTimeout when the connection uses HTTP/1.1, because of something called "Expect: 100-Continue" - apparently this has something to do with keep-alive, and it totally hoses timeouts. So, when you're setting up your HttpClientParams, you need to either disable 100-Continue, or switch to HTTP/1.0. Either of these should make your timeout work as expected.
HttpClientParams.USE_EXPECT_CONTINUE (false) setVersion(HttpVersion.HTTP_1_0) either of these should do the trick. Cheers, Brice On 1/25/07, kclarke <[EMAIL PROTECTED]> wrote:
i've been trying to get client-side timeouts working using the xfire client, but my settings aren't making it through to the http connection. I'm trying: int timeoutMs = client.getTimeout(); // defaults to 10000 apparently client.setProperty(CommonsHttpMessageSender.HTTP_TIMEOUT, Integer.toString ((timeoutMs/1000))); HttpClientParams httpClientParams = new HttpClientParams(); httpClientParams.setConnectionManagerTimeout(timeoutMs); httpClientParams.setSoTimeout(timeoutMs); client.setProperty(CommonsHttpMessageSender.HTTP_CLIENT_PARAMS, httpClientParams); and then invoking the service method call, but from the log, what actually gets asked for (and what actually happens) is still an indefinite http timeout: org.apache.commons.httpclient.MultiThreadedHttpConnectionManager:getConnectionW ithTimeout:390 - HttpConnectionManager.getConnection: config = HostConfiguration[host=http://10.6.17.3:7003], timeout = 0 I've searched and haven't found any other suggestions. --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
-- Brice Ruth Software Engineer, Madison WI
