Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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-

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

Type of Web service – JAX-RPC

Please reply, if someone has solution for it.

like image 456
user1800208 Avatar asked Nov 05 '12 13:11

user1800208


2 Answers

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.

You should set sensible values for both. See this answer for an example.

like image 131
fglez Avatar answered Oct 14 '22 11:10

fglez


I think this is what you need: weblogic.wsee.transport.read.timeout

Got that from here: http://docs.oracle.com/cd/E14571_01/web.1111/e13760/client.htm

like image 31
daljian Avatar answered Oct 14 '22 11:10

daljian