[Google Maps] Error trying to use GoogleMapsGeocodingAPI

[Google Maps] Error trying to use GoogleMapsGeocodingAPI

  
Forge Component
(14)
Published on 4 Oct by OutSystems Labs
14 votes
Published on 4 Oct by OutSystems Labs
Hello,

I'm trying to use the GoogleMapsGeocodingAPI, available actions in the eSpace AddressToCoordinates And CoordinatesToAddress, but I'm getting this error in service center The remote name could not be resolved: 'maps.googleapis.com'.

Have someone already have this error? Any ideas what it could be?

Thanks.

Best Reggards,
Nuno Mendes
Hello, Nuno,

Off the top of my head, it looks like your OutSystems Platform Server is having trouble resolving that URL, when it tries to translate your coordinates to an address (or vice-versa).

I went ahead and tested on my own Personal Environment and had no trouble doing those translations. Could you please try again now?
Hi Carlos,

Yes, I have also tested in my Personal Environment without troubles. But in the server that I am currently using it does not work. It resolves the URL, at least it seems to do that but if I put the URL in the server to get the JSON it returns the JSON but I can't download it giving me a error.

Thanks.

Best Regards,
Nuno Mendes 
Mendes wrote:
Yes, I have also tested in my Personal Environment without troubles. But in the server that I am currently using it does not work. It resolves the URL, at least it seems to do that but if I put the URL in the server to get the JSON it returns the JSON but I can't download it giving me a error.
So you're saying that the server's machine resolves 'maps.googleapis.com' properly, but when you try to call the action, the REST call that is generated in the process returns an error. Did I understand it right?

Eitherway, could please share with us the Service Center error stack?
Yes, that's it.

It logs 2 entries in Error log:

The remote name could not be resolved: 'maps.googleapis.com'
   at System.Net.HttpWebRequest.GetResponse()
   at ssGoogle_Maps.CcGoogleMapsGeocodingAPI.ActionGetCoordinatesFromAddress(HeContext heContext, ICcGoogleMapsGeocodingAPICallbacks _callbacks, String inParamAPIKey, String inParamAddress, String inParamRegion, String inParamComponents, STCoordinatesFromAddressStructure& outParamResponse)

and the entry


The remote name could not be resolved: 'maps.googleapis.com'
   at ssGoogle_Maps.CcGoogleMapsGeocodingAPI.ActionGetCoordinatesFromAddress(HeContext heContext, ICcGoogleMapsGeocodingAPICallbacks _callbacks, String inParamAPIKey, String inParamAddress, String inParamRegion, String inParamComponents, STCoordinatesFromAddressStructure& outParamResponse)
   at ssGoogle_Maps.Actions.ActionAddressToCoordinates(HeContext heContext, String inParamServerAPIKey, String inParamAddress, String inParamRegion, String& outParamLatitude, String& outParamLongitude)
   at ssSuppliers_Clinics.RsseSpaceGoogle_Maps.MssAddressToCoordinates(HeContext heContext, String inParamServerAPIKey, String inParamAddress, String inParamRegion, String& outParamLatitude, String& outParamLongitude)
   at ssSuppliers_Clinics.Flows.FlowClinics_Flow.ScrnClinicDetail_GeneralData.Preparation(HeContext heContext)
   at ssSuppliers_Clinics.Flows.FlowClinics_Flow.ScrnClinicDetail_GeneralData.Page_Load(Object sender, EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


Thanks,

Best regards,
Nuno Mendes
Sorry for the late reply, Nuno,

Hmm, I'm having trouble finding out any other reason other than a failed DNS lookup.

Have you managed to solve the issue yet? If not, how did you verify that the server machine is able to translate that address? Browser lookup? A command-line 'nslookup'?

Also, what DNS server is that machine using? ISP provided or your own corporate server?
Sorry for the late reply.

Just for the record If someone have the same error. I have a firewall that was blocking requests to the google apis.

Thanks Carlos,
Nuno Mendes

Carlos Filipe Simões wrote:
Sorry for the late reply, Nuno,

Hmm, I'm having trouble finding out any other reason other than a failed DNS lookup.

Have you managed to solve the issue yet? If not, how did you verify that the server machine is able to translate that address? Browser lookup? A command-line 'nslookup'?

Also, what DNS server is that machine using? ISP provided or your own corporate server?