Consuming external web services
Dynamics 365 for Finance and Operations supports consuming external web services by writing a simple wrapper class on the external web service endpoint in Visual Studio and adding its reference Dynamics 365 for Finance and Operations project.
Getting ready
For this code walkthrough, we will take a free online web service for a currency converter. You can find the WSDL at http://currencyconverter.kowabunga.net/converter.asmx
How to do it...
- Add a new
Class Library
and name itExternalWebservices
:
- Add a service reference under the
References
node of our newly created project. Use the following service http://currencyconverter.kowabunga.net/converter.asmx.
Give a name CurrencyConverterServices
in the namespace.
- By clicking on the
Go
button, the system will fetch and show all the available services and operations in this web service, as follows:
Click on the OK
button.
- It will add a new node in your project service reference.
- Check the
app.config
file. It should look as...