Once you encounter the error as title , you are considering how to set the time out for the webservice client .The senario is JAX-WS type in webservice .
The java.net.HTTPURLConnection is used to implement the ws client in jax-ws . To set up the config , you need to get the binding provider reference . Please refer to the below codes .
The important thing to resolve this issue is to find out the binding provider in your programme.
JAXWSProperties.CONNECT_TIMEOUT is config for the connection time (time cost in the connection to the server).
BindingProviderProperties.REQUEST_TIMEOUT is config for the value of read timed out .