Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Google geocode HTTP call error: 404 Host unknown

mohd_riyajuddin
Participant
0 Likes
3,030

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

6 REPLIES 6
Read only

Isaias_SAP
Product and Topic Expert
Product and Topic Expert
0 Likes
1,687

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

Read only

0 Likes
1,687

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..

Read only

0 Likes
1,687

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.

Read only

gabriel_pill-kahan
Active Participant
0 Likes
1,687

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

Read only

0 Likes
1,687

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.

Read only

Isaias_SAP
Product and Topic Expert
Product and Topic Expert
0 Likes
1,687

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,