4

I have simple code to send a get request to our webservice that returns a small json response:

    System.HttpRequest request = new System.HttpRequest();
    request.setMethod('GET');
    request.setTimeout(120000);
    request.setEndpoint(url);
    System.HttpResponse response = new System.Http().send(request);
    System.debug(response.getBody());

Getting the CalloutException: Read timed out error each time. The Salesforce IPs have been whitelisted on our firewall, our site hosting the service has been added to list of 'Remote Site Settings' and I have maxed the timeout for the request - still getting the error.

I don't see the request that generates from Salesforce in our log files so I am thinking there is still a network issue at play. Is there another step we are missing to authorize access?

EDIT: Issue has been resolved, we only had https open for requests so opened http and all is well.

3
  • What happens if you make the same callout from an external tool? How long does the web service take to respond? For SOAP based services SoapUI is useful. For REST, you could try the Postman Chrome extension. Commented Jul 2, 2014 at 21:13
  • Are you able to share the url and request, or is it not a public API? Commented Jul 2, 2014 at 21:35
  • The request takes 443ms using Postman. We have only opened the link to the SF IPs, so even I can't access it when not connected to our VPN.
    – evelyn
    Commented Jul 3, 2014 at 10:47

0

You must log in to answer this question.

Browse other questions tagged .