Application Development and Automation 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: 
Read only

Consuming HTTPS webservice

0 Likes
639

Hello all,

I am facing a problem trying to consume a REST webservice.

My system is configured to use TLS 1.0, and I know I need to change to version 1.2 to successfully complete the HTTPS handshake. But, I can't change it right now because I can not restart the server.

Do someone have any trick to help me?

Here is my code:

    cl_http_client=>create_by_url(
      EXPORTING
        url = lv_url
      IMPORTING
        client = lo_http_client
      EXCEPTIONS
        argument_not_found = 1
        plugin_not_active = 2
        internal_error    = 3
      OTHERS            = 4 ).

    lo_http_client->request->set_method( lv_method ).
    lo_http_client->request->set_content_type( 'application/json' ).
    lo_http_client->request->set_header_field( EXPORTING name = 'Accept' value = 'application/json' ).

    lo_http_client->request->set_authorization(
      EXPORTING
        username             = lv_username
        password             = lv_password
    ).

    lo_http_client->request->set_cdata( EXPORTING data = json offset = 0 length = lv_len ).

    lo_http_client->send(
      EXCEPTIONS
      http_communication_failure = 1
      http_invalid_state         = 2 ).

    lo_http_client->receive(
      EXCEPTIONS
      http_communication_failure = 1
      http_invalid_state         = 2
      http_processing_failed     = 3 ).
1 REPLY 1
Read only

Sandra_Rossi
Active Contributor
0 Likes
472

What problem do you have?