AIF Setup from scratch

Below example describes all steps how to create XML file based on tables in Ax with AIF (Application Integration Framework).

First Step is create table (‘s) and the related query.

Setup index properties on the table.

Create a query object in the AOT, and select the used fields  , or change the datasource field property ‘dynamic’ to ‘yes’. In that case all fields of the query are selected.

Set “Update” property of the data source to “yes”.

 

 

 

 

 

 

Run the AIF Document Service Wizard.

Or start the AIF Document Service Wizard.

In the AIF Document Services Wizard menu, insert the name of the query and enter document name. Click ‘next’.

In the next screen, enter class name (Service classname, Document object class name and AxdClassName), service operations and eventual AxBcGeneration parameter.

Now click the ‘generate’ button.

System displayed the elements created.

In the AOT we can see the elements created

 

 

 

 

 

 

 

 

 

Go to : System Administration |  Service and Application Integration Framework | Inbound ports.

 

 

 

 

 

 

 

 

 

Here we crate a the new servicegroup. Give it any name for example “AIFPorts”. Enter a “Port name”. At “Address” select the adapter “File system adapter” and give the inbounds URL.  Enter also an adapter and URL for the response address. Example see below screendump.

At button “Service operations”  select the  service “ create” operation (service name operator with suffix .create )

Select the button “data policies” to select the fields of your choice.

Check the name space of the service group in the table AIFService.

Check the document’s namespace in the table AIFSchemastore .

Now we are ready to generate the XML file. Open Visual Studio and select File | New | File.

 

 

 

 

 

 

At ‘Installed Templates’ select option ‘General’. Here we select template ‘XML’.

 

 

 

 

 

 

Save the XML file, for example in the inbound folder.

 

 

 

 

 

 

 

Analyze XML file:

When the ( incremental ) CIL is successfully done, we can run the AIF service by job.