Consuming an external service

In Dynamics AX, external services can be used in a variety of scenarios for retrieving information from external providers. This could be currency exchange rates, address information, logistics data, and many others. Such external services can be consumed directly from X++ code, with the help of Visual Studio.

In this recipe, we will demonstrate how external services can be consumed from X++ code. For demonstration purposes, we will use the service created in the Creating a custom service recipe, and we will assume that this service is an external service.

How to do it...

Carry out the following steps in order to complete this recipe:

  1. In Visual Studio, create a new Visual C# Class Library project named ExtSrv.
  2. Add a new ...

Get Microsoft Dynamics AX 2012 Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.