WLS-On SocketTimeoutException connection.getResponseCode() Making Errant Second Call to Service (Doc ID 1464857.1)

Last updated on MAY 24, 2017

Applies to:

Oracle Weblogic Server - Version 10.3 to 10.3.2
Information in this document applies to any platform.

Symptoms

 A webservice call that uses weblogic.net.http.HttpURLConnection has a 2nd call automatically tried when connection.getResponseCode() used in the code when there is a SocketTimeoutException.  This occurs in the customer's code in a finally statement.
   
Issue discovered for a customer who has an application deployed in Weblogic container, in which, there is a client that sends Http POST requests to a REST type Web Service hosted by a third party. The client uses weblogic.net.http.HttpsURLConnection to make a http POST (same result with weblogic.net.http.HttpURLConnection).  When a socket timeout is encountered, the http request is retried automatically after the specified ReadTimedOut param.

From testing it was discovered that this occurs because of connection.getResponseCode() in the finally statement.   


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms