Book Image

Microsoft Dynamics AX 2012 R2 Services

Book Image

Microsoft Dynamics AX 2012 R2 Services

Overview of this book

Table of Contents (17 chapters)
Microsoft Dynamics AX 2012 R2 Services
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Visual Studio development


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.

Introducing the USA zip code service

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 a PostalCode data contract with all of the information about PostalCode we searched for

  • GetPostCodeDetailByPlaceName: This operation takes names as parameters and also returns a PostalCode data contract with the...