When consuming a service, the first thing you need to do is create a reference to the service. As this can no longer be done in Microsoft Dynamics AX, we have to use Visual Studio. So, we'll do that, but first we'll examine the service that we are going to consume.
To show you how Microsoft Dynamics AX 2012 enables developers to consume web services, we are going to use an example zip code service. This service is available on the website of RESTful web services: http://www.restfulwebservices.net/servicecategory.aspx.
In the zip code service, we have two operations available to use when referencing the WCF version; these are as follows:
GetPostCodeDetailByPostCode
: This operation takes a zip code as a parameter and returns aPostalCode
data contract with all of the information aboutPostalCode
we searched forGetPostCodeDetailByPlaceName
: This operation takes names as parameters and also returns aPostalCode
data contract with the...