0

Google geocode HTTP call error: 404 Host unknown

Nov 03, 2016 at 11:22 AM

92

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Isaias Freitas
Nov 03, 2016 at 07:24 PM
0

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

Show 2 Share
10 |10000 characters needed characters left characters exceeded

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

0

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.

0
Gabriel Pill-Kahan Nov 03, 2016 at 07:57 PM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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.

0
Isaias Freitas
Nov 08, 2016 at 03:38 PM
0

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,

Share
10 |10000 characters needed characters left characters exceeded
Skip to Content