Dynamics NAV Integration via SOAP Web Service Connector

30 April 2014

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.

Navision (NAV) SOAP Web Services

Data can be extracted from Dynamics NAV via direct SQL queries and NAV hosted web services or a combination of the both. In this post I wanted to highlight that you can extract data from Dynamics NAV using the DS3 SOAP provider and the steps needed to achieve this.

In this example we are going to expose the Navision Customer Card (List) as a Web Service in NAV 2009 R2.

Expose / Publish the Web Service

From within NAV navigate to Administration -> IT Administration -> General. Then Click on the Web Services List item link

Web Services

You should see a potentially empty list of Web Services or a list of active Web Services:

Web Services

Click on the New button, Set the 'Object Type' to 'Page' and select the Object ID to 21 and name the Service Customer and tick the Publish tick box.

New Web Service

Creating the Correct Webservice 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 my case for testing (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 open this URL and it will display the list of endpoints (Services) available from this company:

Endpoints

The most important URL is the endpoint (url) pointing to the Customer service:

http://192.168.1.115:7047/DynamicsNAV/WS/CRONUS International Ltd/Page/Customer

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

Connecting to the Web Services using DS3

(Skip down to the animated Gif if you want to see how this is done)

  1. Start DS3, click the Data Source A green button and select the SOAP Services Connector.

  2. in the WebServiceURL paste in the Customer Service URL:

http://192.168.1.115:7047/DynamicsNAV/WS/CRONUS International Ltd/Page/Customer

  1. Enter in the Namespace (this is not necessary but I like clean and Tidy).

  2. If you need a username and password to get to the URL then enter it in the credentials settings.

  3. Click OK and you will be presented with the Select Webservice Method dialog. We want to get a list of Customers so we navigate and select the ReadMultiple which returns an array of Customer objects. We do not need to fill in the parameters.

Method

  1. Click OK and DS3 will create all the necessary 'plumbing' to read data from the webservice.

  2. Click on the Preview A button to check whether we can retrieve the data from Navison's Webservice.

Preview A

Preview A

  1. You can now choose to connect it to another systems or just set a csv destination source using the Tools Create csv file -> Compare A->B and synchronise.

Connect

Contact us if you have any questions as we are happy to demonstrate the power of DS3.

| |