Rest API error " The remote name could not be resolved: 'tesproject.test' "

Rest API error " The remote name could not be resolved: 'tesproject.test' "

  

I wanna use my local project to test the Rest API and after i try to connect the rest api it return this error The remote name could not be resolved: 'tesproject.test' 

Hello reynaldleo

The error is saying that it can't reach the "tesproject.test" address.
As I can't reach this server from my computer, it means that its address is not a public one. 

Unless you are trying to access a local (from localhost) web service, in the same machine you have service studio installed, and you have set up a Web Server (like IIS) to accept requests in this machine, it will not work. And if the web service is in a different machine than your OutSystems environment, and it is not public (in a machine with a public IP), even if you can get to consume it in service studio, the application will fail any attempt to execute its methods, as all requests in runtime are done in the OutSystems Server, not in the Browser.

Hope this helps.

Cheers.


Hello Eduardo Jauch

Oh ya sorry i forgot to mention this is from my localhost, i'm using xampp as the web server. When i try to run this on my web browser it works but not on this outsystems app, is there a way to access this or should i set any config to connect the outsystems app to xampp?

If you're using on-premise Outsystems installation on your local network, then it is possible.

If you're using personal or enterprise cloud, your localhost REST services must be exposed to internet and can be accessed via internet.

To make your localhost REST services exposed to Internet, you can set Port Forwarding / Virtual Server on your router, but it's a complicated process and may need help from your Internet Service Provider..

Hi Reynald,

To sum up what Eduardo and Harlin have said above, if you expose a REST API, then the URL you are using must be reachable from the device the API is called from, which is the OutSystems front-end server in case of a mobile app or web app, and possibly your development environment in case of testing (though I assume it contacts the front-end server for testing, so possibly also not).

"Reachable" in this case means that a) the name is resolvable by the DNS server(s) you are using, and b) there's no firewall or the like blocking access.