SAP making HTTPS requests to REST service

允我心安 提交于 2019-12-10 18:54:49

问题


Is this possible? I'm about to start into a project which requires a call from an SAP instance to a remotely hosted service using XML over HTTPS. Does anyone have sample ABAP code?


回答1:


There is a SDN article titled "Real Web Services with REST and ICF". This covers the server side (providing a REST service) only, but maybe this could help you getting started. There's also the (arguably rather concise) documentation on client side ICF development. However, it looks like you'll have to parse the body on your own, using nothing but the XML support SAP provides you with. That's the drawback of REST...




回答2:


This can be done using cl_http_client. Check the SAP help documentation for the code.

For making HTTPS calls, you also need to import the certificate of your service provider into the system. This can be done using the transaction "STRUST". This step is compulsory; without it, you`ll get communication errors.



来源:https://stackoverflow.com/questions/2245345/sap-making-https-requests-to-rest-service

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!