使用 oracle weblogic server 10.3 (java) 为 web 服务设置超时
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13232744/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Set Time out for webservices with oracle weblogic server 10.3 (java)
提问by user1800208
I am trying to set time out error whenever web service response will be delayed with below lines of code-
每当使用以下代码行延迟 Web 服务响应时,我都会尝试设置超时错误 -
serviceStub._setProperty("weblogic.wsee.transport.connection.timeout", String.valueOf(timeoutSeconds));
BindingInfo bindingInfo = (BindingInfo)serviceStub._getProperty("weblogic.wsee.binding.BindingInfo");
bindingInfo.setTimeout(timasseoutSeconds);
But it's not working.
但它不起作用。
Server Used – Oracle Weblogic server 10.3
使用的服务器 – Oracle Weblogic 服务器 10.3
Type of Web service – JAX-RPC
Web 服务类型 - JAX-RPC
Please reply, if someone has solution for it.
请回复,如果有人有解决方案。
回答by fglez
There are two kinds of timeout (See What is the difference between connection and read timeout for sockets?)
有两种超时(请参阅套接字的连接超时和读取超时有什么区别?)
weblogic.wsee.transport.connection.timeout
Specifies, in seconds, how long a client application that is attempting to invoke a Web service waits to make a connection. After the specified time elapses, if a connection hasn't been made, the attempt times out.
weblogic.wsee.transport.read.timeout
Specifies, in seconds, how long a client application waits for a response from a Web service it is invoking. After the specified time elapses, if a response hasn't arrived, the client times out.
weblogic.wsee.transport.connection.timeout
指定尝试调用 Web 服务的客户端应用程序等待建立连接的时间(以秒为单位)。在指定的时间过后,如果尚未建立连接,则尝试超时。
weblogic.wsee.transport.read.timeout
指定客户端应用程序等待来自它正在调用的 Web 服务的响应的时间(以秒为单位)。指定的时间过后,如果没有响应,客户端超时。
You should set sensible values for both. See this answerfor an example.
您应该为两者设置合理的值。有关示例,请参阅此答案。
回答by daljian
I think this is what you need: weblogic.wsee.transport.read.timeout
我认为这就是你需要的:weblogic.wsee.transport.read.timeout
Got that from here: http://docs.oracle.com/cd/E14571_01/web.1111/e13760/client.htm
从这里得到:http: //docs.oracle.com/cd/E14571_01/web.1111/e13760/client.htm