sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

How to make SOAP request from spfx-webpart?

Open anatolii-bohdanov opened this issue 9 years ago • 4 comments

Category

  • [+ ] Question

Good day, colleagues! In my spfx-webpart I need to make SOAP request to SharePoint. How can I do this?

anatolii-bohdanov avatar Jul 03 '17 06:07 anatolii-bohdanov

Thanks for your question.

Assuming there is an equivalent SharePoint REST API, calling the REST API is preferable. You can also use the JavaScript Object Model (JSOM) to access SharePoint API's.

To call a SOAP API you would need to handle auth separately.

Could you please clarify whether the API is not available via REST or JSOM?

chackman avatar Jul 03 '17 21:07 chackman

@chackman, thank you for your answer.

I think, that SharePoint Framework doesn't have JSOM libraries. But yesterday I had found this article. It solved my problem.

SP REST API has some limits. For example, you can not create JOIN request, that connect two lists, which are located on different sites. $expand will gives an error message. This trick is only works through JSOM.

anatolii-bohdanov avatar Jul 05 '17 17:07 anatolii-bohdanov

Thanks for your response. Good to hear that you were able to use JSOM to do this.

chackman avatar Jul 05 '17 17:07 chackman

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

msft-github-bot avatar Jan 29 '20 06:01 msft-github-bot