Integrating with SOAP web services in .NET Core

Magnus Stuhr
Compendium
Published in
5 min readApr 2, 2019

--

SOAP (Simple Object Access Protocol) is a messaging protocol specification for exchanging structured information in the implementation of web services, by using the XML Information Set as its message format (source: https://en.wikipedia.org/wiki/SOAP). The messages can go through a variety of application layer protocols, for instance HTTP(s).

This blog post will have a look at how we can start of with a WSDL (Web Services Description Language) file, generate C# code from it by importing it into our .NET Core project, how to configure a basic-authentication over HTTPS for the web service, and finally explore different pitfalls that can be encountered when trying to integrate with the web service programmatically.

1 Install Microsoft WCF Web Service Reference Provider in Visual Studio

The first thing we need to do is to make sure the Microsoft WCF Web Service Reference Provider is added as an extension. It should be installed by default in Visual Studio 2017, and should leave you with an option of “Connected Service” when right-clicking on your project and hovering over the “Add” option drop-down.

2 Generate code from a WSDL file

--

--