title: How to test JAX-WS connection timeout
body: <p>I`m trying to test connection timeout property for jaxws client which is deployed on IBM Websphere Application Server 8.5. I set timeout properties the following way:</p>
  
  <pre><code>((BindingProvider) port).getRequestContext().
             put(com.ibm.wsspi.webservices.Constants.RESPONSE_TIMEOUT_PROPERTY, "30");
  ((BindingProvider) port).getRequestContext().
             put(com.ibm.wsspi.webservices.Constants.CONNECTION_TIMEOUT_PROPERTY, "15";
  </code></pre>
  
  <p>RESPONSE_TIMEOUT_PROPERTY works fine. </p>
  
  <p>But I have no idea how to test CONNECTION_TIMEOUT_PROPERTY. If webservice is not available during creating an instance of Service I get the following exception:</p>
  
  <pre><code>javax.xml.ws.WebServiceException: The following WSDL exception occurred: 
              WSDLException: faultCode=WSDL4JWrapper : : javax.wsdl.WSDLException: 
              WSDLException: faultCode=WSDL4JWrapper : :
              java.net.ConnectException: Connection refused: connect
  </code></pre>
  
  <p>If webservice is not available during creating port(invoking getPort(...) method) I get the following exception:</p>
  
  <pre><code>javax.xml.ws.WebServiceException: 
              java.net.ConnectException: HTTP ( 404 ) Not Found address :
              http://myhost:myport/WsServer/helloService
  </code></pre>
  
  <p>Exceptions are thrown immediately. I suppose I do something wrong. Any pointers would be helpful.</p>