You are on page 1of 2

AIF

AIF stands for Application Integration Framework, which uses services to expose x++ code to third party
application and make them use of AX functionalities from their end using XML over various transport
media.

AIF is based on different key concepts which are as follows,

1. Types of Services
 Custom Services – These are simple and complex services developed by developers.

 Document Services – These services are generated using the wizard and is Use for
supporting any medium to complex integration scenario involving entities.
 System services - Fixed and cannot be updated

2. Types of Communication mode


 Synchronous mode – In this mode of communication, response is tightly coupled with
request i.e. you should not request a new query until unless you last request has been
fulfilled.
 Asynchronous mode – In this mode of communication, response is not tightly coupled
with request.

3. Types of ports
 Inbound port – These ports are used for flow of data in Microsoft Dynamics AX from
outside world
 Outbound ports – These ports are used for flow of data from AX to outside world.

Ports are of further two types-


Basic and Enhanced
Basic ports are developer defined ports which are deployed directly from AOT.
Enhanced ports are user define custom ports which are created from inbound ports directly,
these ports provides extra functionalities such as adding adapter of our choice etc while in Basic
ports the type of adapter is always NetTCP adapter based.
Procedure:

1. Add Service operation class with runon property to Server.


2. Add “SystemEntryPointAttribute” on top of the methods which you want to be published as
services.
3. In AOT, go to services node and create a new service. Set class name property to your
service operation class.
4. Add service operation by right clicking the service node, this enlists all the methods of the
class which are eligible to be published as services.
5. Next, in the service group node create a new service group and add your newly created
service to this service node.
6. Again, right click the service and addins > register service.
7. On service group, right click > Deploy service, this will create a new inbound basic port in
inbound ports form (System administration > setup : Services and AIF > inbound).
8. Copy the URI of the created port.

To consume service

1. Create a visual studio project, right click the solution and click : Add service reference.
2. Paste the copied URI and click Go, this will list the operation published through the port. i.e.
the methods of your service class.
3. Write C# code to use the service then.

You might also like