Forum Discussion
How to consume a SOAP web service in 0365/Sharepoint online.
Hey all!
I have scoured the web for hours and today and cannot seem to find an appropriate answer to the problem I am trying to solve.
I have an eternal soap api/web service that I am trying to grab data from located at: https://api.com/service.svc and I cannot for the life of me find help on how to set up a service or add in to consume that data. Everything I seem to find points me to client-side rest calls that won't work for this non-CORS api.
I have an 0365 developer account, visual studio, and am ready to build an add-in or whatever I need.
1 Reply
- Andrew PetersenCopper Contributor
Here's how I'd probably tackle it...
Step 1: Build an https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-v1-dotnet-webapi wrapper around the Soap Service
- Use .NET or Node to connect to the Soap Service using a Service Account
- Exposes your SOAP data via Restful API over HTTP
- Requires an Azure AD access token
- Supports Cross Origin Resource Sharing (CORS)
- Azure Functions are my goto for this scenario
Step 2: Create an SPFx Customization that consumes your Azure AD Web API
- Follow the docs on how to https://docs.microsoft.com/en-us/sharepoint/dev/spfx/use-aadhttpclient