Deploy AIF service to production


We are an AX 2009 shop. The consultants deployed a few AIF services years ago. They haven’t been refreshed since.

We’ve customized our sales order tables quite a bit afterwards. I would like to refresh the services in the production to expose the new fields.

I know I can update the service using the wizard. Is there a different way to deploy to ensure that the service we tested with in DEV environment is the same as the service in the production environment?


The Using the AIF Document Service Wizard is generating code, so it’s an equivalent of writing code by hand. Therefore you should handle it in the same way as any other code. Generate the code in a development environment and then use your normal code deployment procedure to promote it to test environments and ultimately to production.

Thanks Martin for the response. I’ve a couple of follow-up questions:

  1. When you run through the “Update wizard,” the schema gets updated automatically. If I deploy XPO (doesn’t have schema) in another environment (stage, prod), how would the schema be updated?

  2. Do I use the objects in the private project to create the XPO?


Can you please elaborate of what you mean by schema and why XPO doesn’t have it?
Also note that XPO files shouldn’t be used for code deployment to production; you should move the whole tested application (by copying layers).

When a new document service is created, the system creates a private project, which has a job with the naming convention GenerateXSDSchema_. The documentation states that this job needs to be executed after creating the service. When I look at the job, it invokes an instance method on the AxdBase class called getSchema, which invokes the instance method AxdBaseGenerateXSD.generate.

If I use the update AIF service wizard, the private project gets updated and the job GenerateXSDSchema_ disappears from it. The system automatically updates the schema (any new columns added to a table are included).

Coming to your question about deploying the whole layer every time – that probably is a best practice we should follow, but so far we haven’t. I wish there was some documentation on deployment best practices. We’ve been deploying individual XPOs to production.

I do see a problem with deploying the whole layer in our company. We’ve DEV, TEST, and PROD environments. Multiple developers share the same development AOS. We are forced to use XPOs going from DEV to TEST so that we deploy just the changes needed and not move others’ changes. We follow the same pattern going from TEST to PROD.

Appreciate any guidance you can give us to improve our situation.