4

Synchronous Service call in SAP CAPM : HTTP 500 Internal Server Error

 10 months ago
source link: https://answers.sap.com/questions/13951467/synchronous-service-call-in-sap-capm-http-500-inte.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Synchronous Service call in SAP CAPM : HTTP 500 Internal Server ErrorSkip to Content

SAP Community Log-in Update
In a few months, SAP Community will switch to SAP Universal ID as the only option to login. Create your SAP Universal ID now! If you have multiple S- or P- accounts, use the Consolidation Tool to merge your content.
Get Started with SAP Universal ID
Search Questions and Answers
yesterday

Synchronous Service call in SAP CAPM : HTTP 500 Internal Server Error

36 Views

I am trying to make synchronous service call from a SAP CAPM service via a Destination. I am using srv.send method to make synchronous service calls. The request gets executed fine when a single request is processed but when i try to call the same in a Loop inside a Promise the request fails with HTTP 500 Error.

capm1.png
capm2.png
Attachments

capm1.png (26.2 kB)
capm2.png (61.4 kB)
2 Answers
Sort by:

Ivan Mirisola Thanks for your Inputs. Will check out the above options.

Currently the service works fine when I am triggering individual updates. I have exposed a standard BAPI as a custom webservice and consuming the same via the Destination. Please find below response from the SOAP service after successful update.

capm3.png

The Issue occurs when i trigger the same update in a Loop for multiple users. The same update works fine in a loop when i trigger via a AJAX call in SAPUI5 application with async mode false. But with srv.send method in CAP it fails with error mentioned in the issue description.

I have used await operator for the promise and it is working fine now.

Attachments

capm3.png (80.8 kB)
1 comment
27 minutes ago

Hi Athul Ramakrishnan,

As mentioned before, SOAP isn't supported by CDS by default. It might work with some use-cases as you have found out. But SOAP isn't standardized in terms of consumption. Hence you would be better supported by using it with Cloud SDK and SOAP specific libraries likes the ones mentioned on the blog.

Best regards,
Ivan

Know someone who can answer? Share a link to this

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that your answer complies with our Rules of Engagement.

You must be Logged in to submit an answer.

Please provide a distinct answer and use the comment option for clarifying purposes.
10 characters required.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK