on 2023 Dec 06 5:00 PM
In my BTP ABAP environment, I want to consume an SAP provided SOAP API (this one: https://api.sap.com/api/AC_MANAGEBUSINESSUSERIN/overview) and then call it from a class in the same ABAP environment.
I followed this tutorial: https://developers.sap.com/tutorials/abap-environment-soap-web-services.html
And this works well. However, the destination was created using the method:
DATA(lo_dest) = cl_soap_destination_provider=>create_by_url( lc_url ).
lo_dest->set_basic_authentication( i_user = lc_user i_password = lc_password ).
The issue here is that I need to specify both the URL of my ABAP environment as well as a hard coded user ID and password. This is fine for my testing, but as SAP points out it is not recommended for productive use.
I've been trying to create a destination through one of the other two methods:
DATA(lo_dest) = cl_soap_destination_provider=>create_by_comm_arrangement( comm_scenario = lc_comm_scenario
service_id = lc_service_id
comm_system_id = lc_comm_system_id ).
DATA(lo_dest) = cl_soap_destination_provider=>create_by_cloud_destination( i_name = lc_cloud_dest ).
But I haven't had much luck. Does anyone have any pointers on how to locally call this SOAP API?
Request clarification before answering.
Hi Matt,
using cl_soap_destination_provider=>create_by_comm_arrangement is the preferred approach to create a destination for SOAP service service call.
As developer you need to maintain
As administrator you need to maintain
Did you check the Developing External Service Consumption (Outbound Communication) documentation?
Additionally, you may have a look at my Authenticating at Internet-Facing Services via Outbound Communication User blog. Maybe this helps.
Best regards
Kai
P.S: When maintaining the scenario, you can specify that there can be one arrangement per client. In that case, you do not need to specify the communication system when calling cl_soap_destination_provider=>create_by_comm_arrangement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi kai.dehmann,
Many thanks! I was able to get it working. My issue was that I was thinking about the SOAP service as an inbound scenario. As I pondered your reply and went through the steps of creating the outbound service and an associated communication scenario everything lined up properly in my head.
Best Regards,
Matt
There is also a tutorial avaiable that describes how to use the SAP IDP for that
Provision Users into your SAP BTP ABAP Environment | SAP Tutorials
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
62 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.