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 "https://" instead of "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