# jaxws 設定timeout時間 在呼叫API時等待回應時,收到了這個錯誤 ``` java.net.SocketTimeoutException: Read timed out ``` 經查log, 因為查詢量太大,總查詢時間約為 71.25秒, 總時間太長, 所以查完要回傳時連線time out jaxws的預設值, 是60秒沒有收到訊息就會receive  [參考官方網站](https://cxf.apache.org/docs/client-http-transport-including-ssl-support.html#ClientHTTPTransport(includingSSLsupport)-Theclientelement) 經主管確認後,決定要增加到120秒 於是在applicationContext.xml裡面加上這個設定 ``` <http-conf:conduit name="你的webservice的url" <http-conf:client ReceiveTimeout="120000"/> </http-conf:conduit> ``` [參考網站](https://www.itread01.com/content/1547194539.html) 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up