title: Http request failed: java.net.UnknownHostException: http:\/\/staging.xxxxxxx.com"
body: <p>I can get result from already implemented worklight examples like rss, google map api, etc... But I don't understand how to assess my own API. I am getting the following error:</p>
  
  <pre><code>{
     "errors": [
    "Runtime: Http request failed: java.net.UnknownHostException: http:\/\/staging.mycompany.com"
   ],
   "info": [
   ],
   "isSuccessful": false,
   "warnings": [
   ]
    }
  </code></pre>
  
  <p><strong>myRestAdapter.xml</strong></p>
  
  <pre><code>  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
   &lt;wl:adapter name="myRESTAdapter"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xmlns:wl="http://www.ibm.com/mfp/integration"
  xmlns:http="http://www.ibm.com/mfp/integration/http"&gt;
  
  &lt;displayName&gt;myRESTAdapter&lt;/displayName&gt;
  &lt;description&gt;myRESTAdapter&lt;/description&gt;
  &lt;connectivity&gt;
      &lt;connectionPolicy xsi:type="http:HTTPConnectionPolicyType"&gt;
          &lt;protocol&gt;http&lt;/protocol&gt;
          &lt;domain&gt;http://staging.mycompany.com&lt;/domain&gt;
          &lt;port&gt;80&lt;/port&gt; 
          &lt;connectionTimeoutInMilliseconds&gt;30000&lt;/connectionTimeoutInMilliseconds&gt;
          &lt;socketTimeoutInMilliseconds&gt;30000&lt;/socketTimeoutInMilliseconds&gt;
          &lt;maxConcurrentConnectionsPerNode&gt;50&lt;/maxConcurrentConnectionsPerNode&gt;
          &lt;!-- Following properties used by adapter's key manager for choosing specific certificate from key store  
          &lt;sslCertificateAlias&gt;&lt;/sslCertificateAlias&gt; 
          &lt;sslCertificatePassword&gt;&lt;/sslCertificatePassword&gt;
          --&gt;     
      &lt;/connectionPolicy&gt;
  &lt;/connectivity&gt;
  
  &lt;procedure name="getGmapLatLng"/&gt;
  
     &lt;/wl:adapter&gt;
  </code></pre>
  
  <p><strong>myRESTAdapter-impl.js</strong></p>
  
  <pre><code> function getGmapLatLng(UserName) {
  
  var input = {
      method : 'post',
      returnedContentType : 'application/json',
      path : '/RESTapi/Rest_LoginValidate.php',  // the method which i want to access, actual url is this "http://mycompany.com/RESTapi/LoginValidate.php"
      parameters : {
          'UserName' : UserName,
  
      }
  };
  
  return WL.Server.invokeHttp(input);
   }
  </code></pre>