title: How can I debug being unable to call a web service via SQL (OLE Automation)?
body: <p>I'm calling a web service from SQL.  That may sound strange, but nevertheless, that's what I'm doing.</p>
  
  <p>My code can call an online (public) web service (HTTP GET), but when I try to call a service in the same AWS environment (Also HTTP GET), the service doesn't get called, and I get a blank response.</p>
  
  <p>Here's the code that works:</p>
  
  <pre><code>DECLARE @Object as int;
  DECLARE @ResponseText as varchar(8000);
  
  DECLARE @URL as varchar(200) = 'https://democraticintelligence.org/home/ping'
  
  EXEC sp_OACreate 'MSXML2.XMLHTTP', @Object OUT;
  EXEC sp_OAMethod @Object, 'open', NULL, 'get',
      @URL, 
      'false'
  EXEC sp_OAMethod @Object, 'send'
  EXEC sp_OAMethod @Object, 'responseText', @ResponseText OUTPUT
  
  SELECT @ResponseText
  </code></pre>
  
  <p>When I replace the @URL with a call to my service in AWS, the service doesn't get called, and I get a blank @ResponseText.</p>
  
  <p>What I've tried:</p>
  
  <ul>
  <li>Calling the web service from the database server by pasting the URL into Chrome, works fine.</li>
  <li>Calling the web service from the my PC by pasting the URL into Chrome, works fine.</li>
  <li>Calling the web service from SQL on my local PC fails.</li>
  <li>Calling the web service from SQL on the database server in AWS fails.</li>
  </ul>
  
  <p>Any suggestions to help debug this would be appreciated.</p>