Results 1 to 2 of 2

Thread: Web Service

  1. #1
    Join Date
    Mar 2016
    Posts
    2

    Unanswered: Web Service

    Hello.

    I have Oracle XE 11.2.0.2.0 on my PC, Windows 7. I try to use Google web service maps.googleapis.com/maps/api/geocode/xml and have the problem.
    When I use HTTP - everything is fine, this code:

    Code:
      oReq := utl_http.begin_request('http://maps.googleapis.com/maps/api/geocode/xml', 'POST', 'HTTP/1.1');
      utl_http.set_header(oReq, 'Content-Length', 0);
      oRes := utl_http.get_response(oReq);
      utl_http.read_text(oRes, sRes);
      utl_http.end_response(oRes);
      dbms_output.put_line('Response: [' || sRes || ']');
    gives me correct response

    <?xml version="1.0" encoding="UTF-8"?>
    <GeocodeResponse>
    <status>ZERO_RESULTS</status>
    </GeocodeResponse>
    .
    But when I try to use HTTPS:

    Code:
      utl_http.set_wallet('file:c:\oraclexe\app\oracle\product\wallets\xegoogle');
      oReq := utl_http.begin_request('https://maps.googleapis.com/maps/api/geocode/xml', 'POST', 'HTTP/1.1');
      utl_http.set_header(oReq, 'Content-Length', 0);
      oRes := utl_http.get_response(oReq);
      utl_http.read_text(oRes, sRes);
      utl_http.end_response(oRes);
      dbms_output.put_line('Response: [' || sRes || ']');
    , I see such an error message:

    ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1130
    ORA-28857: Unknown SSL error
    at the line
    Code:
    oReq := utl_http.begin_request(...
    The wallet was organized this way:
    orapki wallet create -wallet c:\oraclexe\app\oracle\product\wallets\xegoogle -auto_login
    orapki wallet add -wallet c:\oraclexe\app\oracle\product\wallets\xegoogle -trusted_cert -cert c:\business\PLSQL\ACE\ProcessWesbResponse\google\G eoTrustGlobalCA.crt -pwd <wallet_password>
    orapki wallet add -wallet c:\oraclexe\app\oracle\product\wallets\xegoogle -trusted_cert -cert c:\business\PLSQL\ACE\ProcessWesbResponse\google\G oogleInternetAuthorityG2.crt -pwd <wallet_password>
    , where GeoTrustGlobalCA.crt and GoogleInternetAuthorityG2.crt are files with certificate X.509 that I have exported from https://maps.googleapis.com/

    Please help me if it is possible.
    Thank you.

  2. #2
    Join Date
    Mar 2016
    Posts
    2

    Web Client

    Hello.

    I have Oracle XE 11.2.0.2.0 on my PC, Windows 7. I try to use Google web service maps.googleapis.com/maps/api/geocode/xml and have the problem.
    When I use HTTP - everything is fine, this code:

    Code:
      oReq := utl_http.begin_request('http://maps.googleapis.com/maps/api/geocode/xml', 'POST', 'HTTP/1.1');
      utl_http.set_header(oReq, 'Content-Length', 0);
      oRes := utl_http.get_response(oReq);
      utl_http.read_text(oRes, sRes);
      utl_http.end_response(oRes);
      dbms_output.put_line('Response: [' || sRes || ']');
    gives me correct response

    <?xml version="1.0" encoding="UTF-8"?>
    <GeocodeResponse>
    <status>ZERO_RESULTS</status>
    </GeocodeResponse>
    .
    But when I try to use HTTPS:

    Code:
      utl_http.set_wallet('file:c:\oraclexe\app\oracle\product\wallets\xegoogle');
      oReq := utl_http.begin_request('https://maps.googleapis.com/maps/api/geocode/xml', 'POST', 'HTTP/1.1');
      utl_http.set_header(oReq, 'Content-Length', 0);
      oRes := utl_http.get_response(oReq);
      utl_http.read_text(oRes, sRes);
      utl_http.end_response(oRes);
      dbms_output.put_line('Response: [' || sRes || ']');
    , I see such an error message:

    ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1130
    ORA-28857: Unknown SSL error
    at the line
    Code:
    oReq := utl_http.begin_request(...
    The wallet was organized this way:
    orapki wallet create -wallet c:\oraclexe\app\oracle\product\wallets\xegoogle -auto_login
    orapki wallet add -wallet c:\oraclexe\app\oracle\product\wallets\xegoogle -trusted_cert -cert c:\business\PLSQL\ACE\ProcessWesbResponse\google\G eoTrustGlobalCA.crt -pwd <wallet_password>
    orapki wallet add -wallet c:\oraclexe\app\oracle\product\wallets\xegoogle -trusted_cert -cert c:\business\PLSQL\ACE\ProcessWesbResponse\google\G oogleInternetAuthorityG2.crt -pwd <wallet_password>
    , where GeoTrustGlobalCA.crt and GoogleInternetAuthorityG2.crt are files with certificate X.509 that I have exported from https://maps.googleapis.com/

    Please help me if it is possible.
    Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •