on 11-22-2005 8:00 AM
hi,
How to call an API from ABAP that have scheme of 'HTTPS' and not 'HTTP'???
pls light me on this.
thanks.
gaurav.
we need more info. The info is not clear.
My understanding is that you want to call a https url get the data returned from ABAP
is it right?
REgards
Raja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
first of all you need to obtain the certificate of that particular site and import it into the ABAP environment (transaction STRUSTSSO2).
then you can use class cl_http_client to call the url and get the data back.
the call would be something like below.
call method cl_http_client=>create
exporting
host = 'www.domain.com'
service = '80'
scheme = '2' " 1 http 2 https
importing
client = http_client.
call method http_client->request->set_header_field
exporting
name = '~request_method'
value = 'POST'.
call method http_client->send
exceptions
http_communication_failure = 1
http_invalid_state = 2.
call method http_client->receive
exceptions
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3.
wf_string1 = http_client->response->get_cdata( ).
Hope this is clear.
Regards
Raja
This question should have been posted in ABAP forum
check out the following two weblogs
(these are for consuming webservies from ABAP but section of the weblog describes about loading certificate)
/people/thomas.jung3/blog/2005/05/13/calling-webservices-from-abap-via-https
/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap
Regards
Raja
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.