I got a problem to get geocoding from Google when I used a government licensed Google API key. This project is developed for government, so we should be able to use this API key. And I was told by government agent that as long as I use this API key and they add our company's domain to their list, we should be able to get geocoding without Google free limit. I am using Oracle 11gR2, Apex 4.1. The google does return some result (1600 geocodings) and after a while my program had exception.However, I got the following problem:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1722
ORA-29259: end-of-input reached
ORA-06512: at "SORS.SOR_TEST_SERVICE", line 24
ORA-06512: at "SORS.SOR_TEST_SERVICE", line 187
ORA-06512: at line 6
29273. 00000 - "HTTP request failed"
*Cause: The UTL_HTTP package failed to execute the HTTP request.
*Action: Use get_detailed_sqlerrm to check the detailed error message.
Fix the error and retry the HTTP request.
and I searched online and found the following thread on OTN:
https://forums.oracle.com/forums/thread.jspa?threadID=2253491
It looks I need to get Google API certificate and install it on Oracle wallet. I do not any experience about it. Can anyone give me a road map about it? For example, how can I get a Google certificate? Shall I contact with Google, or send request with license API key? or API key is a certificate? an example would be very helpful!
Here is my code
procedure Get_Geocoding(P_s_Address in varchar2, P_s_Geocoding out varchar2, P_n_accuracy out number, P_b_success out boolean) is
l_address varchar2(4000);
l_url varchar2(32000);
l_response varchar2(3200);
n_first_comma number;
n_second_comma number;
n_level_length number;
BEGIN
/* TODO implementation required */
l_address:=APEX_UTIL.URL_ENCODE(P_s_Address);
l_address := replace(l_address,' ','+');
l_url := 'http://maps.google.com/maps/geo?q='||l_address||'&'||'output=csv'||'&'||'key=my API key';
l_response := utl_http.request(l_url, APEX_APPLICATION.G_PROXY_SERVER);
n_first_comma:=instr(l_response,',',1,1);
n_second_comma:=instr(l_response,',',1,2);
n_level_length:=n_second_comma-n_first_comma-1;
P_n_accuracy:=to_number(substr(l_response,n_first_comma+1, n_level_length));
l_response:=substr(l_response,instr(l_response,',',1,2)+1);
P_s_Geocoding:=l_response;
if (P_s_Geocoding<>'0,0') then
P_b_success:=true;
else
P_b_success:=false;
end if;
END;
}
Thanks a lot!
Sam
check the db version if your db version is 11.2.0.3 or below, this error can come.
You need to install a patch to upgrade tls based security. The minimum version for this is 11.2.0.4.0. Oracle has provided a patch(19651773) for windows to upgrade the version.
Related
There are 65 URLs generating XML data and ask for Windows credentials when hit over browser.
URL format: http://deda1w6114:18080/discoverant-ws/agdata/agmanifest/
URL format without credentials: http://USERID:PASSWORD#deda1w6114:18080/discoverant-ws/agdata/agmanifest/
I tried with sample URL: http://quotes.rest/qod.json’, and XML is getting fetched, but getting error when tried with original one.
Error report -
ORA-29273: HTTP request failed
ORA-06512: at "APEX_190100.WWV_FLOW_WEB_SERVICES", line 1035
ORA-12545: Connect failed because target host or object does not exist
ORA-06512: at "SYS.UTL_HTTP", line 380
ORA-06512: at "SYS.UTL_HTTP", line 1148
ORA-06512: at "APEX_190100.WWV_FLOW_WEB_SERVICES", line 934
ORA-06512: at "APEX_190100.WWV_FLOW_WEB_SERVICES", line 1580
ORA-06512: at "APEX_190100.WWV_FLOW_WEBSERVICES_API", line 408
ORA-06512: at line 4
29273. 00000 - "HTTP request failed"
*Cause: The UTL_HTTP package failed to execute the HTTP request.
*Action: Use get_detailed_sqlerrm to check the detailed error message.
Fix the error and retry the HTTP request.
I need to apply this fix for one URL and then to other 64. As this is http so not sure if SSL is needed. I need guidance on steps that need to be performed to achieve this.
I also don't want to hard code my windows credentials for these URLs. Sorry as I don't have expertise on this part but happy to learn this. Please help.
Ping the hostname from Oracle server and mark the response.
FQDN urls should be used if its restricted on server level.
In above problem, using FQDN password resolved the issue.
I am calling a web service from database procedure using utl_http request, it's working fine if I trigger direct from database,
but if I trigger the procedure using orawsv I am getting the following error
ORA-06512: at "SYS.UTL_HTTP", line 1339 ORA-29261: bad argument
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1130
ORA-29270: too many open HTTP requests
my DB is :11.2.0.4.0
this video explaining in details my issue with the code
https://drive.google.com/file/d/1rAqJOpm96TVptp7TEBaHcLi1zSGhc7wY/view?usp=sharing
Please help
Thanks ...
I am trying to call to a web service using the Oracle UTL_HTTP package. The call is for HTTPS Post and include utl_http.set_wallet.
when the DB try to execute a
req utl_http.req;
res utl_http.resp;
res := utl_http.get_response (req);
we get the Oracle error message:
ORA-29259 end-of-input-reached.
Thanks in advance
The issue you describe looks like "Using HTTPS With Webservice and Utl_http.request fails with error ORA-29259: end-of-input reached or ORA-29263: HTTP protocol error (Doc ID 1602116.1)" in the Oracle support system.
The solution is to make sure the ACL for the website or the wallet file has been enabled. So not only allow the website access through ACL but also allow access to the local filename where the wallet was located.
If you post the full code, we might be able to see more.
I was trying to accesss goggle map webservice from ORACLE PL/SQL in following way but receiving error : ORA-29273: HTTP request failed ORA-29268: HTTP client error 403 - Forbidden
select httpuritype('http://maps.googleapis.com/maps/api/geocode/xml?address=30+Rockefeller+center,New+York,NY,USA&sensor=false').getclob() from dual
Kindly suggest
I verified my domain successfully via Apple Developer Account. But, when I try to call Apple's registerMerchant API they respond with:
statusMessage: Payment Services Exception Domain verification failed for merchantId...
errorMessage=\"exception decoding Hex string: invalid characters encountered in Hex string\""
statusCode: 400
Did anyone encounter this error?
Apple was expecting to find a specific domain-verification-file (that they provided us). When I uploaded the correct file, the issue was resolved.