Google geocode HTTP call error: 404 Host unknown

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Nov 03, 2016 at 07: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

    Add comment
    10|10000 characters needed characters exceeded

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

  • Nov 03, 2016 at 07: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

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 08, 2016 at 03: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,

    Add comment
    10|10000 characters needed characters exceeded

Skip to Content