Last Updated: 5 February 2020
This simple, dependency injection compatible client makes it easier to consume legacy XML web services. Soap versions 1.1 and 1.2 are supported. With the exception of Microsoft's HttpClient object, everything else has an interface so you can use your favourite DI framework to inject in the dependencies. SoapClient implements IDisposable.
var sc = new SoapClient(new HttpClient(), new RawBodySerializer(), new SoapHttpRequestBuilder(), new PayloadStripper(), new BodyDeserializer()); var request = new YourRequestDto(); var response = sc.PostAsync<YourRequestDto, YourResponseDto> (new Uri("some-url/blah"), request, "defaultnamespace", "action", SoapVersion.Soap12);