Share code snippets.

SetRequestTimeoutWebservices

Created 2 years ago by anonymous
set request time out to 10 min to avoid a timeout for a webservice request
// set request time out to 10 min to avoid a timeout for this request
			java.util.Map<String, Object> requestContext = ((javax.xml.ws.BindingProvider) omsQuery)
					.getRequestContext();
			requestContext.put("sun.net.client.defaultReadTimeout",
					new Integer(600000));
			requestContext.put("sun.net.client.defaultConnectTimeout",
					new Integer(600000));
			requestContext.put("com.sun.xml.internal.ws.connect.timeout",
					new Integer(600000));
			requestContext.put("com.sun.xml.internal.ws.request.timeout",
					new Integer(600000));
			requestContext.put("com.sun.xml.ws.request.timeout", new Integer(
					600000));