Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Google GeoCoding Call failure in HTTPS

rohit3611
Contributor
0 Kudos
827

Dear Colleagues,

We are trying to call google Geocoding API, it is failing due to following error.

SSL handshake with maps.googleapis.com:443 failed: SSSLERR_PEER_CERT_UNTRUSTED (-102)#The peer's X.509 Certificate (chain) is untrusted##SapSSLSessionStart()==SSSLERR_PEER_CERT_UNTRUSTED# SSL:SSL_connnect() failed  (536872221/0x2000051d)#  => "SSL API er

"make the http call to the rest api

     CALL METHOD cl_http_client=>create_by_url

     EXPORTING

       url                = lv_uri

*      proxy_host         =

*      proxy_service      =

*      ssl_id             =

*      sap_username       =

*      sap_client         =

     IMPORTING

       client             = lo_client_init

     EXCEPTIONS

       argument_not_found = 1

       plugin_not_active  = 2

       internal_error     = 3

       others             = 4

           .

   IF sy-subrc <> 0.

*   Implement suitable error handling here

   ENDIF.

   check lo_client_init IS NOT INITIAL.

   CALL METHOD lo_client_init->send

*        EXPORTING

*          timeout                    = CO_TIMEOUT_DEFAULT

   EXCEPTIONS

     http_communication_failure = 1

     http_invalid_state         = 2

     http_processing_failed     = 3

     http_invalid_timeout       = 4

      OTHERS                     = 5

         .

   IF sy-subrc <> 0.

*       Implement suitable error handling here

   ENDIF.

   CALL METHOD lo_client_init->receive

     EXCEPTIONS

       http_communication_failure = 1

       http_invalid_state         = 2

       http_processing_failed     = 3

       OTHERS                     = 4.

   CHECK lo_client_init is NOT INITIAL.

1 REPLY 1

naimesh_patel
Active Contributor
0 Kudos
141

SSL connection should be open on ECC in order to make the HTTPS call. Otherwise it would fail. Configuring the AS ABAP for Supporting SSL - Network and Transport Layer Security - SAP Library

Regards,
Naimesh Patel