简体   繁体   English

使用oracle weblogic server 10.3(java)为webservices设置超时

[英]Set Time out for webservices with oracle weblogic server 10.3 (java)

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. 如果有人有解决方案,请回复。

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. 以秒为单位指定尝试调用Web服务的客户端应用程序等待连接的时间长度。 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. 以秒为单位指定客户端应用程序等待其正在调用的Web服务的响应的时间。 After the specified time elapses, if a response hasn't arrived, the client times out. 在指定的时间过去之后,如果没有到达响应,则客户端超时。

You should set sensible values for both. 你应该为两者设定合理的价值。 See this answer for an example. 请参阅此答案以获取示例。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM