天天看點

jax-ws 設定逾時

設定client端請求伺服器逾時

HelloWorldImplService helloService = new HelloWorldImplService();

HelloWorld hello = helloService.getHelloWorldImplPort();

//((BindingProvider)hello).getRequestContext().put("com.sun.xml.internal.ws.connect.timeout", 5000);

((BindingProvider)hello).getRequestContext().put("com.sun.xml.internal.ws.request.timeout", 6000);

http://stackoverflow.com/questions/2060112/how-to-programmatically-set-jax-ws-2-1-jms-client-timeout-in-websphere-7

繼續閱讀