Application Development and Automation 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: 
Read only

Calling an external REST service from ABAP - HTTP Method POST

Former Member
0 Likes
2,103

Hi everybody.

I am trying to call an external rest service  and posting an xml with no success.

Sap version is: SAP ECC 6.0

SAP_ABA700
SAP_BASIS700

I am using the class if_http_client.


But an error appears in this method. ( 'http_communication_failure'.)


CALL METHOD lv_http_client->receive

                  EXCEPTIONS

                 http_communication_failure = 1

                 http_invalid_state         = 2

                 http_processing_failed     = 3

                 OTHERS                     = 4.

Is it imposible to do that with sap ecc 6.0 ?      

Regards

Hi everybody.

I am trying to call an external rest service  and posting an xml with no success.

Sap version is: SAP ECC 6.0

SAP_ABA700
SAP_BASIS700

I am using the class if_http_client.


But an error appears in this method. ( 'http_communication_failure'.)


CALL METHOD lv_http_client->receive

                  EXCEPTIONS

                 http_communication_failure = 1

                 http_invalid_state         = 2

                 http_processing_failed     = 3

                 OTHERS                     = 4.

Is it imposible to do that with sap ecc 6.0 ?      

Regards

3 REPLIES 3
Read only

Sandra_Rossi
Active Contributor
0 Likes
837

It seems you just have either a little bug in your code, or the HTTP service is not activated in your system. Did you check the services in SMICM? Ask your administrator if it's inactive.

Read only

0 Likes
837

We have another Soap Based Webservice that connects very well with the class if_http_client.

The problem is with The Rest Service.

it was made in a server  from Amazon Web Services.

Regards.

Read only

0 Likes
837

Bug in your code then.