we have soap request where we have setup time out for 300ms, when we make a request its taking more than 300ms like 1500ms or more but we are not getting time out exception which we have set in response.
This way we are making call
SOAPMessage soapResponse = soapConnection.call(createSOAPRequest(requestWrapper, parammap), endpoint);
and the endpoint forms in init method like this
endpoint = new URL(new URL(URL_CONSTANT), super.getEndpoint(), new URLStreamHandler() {
@Override
protected URLConnection openConnection(URL url) throws IOException {
URL target = new URL(url.toString());
URLConnection connection = target.openConnection();
// Connection settings
connection.setConnectTimeout(getTimeout());
connection.setReadTimeout(getTimeout());
return (connection);
}
});
in above code getTimeout() function works properly and it set 300 but we are not sure why its not working,
pls suggest something.