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: 

HTTP_COMMUNICATION_FAILURE during IF_HTTP_CLIENT>receive

0 Kudos

Hi.

I'm having this error when trying call an API.

This is my code: (example URL)

lv_url = 'http://test.url.cl/api/v123/cl/emp?id=' && p_inv.
cl_http_client=>create_by_url( EXPORTING url = lv_url
IMPORTING client = lo_client
EXCEPTIONS OTHERS = 4 ).
lo_client->request->set_method( 'GET' ).
CALL METHOD lo_client->request->set_header_field
EXPORTING
name = 'auth_token'
value = 'Hc................Ak'.
lo_client->send( ).
lo_client->receive( ).

When execute 'RECEIVE' method, dumps:

--> Exception condition "HTTP_COMMUNICATION_FAILURE" raised.

I have this error in tx.SMICM:

--> [Thr 6924] *** ERROR => IcmConnConnect: No service for protocol HTTPS started [icxxconn.c 2441]

When I try with other URL, i.e.:

lv_url = 'http://httpbin.org/ip'.
lv_url = 'http://jsonplaceholder.typicode.com/users'.

This URL's works fine, without any error.

I don't know what I must check or change.

Thanks in advance.

3 REPLIES 3

Sandra_Rossi
Active Contributor
0 Kudos

I guess it's all about configuring and activating the HTTPS protocol in profile parameters and in SMICM > Services.

I can find many answers in the Web with below query. What did you try? What doesn't work?

icmConnConnect: No service for protocol HTTPS site:sap.com

renato_martins
Participant
0 Kudos

This error can occur due to the lack of SMICM configuration or the restriction of the SAP Server to access the URL (most cases)

0 Kudos

Hi!.

I'm trying to get Employees data with an API.

I don't know if it is HTTPS protocol configuration because with the others URL's works fine. I just have the error with one of them, using the same abap code.

lv_url = 'http://test.url.cl/api/v123/cl/emp'. --> ERROR

lv_url = 'http://httpbin.org/ip'. --> OK

lv_url = 'http://jsonplaceholder.typicode.com/users'. --> OK