2016 Nov 03 11:22 AM
Hi,
Trying to make a HTTP call to fetch Google geo code services. Unfortunately ended with error message. "Connect to maps.google.com:80 failed: NIEHOST_UNKNOWN(-2). 404 Host Unknown.
URL Passed: http://maps.google.com/maps/api/geocode/xml?address='Some address'
As part of program steps done.
Step 1. CALL METHOD cl_http_client=>create_by_url.
Step 2. Request and Get
p_http_client->request->set_header_field( name = '~request_method' value = 'GET' ).
p_http_client->request->set_header_field( name = 'Content-Type' value = 'text/xml; charset=utf-8' ).
Step 3. Send
p_http_client->send( ).
Step 4. Receive
CALL METHOD p_http_client->receive.
p_p_content = p_http_client->response->get_cdata( ).
Normally this URL work in web browser.
Regards,
Riyaj
2016 Nov 03 7:24 PM
Hello Riyaj,
This is a name resolution (DNS) issue at the SAP server.
You need to involve your operating system and/or network team(s).
Regards,
Isaías
2016 Nov 04 7:32 AM
Hello Isaías,
Thanks for reply.. Might be you are right. As per coding prospective I have written logic whatever need to be done. Please let me know if it's configuration need to be done by Basic team then I will approach to them.
Regards,
Riyaj..
2016 Nov 08 7:15 PM
It would be wise to ask a local Basis team even before posting on SCN. Such questions can be much faster and more effectively answered locally than on a global website. This is not an ABAP issue, from what I see.
2016 Nov 03 7:57 PM
Hi,
Try using https. In my application I'm using https://maps.googleapis.com/. and the rest of the URL looks like what you have.
Regards, Gabriel
2016 Nov 04 7:12 AM
Hi,
Thanks for reply. Even I tried this still getting same status message: Error 404. Host not found.Through SAP.
https://maps.googleapis.com/maps/api/geocode/xml?address='My Address'.
If you are aware any basis configuration is to be done or some port need to be enable from network team please let me know.
Regards,
Riyajuddin.
2016 Nov 08 3:38 PM
Hello,
"404 Host not found"?
"404 not found" is an HTTP return code that indicates that the resource that was requested "/maps/api/..." does not exist on that server (thus, implying that the target server received the request and sent that response back).
Can you please add a screenshot from the error you are receiving?
Capturing the issue with the ICM running on level 2 trace and then providing the dev_icm trace file would help as well.
Regards,