The same code works fine when retrieved using non-secure token(secure=0). This exception is thrown in our servers that reside in China. Is it this what is causing the problem? As the same code is working fine in our servers that are present in India. To check if I could establish connection to Google Docs from these chinese servers, I tried to wget "https://docs.google.com" and it shows "Unable to establish SSL connection"java.net.SocketException: Connection resetat java.net.SocketInputStream.read(SocketInputStream.java:168)at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331)at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:789)at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1112)at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1139)at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1123)at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:434)at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166)at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:133)at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:488)at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:515)at com.google.gdata.client.Service.getFeed(Service.java:1053)at com.google.gdata.client.Service.getFeed(Service.java:995)at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:662)at com.google.gdata.client.Service.getFeed(Service.java:952)at com.company.xx.client.docs.GetGoogleDocs.execute(GetGoogleDocs.java:277)
--2011-07-05 17:39:44-- https://docs.google.com/Resolving docs.google.com... 74.125.71.139, 74.125.71.100, 74.125.71.101, ...Connecting to docs.google.com|74.125.71.139|:443... connected.Unable to establish SSL connection.
I'm not entirely sure, but could this be an SSL certificate issue? If
neither wget nor the API library are working, perhaps your server has
not have registered the correct Certificate Authorities to verify the
SSL certificate used by the Docs server. This is just a guess, so
sorry if it is totally wrong, but you should be able to wget
https://docs.google.com without error (and I guess you can fetch it
from your other servers?).
Regards
--
Ali Afshar | @aliafshar | Google Developer Relations