I am trying to set connect and request timeout for a JAX WS and Http Post calls. My code works, but only a maximum of 20 seconds. That is I can change the timeout value to 5 seconds, 2 seconds, it works, but setting the timeout value to 30 seconds will time out at 20 seconds, setting the time out value to 60 seconds will still timeout at 20 seconds. Does anybody know where is that maximum of 20 seconds set??
For JAXWS:
//This works, timed out in 10 seconds
((BindingProvider) soapPort).getRequestContext().put(JAXWSProperties.CONNECT_TIMEOUT, 10000);
// This would time out in 20 seconds!!!
((BindingProvider) soapPort).getRequestContext().put(JAXWSProperties.CONNECT_TIMEOUT, 60000);`
For Http:
// This works, timed out in 10 seconds
HttpConnectionParams.setConnectionTimeout(params, 10000);
// This would time out in 20 seconds!!!
HttpConnectionParams.setConnectionTimeout(params, 50000);