0
是否有一個原因,當我爲客戶端的服務調用設置超時時間,它不覆蓋默認值?Java Web服務客戶端超時值不變
我已經嘗試過所有這些,但沒有運氣。
DictionaryTransferService service = new DictionaryTransferService();
DictionaryTransfer port = service.getDictionaryTransferPort();
((BindingProvider) port).getRequestContext().put(StubExt.PROPERTY_CLIENT_TIMEOUT, 10 * 60 * 1000);
((BindingProvider) port).getRequestContext().put("com.sun.xml.internal.ws.connect.timeout", 5 * 60 * 1000);
((BindingProvider) port).getRequestContext().put("com.sun.xml.internal.ws.request.timeout", 10 * 60 * 1000);
((BindingProvider) port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointURL.toString());