title: JAXWS and Http Post Timeout in GlassFish v3.0.1
body: <p>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??</p>
  
  <p>For JAXWS:</p>
  
  <pre><code>//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);`
  </code></pre>
  
  <p>For Http:</p>
  
  <pre><code>// This works, timed out in 10 seconds
  HttpConnectionParams.setConnectionTimeout(params, 10000);
  
  // This would time out in 20 seconds!!!
  HttpConnectionParams.setConnectionTimeout(params, 50000);
  </code></pre>