View All Blog Posts

Synchronising with Dynamics Navision using SOAP Web Services

Using the SOAP Web Service Connector to extract data from Dynamics Navision

SOAP Web services remain a popular method of integration even with the rise of the API and json based integration protocols. Key Microsoft products like SharePoint, Dynamics CRM and others like Navision utilise it as a clean and approachable integration point.

We have two types of connections available when you connect to Navision OData and SOAP. The following article covers extracting data from Dynamics Nav using the SOAP Web Services connection however you can see our other blog on connecting and integrating with Nav via OAuth.

In previous versions of Dynamics Navision (pre OData) data could be extracted via direct SQL queries, NAV hosted web services, or a combination of the two. In this example we are going to expose the Navision Customer Card (List) as a Web Service in NAV 2009 R2.

Requirements

Before getting started you need to ensure you have the following:

  • Windows 10 or Windows Server
  • Downloaded & Installed Data Synchronisation Studio
  • Access to Dynamics Navision

If you do not have Data Synchronisation Studio you can get a free evaluation edition.

Publish the Web Service

To get started you need to publish the card you want to connect to in Navision.

You need to start by getting the Object ID of the object you are connecting to. For this open the object, in this case the customer card, and go to Help > About this Page. This will open a window that will reveal the Object ID, which for this example is 21 for the customer card.

Then to publish the endpoint, navigate to Administration > IT Administration > General > Web Services.

Web Services

Here you should see a list of active Web Services:

Active Web Services

Click on the New button, set the Object Type to Page and set the Object ID to 21 (the Object ID of the customer card), name the service Customer, and tick the Publish check box.

New Web Service

Get the Web Service URL

One of the issues with this process is when you try and find the web service endpoint url. Typically the format is: http://servername:7047/DynamicsNAV/WS/CompanyName/services

In this case for testing the URL is (if you are not using Simego DS3 then you will have to replace the spaces with %20): http://192.168.1.115:7047/DynamicsNAV/WS/CRONUS International Ltd/services

You can navigate to this URL to display the list of endpoints (Services) available from your Navision Company:

Endpoints

The URL needed for this example is the endpoint (url) pointing to the Customer service. This should look similar to: http://192.168.1.115:7047/DynamicsNAV/WS/CRONUS International Ltd/Page/Customer

This is the endpoint we are going to use in Data Sync to read customer data from Navision.

Connecting to Navision in Data Sync

To connect to your Nav site open Data Sync, click onto the Data Source window and select the SOAP Services Connector.

In the WebServiceURL paste in the Customer service URL: http://192.168.1.115:7047/DynamicsNAV/WS/CRONUS International Ltd/Page/Customer

You can optionally enter in the namespace, it is not necessary but can be added for completeness. If you need a username and password to get to the URL then please enter this in the credentials settings.

Then click OK and you will be presented with the Select Webservice Method dialog. We want to get a list of Customers so navigate though the tree to find and select the ReadMultiple method which returns an array of Customer objects. You do not need to fill in the parameters.

Method

Click OK and Data Sync will create all the necessary columns to read data from the web service.

To check that the data is being retrieved from Navison click onto Preview A in Data Sync.

Preview A

Preview A Results

You can now connect to your target system, which could be another business system, a SQL table or you can just set a simple CSV destination using the Tools > Create CSV file option.

Check the schema map contains all the columns you want to include and then click Compare A > B, Synchronise and Start to synchronise the results.

If you have any questions or would like to learn more please contact us.

| Wednesday, April 30, 2014 |