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: 

Calling a web service via HTTPS

Former Member
0 Kudos

Dear all,

I wrote an ABAP program to call a web service in order to send SMS messages. The program takes the 3 following steps to make the request and get the response.

1 - First I create an http client using the following method passing as parameters the URL and the proxy_host used.

CALL METHOD cl_http_client=>create_by_url

EXPORTING

url = ws_url

proxy_host = my_proxy

IMPORTING

client = http_client.

2 - Then I use the following method to send the request

CALL METHOD http_client->send

EXCEPTIONS

http_communication_failure = 1

http_invalid_state = 2.

3 - And finally I try to get the response with the following method

CALL METHOD http_client->receive

EXCEPTIONS

http_communication_failure = 1

http_invalid_state = 2

http_processing_failed = 3.

However, the receive method returns an http_communication_failure.

Here, I must mention that the protocol used is HTTPS that does not use the default port 443 but another port specified by the provider of the service. That is, the url is like the following: HTTPS://xxx-yyyy:5678/.

(I used transaction strust to import the provider's certificate. Do I have to do something else as well?)

Does anyone know how to call a web service over HTTPS using the 3 steps I mentioned above

Note: When I call another web service over a simple HTTP protocol then I can send my request and receive a response without any problem.

Looking forward to your answer,

Best regards

George

1 ACCEPTED SOLUTION

former_member182114
Active Contributor
0 Kudos

Check if it help you:

1 REPLY 1

former_member182114
Active Contributor
0 Kudos

Check if it help you: