AX 2009 Setup

In this how-to we will go through how you setup an AX 2009 based remote system for integration with a Dynamicweb solution.

This covers the following:

To install the DWService plugin – which exposes the web service that the Dynamicweb Connector communicates with – follow these steps:

  • Import the “DynamicsWebIntegration_DAX2009.xpo” file. In the Import Worksheet window, click “Replace All” button, it will replace all existing objects when importing.
  • Press Ctrl – D. In the AOT go to Services > DWService. Right click on the selected service Add-Ins > Register action. The service is registered.
  • Go to Basic > Setup > Application Integration Framework > Local Endpoints. Add the company and the name of the Local Endpoint. Save and close the form.
  • Go to Basic > Setup > Application Integration Framework > Endpoints. Add the Endpoint ID and bind already created Local Endpoint to it. Clickon the Users Tab and add the Endpoint user – Business Connector User. Save and close the form.
  • Go to Basic > Setup > Application Integration Framework > Services. Press the “Refresh” button on the opened form. Save and close the form.
  • Select the DWService service. Select the “Enabled” check box. Press the “Generate” button on the form. The service’s assembly will be generated.
  • Go to Control Panel\All Control Panel Items\Administrative Tools\. Run the Microsoft Dynamics AX 2009 Configuration utility. Make sure the Axapta Local client and Business connector are pointed to the same AOS server.
  • On the Connection Tab, check the Connect to printer on the server check box (Figure 2.1)
Figure 2.1 Setting up AX 2009
  • Go to Control Panel\All Control Panel Items\Administrative Tools\. Run the Microsoft Dynamics AX 2009 Server Configuration utility. On the Connection Tab set the Allow clients to connect to printers on this server check box (Figure 2.2).
Figure 2.2 Setting up AX 2009
  • Go to Account receivable > Setup > Parameters > AIF Tab. Set the default values for the “Sales tax group”, “Customer group” and a path to the temporary location for generated PDF reports in the corresponding fields (Figure 2.3).
Figure 2.3 Setting up AX 2009

To install the service:

  • Place the DynamicwebConnectorService files where you want them to live – we will use C:\Program Files\DynamicwebConnectorService
  • Locate the installUtil.exe file – it is usually found in the c:\Windows\Microsoft.NET\Framework\vX.X.XXXXX folder, where vX.X.XXXX is the latest version of .NET you have installed. This should be .NET 4.5 or greater
  • Right click on the DynamicwebConnectorService.exe file
  • Select properties, then “unblock”
  • Install the service from the command prompt using installUtil, with the following command: 
c:\Windows\Microsoft.NET\Framework\vx.x.xxxx\installUtil.exe DynamicwebConnectorService.exe

Finally, go to Control Panel > Administrative tools > Services and start the service called DynamicwebService. This exposes the web service to the internet.

The install step will likely require a user that has permission to install the service. If you are on a domain, the user should include the domain. If you are using a user on the local machine, the username should be prefixed with a period and a slash like so: “./Username”

To configure the Dynamicweb Connector, open and edit the .config file located in the DynamicwebConnectorService folder.

<?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="AxConnector" type="System.Configuration.NameValueSectionHandler"/> </configSections> <AxConnector> <add key="AxVersion" value="2009" /> <add key="BindingType" value="BasicHttpBinding" /> <add key="CompanyName" value="ceu" /> <add key="UserName" value="yourAxUser" /> <add key="Password" value="YourAxUserPassword" /> <add key="Domain" value="Dynamic-Systems" /> <add key="AxEndpoint" value="http://YourAxServer/MicrosoftDynamicsAXAif60/DWServicePort/xppservice.svc" /> </AxConnector> <appSettings> <add key="ServiceName" value="DynamicwebService" /> <add key="testMode" value="False" /> <add key="TestOutputFile" value="c:\exportContent.xml" /> <add key="Secret" value="" /> <add key="DebugInfo" value="True"/> <add key="WebserviceURI" value="http://localhost:8090/DynamicwebService"/> <add key="ErpConnectorType" value="AXConnectorAddIn.AxConnector"/> </appSettings> </configuration>

In the AxConnector section you must:

  • Change the username, password and domain to match a user which has access to the NAV web service
  • Point the AxEndpoint to the AX web service

With the appSettings you can:

  • Set testMode to true or false. If set to true, a call to the connector web service will read the content of the file indicated in the TestOutputFile setting
  • Specify a secret, which is used to encrypt traffic between Dynamicweb and the connector. It must be used when setting up scheduled integration tasks in Dynamicweb.

If your AX instance is running on another server/network than your Dynamicweb installation, you must make sure that your network and firewall settings allow connections from the Dynamicweb server to the web service exposed by the Dynamicweb Connector.