cancel
Showing results for 
Search instead for 
Did you mean: 

How to use cl_http_client to access a SSL url.

Former Member
0 Kudos

I want to access Salesforce url.

When I use this object to access http url,it work fine.

but for https, this not work.

ERROR  HTTP_COMMUNICATION_FAILURE

My ABAP code like below.

DATA: CL type ref to if_http_client.

CALL METHOD cl_http_client=>create_by_url
EXPORTING
url = 'https://na17.salesforce.com/services/data/'
SSL_ID = 'DFAULT'
IMPORTING
client = cl
EXCEPTIONS
OTHERS = 1.
call method CL->send
exceptions
HTTP_COMMUNICATION_FAILURE = 1
HTTP_INVALID_STATE = 2
HTTP_PROCESSING_FAILED = 3
HTTP_INVALID_TIMEOUT = 4.


call method CL->receive
exceptions
HTTP_COMMUNICATION_FAILURE = 1.

DATA: S TYPE STRING,
       sub_string type string.

  s =  cl->RESPONSE->get_cdata( ).


The error htm like below.


500 Native SSL error


########## ############

Error:-14
Version:7200
Component:ICM
Date/Time:Fri Aug 29 08:42:17 2014#
Module:icxxconn_mt.c
Line:1977
Server:g9u0328_SB3_00
Error Tag:{0021460e}
Detail:

IcmConnInitClientSSL: SapSSLSessionStart failed (-57): SSSLERR_SSL_CONNECT

Should I get a CA certificate from salesforce and upload into sap sever in trust?

Would you please tell me how to make it work ,step by step?becuase I lack basis knowledge and now has no basis resource.

Accepted Solutions (0)

Answers (1)

Answers (1)

iaki_vila
Active Contributor
0 Kudos

Hi Shawn,

First of all you need to have the certificate imported in the strust transaction and the https communication up in the SICF transaction.

Check Federico's code

Regards.

Former Member
0 Kudos

Hi Iñaki,

Thanks for your help.

I saw many people mentioned the certificate. Where should I get the certificate?

I want to access Salesforce's  URL,so I need the certificate from salesforce,is it right?

My trust confuration.


SSL Client Identities

Would you please tell me what am I suposed to do ?