gpt4 book ai didi

java - 使用 oracle weblogic server 10.3 (java) 为 web 服务设置超时

转载 作者:塔克拉玛干 更新时间:2023-11-03 05:26:18 28 4
gpt4 key购买 nike

每当使用以下代码行延迟 Web 服务响应时,我正在尝试设置超时错误-

serviceStub._setProperty("weblogic.wsee.transport.connection.timeout", String.valueOf(timeoutSeconds));
BindingInfo bindingInfo = (BindingInfo)serviceStub._getProperty("weblogic.wsee.binding.BindingInfo");
bindingInfo.setTimeout(timasseoutSeconds);

但它不起作用。

使用的服务器 – Oracle Weblogic 服务器 10.3

Web 服务类型 – JAX-RPC

请回复,如果有人有解决办法。

最佳答案

有两种超时(见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.

您应该为两者设置合理的值。参见 this answer举个例子。

关于java - 使用 oracle weblogic server 10.3 (java) 为 web 服务设置超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13232744/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com