Chapter 3. AIF Document Services

When we think of services, we typically think about exposing business logic or consuming it. In many cases, though, it is business data that needs to be exchanged. With Microsoft Dynamics AX 2012, the preferred method to exchange business entities is using document services.

In this chapter, we will discuss the AIF document services and learn about the components that make up a document service. By the end of this chapter, you will be able to create, deploy, and consume such a service.

The following topics are covered in this chapter:

  • Document services: We start by explaining why you would need document services in Microsoft Dynamics AX 2012.
  • Key components: There are some components that are specific to document services. It's important to know what these components are and what their role in the concept of services is, so we will discuss their functions in detail.
  • Creating a document service: You will learn how to create a document service and how to configure and deploy the service using an enhanced integration port.
  • Consuming a document service: After we have deployed a document service, we will consume it using a .NET WCF application and look at how change tracking can help us in some scenarios.

Introducing document services

If you've worked with Microsoft Dynamics AX for a while, you will know that it contains many tables with a lot of data. These tables can be related to each other to form logical entities such as sales orders. Tables not only contain fields, indexes, and relations, but they also contain code that handles business logic such as initialization, validation, and manipulation of data. When you send data from Microsoft Dynamics AX, especially when you receive data from external systems, you want to make sure that all of the business logic contained in the tables and entities is executed so that the data is consistent. It would be troublesome to have to code all of this yourself when creating a service. Fortunately, AIF solves this problem by providing a framework and the tools to create these services.

So what are these tools and components? This is exactly what we will discuss next.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.173.242