If you are a well-seasoned ASP.NET Web Service developer you most certainly know about the SoapClient class and how it can be used to send SOAP messages using transport-independent protocols using two main methods:
- The ASP.NET services, which is old way of doing SOA
- The WCF framework, which is the “latest” and “newest” way to do that.
We already talked about these approaches in a couple posts some months ago (read here and here for further info). However, there could be some edge-case scenarios where you want (or need) to call a SOAP-based web service without using the WSDL and/or the Add Service Reference Visual Studio feature, maybe because you can’t possibly put the code bloat it produces into your code base.
When such need arises, the following helper class might be precisely what you’re looking for: