![](/style/images/good.png)
![](/style/images/bad.png)
Synchronous Service call in SAP CAPM : HTTP 500 Internal Server Error
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
Synchronous Service call in SAP CAPM : HTTP 500 Internal Server Error
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](https://answers.sap.com/storage/temp/2200815-capm1.png)
![capm2.png](https://answers.sap.com/storage/temp/2200816-capm2.png)
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](https://answers.sap.com/storage/temp/2198953-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.
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
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.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK