Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unable to get XML from Google Maps and get ORA-29273

LaurySep 30 2017 — edited Oct 1 2017

Hi,

I am working with Oracle RDBMS 12cR1.

1) I run the following query:

select

    httpuritype(

        'http://maps.googleapis.com/maps/api/geocode/xml?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA'

            ).getXML() as local_xml

from

    dual;

I get the following returned:

LOCAL_XML

------------------------------------------------------------------------------------------------------------------------

<?xml version="1.0" encoding="US-ASCII"?>

<GeocodeResponse>

  <status>OVER_QUERY_LIMIT</status>

  <error_message>You have exceeded your daily request quota for this API. We recommend registering for a key at the Goog

le Developers Console: https://console.developers.google.com/apis/credentials?project=_</error_message>

</GeocodeResponse>

2) Using https://developers.google.com/maps/web-services, I register for a key, and get a key.

3) I re-run the query with the key:

set define off

select

    httpuritype(

        'http://maps.googleapis.com/maps/api/geocode/xml?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=AIzaSyAQwIYD_qnFBPo73XZLlw8cSA551cjZ1pE'

            ).getXML() as local_xml

from

    dual;

Now, I get the following result:

LOCAL_XML

------------------------------------------------------------------------------------------------------------------------

<?xml version="1.0" encoding="US-ASCII"?>

<GeocodeResponse>

  <status>REQUEST_DENIED</status>

  <error_message>Requests to this API must be over SSL. Load the API with &quot;https://" instead of &quot;http://&

quot;.</error_message>

</GeocodeResponse>

   

4) I re-run the query, but this time with https (I suspect I will get an error again as I don't have a certificate)    :

set define off

select

    httpuritype(

        'https://maps.googleapis.com/maps/api/geocode/xml?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=AIzaSyAQwIYD_qnFBPo73XZLlw8cSA551cjZ1pE'

            ).getXML() as local_xml

from

    dual;

ORA-29273: HTTP request failed

ORA-29024: Certificate validation failure

ORA-06512: at "SYS.HTTPURITYPE", line 38

ORA-06512: at "SYS.HTTPURITYPE", line 108

   

Can someone explain me how to get the XML contents for the above query from Google Maps web service?   

Is there mabe an alternative for using Google Maps?

Thanks by advance for sharing your experience and tips.

Kind Regards

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 29 2017
Added on Sep 30 2017
2 comments
935 views