I'm developing Jax-ws client on Jboss 5.1.0 GA. I want to set web service client timeout.
I've tried StubExt.PROPERTY_CLIENT_TIMEOUT.
int timeoutMillisecond=3000;
bp.getRequestContext().put(StubExt.PROPERTY_CLIENT_TIMEOUT, timeoutMillisecond);
It works but exception is thrown only after 3*timeoutMillisecond (after 9000 millisecond), but 3000ms is written in log file.
2012-12-24 15:42:40,053 DEBUG Sending request
2012-12-24 15:42:49,057 ERROR WebServiceException returned:
javax.xml.ws.WebServiceException: org.jboss.ws.core.WSTimeoutException: Timeout after: 3000ms
I've rtied also many other ways
bp.getRequestContext().put("com.sun.xml.ws.connect.timeout", 100);
bp.getRequestContext().put("com.sun.xml.ws.request.timeout", 100);
// from com.sun.xml.ws.developer.JAXWSProperties
bp.getRequestContext().put(JAXWSProperties.CONNECT_TIMEOUT, 100);
bp.getRequestContext().put(JAXWSProperties.REQUEST_TIMEOUT, 100);
But nothing worked on Jboss 5.1
Could you tell me how to set client timeout correctly ?