function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
KellymtKellymt 

Outbound callout fails on Govt Cloud - sandbox cs32

Hi,
I am trying to call a webservice on the Govt Cloud (sandbox instance cs32) and the callout fails intermitantly with the following two error messages: 
"Server choose TLSv1, but that protocol version is not enabled or not supported by the client"
"Read timeout" after it request hung for 2 minutes.
The call also sometimes succeeds. 
I have contacted salesforce.com suggesting that this is a bug or something may be wrong with that particular instance but they have closed the case. 
Exactly the same code works consistently in all several other instances of Salesforce.com like eu1, NA13 etc. 

I am making the call from the Developer Console from the Execute Anonimous window and it is: 
String url = 'ENDPOINT';
String requestXml = 'XML_MESSAGE_FOR_THE_CALL';

HttpRequest req = new HttpRequest();
req.setTimeout(120000);
req.setEndpoint(url);
req.setHeader('Content-Type','text/xml');
req.setHeader('SOAPAction', 'SOAP_ACTION');
req.setMethod('POST');
req.setBody(requestXml);

Http h = new Http();
HttpResponse res = h.send(req);

dom.Document doc = res.getBodyDocument();
System.debug(doc.toXmlString());

Where ENDPOINT, XML_MESSAGE_FOR_THE_CALL and SOAP_ACTION are substituted with the corresponding correct values. 
Initailly the endopint only supported TLSv1 but later we added support for  TLSv1.1 and TLSv1.2  and we are still having problems. 
I have also tried calling out to other https endpoint like https://maps.google.com which did not work. 
I tried calling out to the salesforce.com soap API to another account which worked correclty every time thus it must not be a generic problem with all ssl callouts. 

Does anybody have any ideas on what could be wrong?

Thanks,
Kzmp