2014 Aug 08 9:47 AM
Hi
I'm attempting to read an API from my vendor whose site is in https.
I have added the certificate in STRUST t-code.
I am using the following method to create the client.
call method cl_http_client=>create(
exporting
host = STR_host
service = '443'
scheme = 2
importing
client = lo_client ).
lo_client->request->set_method( if_http_request=>co_request_method_get ).
call method cl_http_utility=>set_request_uri( request = lo_client->request uri = lv_result_url ).
lo_client->send( ).
CALL METHOD lo_client->receive
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3
OTHERS = 4.
but when i send to receive, it always return http_communication_failure.
Previously, I was able to connect when the site is on http only.
I wonder if anything else need to be done?
2014 Aug 11 8:23 AM
Hi Rusyinni,
Have you maintained the proxy settings in SAP for HTTPS Connections?
If not, to maintain proxy settings...Go to SICF tcode->Click F8->Client menu->Proxy Settings->HTTPS Log
If this does not solve the issue, Go to SMICM t code...Click Display All(Shift + F5) and post the log message here so we can check what exactly is going wrong.
BR,
Aashrith.
2014 Aug 11 9:24 AM
Hi Aashrith,
Thanks for the reply.
I went to SMICM log, and found that the service/port is not yet maintained in SMICM.
After I maintained, I re-tested SM59, and got the following error now:
SSL client handshake with [website url]:443 failed SSSLERR_PEER_CERT_UNTRUSTED(-102)
Any other clues I should try?
How do I check the handshake certificate?
Rgds
Rusyinni
2014 Aug 11 9:47 AM
2014 Aug 11 10:49 AM
Hi
After I restarted ICM, the https service disappeared.
Why so?
Rgds
Rusyinni
2015 Jan 15 1:36 PM
You have to set the relevant profile parameter for the icm port in the instance profile in RZ10. Then the settings remain after system restart.
Kind regards,
Gørril
2015 Sep 11 5:09 PM
Hi Rusyinni,
I was in a similar situation and I could fix my connection problems as I describe below.
First of all you say you have installed the certificate of the WEB server you are trying to connect to via HTTPS protocol. Please verify that you have added the certificate to the correct PSE file in the STRUST transaction. In my case, as I am using the anonymous SSL Client (CN=anonymous) , I added the server_i_want_to_connect_to.cer file to the corresponding PSE file.
Then I specified the ssl_id I wanted to use.
CALL METHOD cl_http_client=>create
EXPORTING
host = l_host
scheme = 2 " HTTPS
ssl_id = 'ANONYM' " <<<<===========
IMPORTING
client = lr_http_client
EXCEPTIONS
argument_not_found = 1
plugin_not_active = 2
internal_error = 3
OTHERS = 4.
After I did this procedure, I could connect to the remote web server with HTTPS and invoke the REST web services I required.
I hope this helps,
Best regards, Rafael