Deploying service references with Dynamics Ax 2009

Service references are are great feature in Dynamics Ax 2009 and using WCF with Ax is now really easy. But unfortunately it is not easy to deploy this service reference. If you now need to deploy a service reference from the development environment to the evaluation environment, or from the evaluation to the production environment, there is no functionality that will automate this. In order to keep all your modification, I would suggest the following procedure:

  1. Make a backup of the app.config of your referenced service
    You will find the app.config in the
    <Dynamics application>\Appl\<instance name>\ServiceReferences\<your reference>
    directory
  2. Export the reference in a xpo-file
  3. Change the WSDL location in this xpo file (if the service has a different Url on the new environment)
  4. Import the xpo file on the new platform
  5. Generate the proxy.
  6. Copy the app.config (from your backup) into the directory of the new referenced service.
    <Dynamics application>\Appl\<instance name>\ServiceReferences\<your new reference>