Use AIF to integrate with external systems
Application Integration Framework (AIF) provides an extensible framework that supports multiple asynchronous transports, as well as synchronous transport using Web services, to exchange documents in XML format with external systems.
An exchange starts with a service based on a document, that is, a document class defined using Microsoft Dynamics AX business logic. The document is serialized into XML and header information is added to create a message, which may then be transferred into or out of the Microsoft Dynamics AX system.
Your Microsoft Dynamics AX system is called the local endpoint within AIF. The other entity taking part in an exchange is called the endpoint. Endpoints and all the other elements of an exchange are set up and configured using forms found when you click Basic > Setup > Application Integration Framework.
There are two methods for exchanging data in AIF:
Web services - A data exchange in which a Microsoft Dynamics AX service is consumed an external system.
Adapters - A data exchange in which Microsoft Dynamics AX adapters are used to communicate with the external system. Microsoft Dynamics AX adapters support the following transport mechanisms:
Message Queuing (MSMQ)
Web services-based exchanges
Using Web services for data exchange requires the installation and configuration of Web services for application integration and Microsoft Internet Information Services (IIS) 7.0. Exchanges configured to use Web services are processed synchronously and do not use the Microsoft Dynamics AX queues. AIF allows multiple connections; that is, your Microsoft Dynamics AX system can support the processing of document exchanges with multiple partners simultaneously.
To help ensure the highest level of security, deploy Web services on your intranet only. Deployment of Web services outside your intranet requires additional middleware known as a trusted intermediary to ensure security. For more information about AIF security, see Security considerations for AIF and Security considerations for AIF Web services.
For more information about data exchanges using Web services, see Web services-based exchanges in AIF and Configure document exchanges with Web services in AIF.
An adapter-based exchange uses an adapter to convert the document into the proper format for exchange by means of a particular transport mechanism, such as Message Queuing (MSMQ). Adapter-based exchanges are asynchronous because they involve moving the document into a queue where it waits for processing by a Microsoft Dynamics AX batch job. Adapter-based exchanges require configuration of an adapter and a channel for use by AIF.
For asynchronous, adapter-based exchanges, you configure and control the Microsoft Dynamics AX batch jobs that process documents in the AIF queues.
Microsoft Dynamics AX includes the functionality to enable connections with the following asynchronous adapters:
Message Queuing (MSMQ)
Although adapter-based exchanges are asynchronous, if you use the BizTalk adapter, it is possible to configure the data exchange to be synchronous or asynchronous.
Send and receive documents and data
Regardless of which transport method you use, AIF can be used to either send data into Microsoft Dynamics AX (inbound) or retrieve it (outbound). An example of an inbound exchange would be an external system sending a sales order to be saved to the Microsoft Dynamics AX database. An example of an outbound exchange would be an external system sending a request for a purchase order and receiving the purchase order back. The inbound and outbound exchanges can be categorized as follows:
Send data - Microsoft Dynamics AX sends documents to an external system.
Send data in response to requests - Microsoft Dynamics AX receives requests for documents from another authorized system, retrieves the requested information (a document or a list of documents) from the Microsoft Dynamics AX database, and returns it to the requesting system, with appropriate filtering and security. The request message would contain the entity keys or a query that specifies the data that the external system is requesting.
Receive and create data - Microsoft Dynamics AX receives documents from another authorized system and creates new records in the Microsoft Dynamics AX database.
By using outbound exchanges in AIF, you can send documents and data to your trading partners. You receive documents and data from endpoints in an inbound exchange.
Send documents and data
Sending a document can be initiated by clicking a button on a form, such as the Send electronically button on the Chart of accounts form. For more information, see topics "How to: Send and receive electronic documents automatically" and "How to: Send documents manually" in the Application and Business Processes Help.
Receive documents and data
When documents are received in an inbound transfer, data is added, updated, deleted or changed in the Microsoft Dynamics AX database. For this reason, you should carefully consider how to ensure the security of your Microsoft Dynamics AX system when configuring the Microsoft Dynamics AX users associated with an endpoint. Be sure that endpoint users are trusted by your business organization.