Overview
Application Integration Framework (AIF) services are used to communicate with external systems or applications. Microsoft Dynamics AX 2012 has the following types of services:
- Document services
- Custom services
- System services
An AIF service can be Inbound or Outbound. An Inbound service is used to send data to an external system while Outbound services are used to retrieve data.
This tutorial will guide you in creating Document Inbound AIF services for Microsoft Dynamics AX 2012.
Document services are XML documents that initiate transfer of data into or out of Dynamics AX. Any entity in AX can be represented as Documents, such as Customers or Sales Orders.
Document services are used when we have to execute complex CRUD (Create, Read, Update, Delete) operations on an entity.
Pre-requisites
- Microsoft Dynamics AX 2012
- AIF services must be installed and configured on IIS
Scenario
As part of this tutorial, the service will return the list of Item IDs in Dynamics AX
Steps
- Document service uses an AOT query to generate
related artifacts. For this tutorial, InventTable query will be used - Open Microsoft Dynamics AX Development workspace. Go to Tools à Application Integration FrameworkàCreate document service
- This will open the AIF Document Service Wizard.
Click Next to proceed - In this step, specify the Document parameters. Select the Query for which service has to be created. TheDocument name will default to Query name. Modify it as required and give a suitable Document label as shown below. Click Next
- Now specify the Code generation parameters. The wizard will use this to create the respective classes.
Check the required Service operations you want to be automatically created by the wizard. Click NextNote: To allow Update/Delete/Create Service operations, the Update property must be set to Yes - In the Generate code window, review the artifacts that will be generated. Click Generate to proceed
- The wizard will now generate all the artifacts. In the end, a Completed screen will display the list of artifacts it created. Click Finish to exit the wizard
- The next step is to create a service group and deploy the service to an Inbound Port
- Go to Service Groups, right click on it, and select New Service Group
- Name it InventServiceDemoGroup
- Set AutoDeploy to Yes (so the service will start automatically when AOS is started) and set the
Description to Item Id service - Right click the newly created service group and select New Service Node Reference
- In the newly created service node, set the Service property to InventTableDemoService. The Name property will automatically default to the Service name
- Now right click the service group and select Deploy Service Group
- A success message will appear if the service group is successfully deployed
- To verify, go to System administration à Setup à Services and Application Integration Framework à Inbound ports
- The Service group name InventServiceDemoGroup will appear here as Port name with a green tick mark. This shows that the service group is deployed and active. If a red cross mark is present, select Activate from the action pane to activate the port
- The WSDL URI is the URL of the service which can be used by external systems to access the service
No comments:
Post a Comment