Working with SOAP
Unlike REST, which is an architectural style, SOAP is a protocol. It is perhaps reasonable to compare working with SOAP to importing a .NET assembly (DLL) to work with the types inside. As a result, a SOAP client is much more strongly tied to a server than is the case with a REST interface.
SOAP uses XML to exchange information between the client and server.
In Windows PowerShell, the command New-WebServiceProxy
was made available to make it easier to work with SOAP services. Using a SOAP service in Windows PowerShell is more like using .NET types. The calls made to the web service are hidden from the user.
New-WebServiceProxy
is not available in PowerShell 6 and higher; this section explores writing SOAP requests directly based on a Web Services Description Language (WSDL) document, which describes the XML requests and responses that the service expects.
Finding a SOAP service
SOAP-based web APIs have become quite rare, and they are much less...