0

Is there any other way to consume a SharePoint 2013 web service other than adding its service reference in visual studio?

What if I want to do this at runtime? Is there an example available?

1

Yes, you can do this using posting SOAP messages to the web service using HttpClient object (MSDN for HttpClient). You can look here in the answer https://stackoverflow.com/questions/14336414/httpclient-soap-c. It shows how to make a SOAP web service call using C#.

On the other hand if your're using SharePoint 2013 you should know, that SOAP Web Services is now deprecated. You should be using REST Web Services (or maybe SharePoint CSOM) that is much more simple to consume from C# or JavaScript, than making huge SOAP request.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.