Consuming custom services in SOAP
Dynamics 365 for Finance and Operations also allows us to consume web services on the SOAP endpoint. The main advantages of using SOAP protocol is its descriptive definition, which helps us identify the contracts, proxy classes, and service methods.
Usually, the SOAP endpoint is deployed at https://<host_uri>/soap/Services/<service_group_name>
.
In this recipe, we will consume our same custom web service at the SOAP endpoint.
Getting ready
In this recipe, we will get the balance of a customer and verify that it is the same in Dynamics 365 for Finance and Operations. Our code is inspired by solutions at https://github.com/Microsoft/Dynamics-AX-Integration/tree/master/ServiceSamples. So, we will use the Soap Utility solution provided by Microsoft to get our SOAP endpoint address and binding element. Get the help of the NuGet Package Manager Console to install the Microsoft.IdentityModel.Clients.ActiveDirectory
library.
How to do it...
- Create a console...