Quantcast
Channel: SCN : All Content - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 7030

How to use cl_http_client to access a SSL url.

$
0
0

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.


Viewing all articles
Browse latest Browse all 7030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>