i trying set connect , request timeout jax ws , http post calls. code works, maximum of 20 seconds. can change timeout value 5 seconds, 2 seconds, works, setting timeout value 30 seconds time out @ 20 seconds, setting time out value 60 seconds still timeout @ 20 seconds. know maximum of 20 seconds set??
for jaxws:
//this works, timed out in 10 seconds ((bindingprovider) soapport).getrequestcontext().put(jaxwsproperties.connect_timeout, 10000); // time out in 20 seconds!!! ((bindingprovider) soapport).getrequestcontext().put(jaxwsproperties.connect_timeout, 60000);`
for http:
// works, timed out in 10 seconds httpconnectionparams.setconnectiontimeout(params, 10000); // time out in 20 seconds!!! httpconnectionparams.setconnectiontimeout(params, 50000);
the default jax-ws runtime glassfish metro 2.0. see 5.6. http timeouts section in metro guide, have:
// setconnecttimeout() int timeout = ...; map<string, object> ctxt = ((bindingprovider)proxy).getrequestcontext(); ctxt.put(jaxwsproperties.connect_timeout, timeout); // setreadtimeout() int timeout = ...; map<string, object> ctxt = ((bindingprovider)proxy).getrequestcontext(); ctxt.put("com.sun.xml.ws.request.timeout", timeout);
only guide, can see there 3 parameters websphere (in metro 2.0 two), are:
connection_timeout
: amount of time websphere jax-ws client wait establish http/https connection (default 180 seconds)write_timeout
: amount of time client wait finish sending request (default 300 seconds)response_timeout
: amount of time client wait finish receiving response (default 300 seconds)
Comments
Post a Comment