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

Pointers regarding consuming a external web-service from SAP

Former Member
0 Likes
484

Hi All,

I am trying to consume a web-service from an external system using a URL.

Our SAP system version is 4.7. I have created a custom program and calling up the web service using HTTP POST method.

For this I referred the following weblog.

https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/847. [original link is broken] [original link is broken] [original link is broken]

I modified the program according to my requirements and called the web service, but I am facing certain issues.

1. The if_http_client->send method executed successfully (sy-subrc eq 0). But the next call to the method

if_http_client->receive the program shows error.The message is very long one and I am not able to see it fully in debugging mode.

Please help me with the following questions.

1. Is there any way I can read the message returned from the web-service to see what the error was? In 4.7 we don't have the recording function as in 6.0.

2. I have disable the login prompt by calling if_http_client->propertytype_logon_popup = http_client->co_disabled.

If I don't do that it shows me a SAP Web AS login screen. Shouldn't it show me the standard http login screen?

3.In that login screen if I provide my ID password it returns the following message

'Business Server Page (BSP) ErrorBSPexception:Access to URL :<Server>:<80>/ORABPEL/DEFAULT/READDATA1/1.0 is forbidden'

Any pointers what does it mean?

4. This method seems a very lengthy process to me. Is there any other approach to this issue?

TIA

Barada.

2 REPLIES 2
Read only

Former Member
0 Likes
457

Adding another question to the above.

Do I need to create another HTTP connection for this host in SM59? Will that help in anyway?

Regards

Barada.

Read only

Former Member
0 Likes
457

The error for Authorization was because of the HTTP proxy settings for the system.

I configured the proxy settings in the transaction SICF->Goto->Http Proxy and then the program worked fine.

Regards

Barada