NAV Widgets NAV Server Configuration

 

NAV 2009 Server Setup

To use NAV Widgets (either the Desktop Applications, or NAV Widgets for IOS (iPhone and iPad), your NAV server requires minor configuration and can be summarized into 4 steps:

  1. Bullet Configure the NAV Server for NTLM Security

  2. Inventory Item Widget Web Service to Publish (Desktop App) Insure that Microsoft Dynamics NAV Business Web Services are Running

  3. Customer Widget Web Service to Publish Publish the Web Services that the Widget you desire to use requires.

  4. Customer Widget Web Service to Publish (Desktop App) Insure that the device that you execute the Widget on has network access the NAV Business Web Services.

Microsoft Dynamics NAV Business Web Services service needs to be running and one Navision Web Services need to be registered.


NAV 2009 Server Configuration for NTLM Security

NAV Widgets uses NTLM security for user authentication.  The NAV server needs to be configured to allow NTLM authentication. To do this,  you need to change a value in CustomSettings.config. Akey” in this file called WebServicesUseNTLMAuthentication needs to be set to True. Setting this key to True will allow the Web Services listener will only use NTLM.

The config file you need to modify is placed in the directory where the Service Tier executable is and is called CustomSettings.config. The section you are looking for is:

<!--
  Turns on or off NTLM authentication protocol for Web Services
      false: Use SPNEGO

true: Use NTLM only
-->
   

<add key="WebServicesUseNTLMAuthentication" value="true"></add>

Verifying NAV 2009 Server Web Services Availability


You should verify that the Web service is available to consumers. Start the Microsoft Dynamics NAV Web services service, and then browse to the WSDL document to ensure that your Web service is available.

Note

When exposing a Web service, you must open the port for consumers of your Web service to access it. The default port is set to 7047 and can be configured in the

CustomSettings.config file on the Microsoft Dynamics NAV Server computer. For more information,

see Configuring Microsoft Dynamics NAV Server.


To start the Microsoft Dynamics NAV Business Web Services service

1.Click Start on the computer running Microsoft Dynamics NAV Server, point to All Programs, point to Administrative Tools, and then click Services.

2.Right-click Microsoft Dynamics NAV Business Web Services, and then click Start on the shortcut menu.

3.Close the window.

If the service is already running, you must restart it. For information on starting, stopping, and configuring Windows services, see How to: Configure Windows Services.

To verify availability of the Web service

1.Start Internet Explorer.

2.In the Address field, enter the following address where the keys are replaced with the values that are specified in the CustomSettings.config file: http://<Server>:<WebServicePort>/<ServerInstance>/WS/<CompanyName>/services. An example WSDL URL is:
http://navserver.yourcompany.com:7047/DynamicsNAV/WS//services
3.  The page should list the Web services that you have published.

Close the browser.


Publishing the Web Services NAV Widgets require

Each Widget in the NAV Widgets collection (including the iPhone / iPad versions) relies on certain web services being registered and published.  For example, the Customer Widget requires Page 21 (Customer Page) be registered and published as a Web Service.  To register and publish Page 21 (Customer Page) as a web Service, perform the following.


1.Open the RoleTailored client and connect to a company.  In the demonstration, this would be CRONUS International Ltd.

2.In the navigation pane, click Departments, click Administration, click IT Administration, click General Setup, and then click Web Services.

3.In the Web Services page, click New.

4.In the Object Type column, select Page, and then enter 21 in the Object ID column and CustomerCard in the Service Name column.  Note:  The iPhone / iPad version of the widgets currently require the service name to be CustomerCard.  The Desktop Applications however use this as thedefault, NAV Widgets looks for services names for each Web Service as listed below.  In the desktop application version of NAVWidgets, it is not mandatory that the Service Names match those in this document, However, if you use different service names, you will have to enter those names in the Desktop Application: Nav Widgets preferences.

5. Click to insert a check mark in the Published column.

6. Click OK to exit the New - Web Services page.

  1. 7.Repeat for the other services that NAV Widgets utilizes: See examples below.


The iPhone / iPad NAVws:Cust App uses the Customer Card Page, and the Contact Card Page. The Service Names must be set to CustomerCard and ContactCard (case sensitive).  See example below:

Inventory Item Widget Web Service to Publish (Desktop App)


The iPhone / iPad NAVws:Test App only uses the Customer Card Web Service, and the Service Name must be set to CustomerCard (case sensitive).  See example below:

NAV Time Entry Widget Web Service to Publish (Desktop App)


For the Desktop Application version of NAV Widgets, here is a breakdown of Widgets, and which web services they utilize.  If for example you only will utilize the customer widget, then only the web services that the customer widget utilizes will be necessary to publish. 

    Customer Widget

  1. NAV Production Order Widget Web Service to Publish (Desktop App)

  2. Codeunit 50190 is optional and will allow calculated balance information and statistics to be displayed with the Customer Information.  This Code Unit must be given the same service name that was given to Page 21 (CustomerCard in the above example) and published should not be checked.


    Inventory Item Widget



  1. Codeunit 50190 is optional and will allow calculated information and statistics to be displayed with the Item Information.  This Code Unit must be given the same service name that was given to Page 30 (ItemCard in the above example) and published should not be checked.

  2. Yes, it is the same codeunit as used in the Customer Widget, it is ok to have the same object exposed with different service names, multiple times.

    Job Time Entry Widget



  1. Codeunit 50190 is optional and will allow a resources UOM’s to be presented as options when entering time..  This Code Unit must be given the same service name that was given to Page 76 (ResourceCard in the above example) and published should not be checked.

   Production Order Widget



  1. Codeunit 50190 is Required and provides a number of functional logic to this widget. This Code Unit must be given the same service name that was given to Page 99000815 (ProductionOrderList in the above example) and published should not be checked.


  2. What is code unit 50190 and where do I get it?

  3. The Code Unit is named NAVWidgetA and contains a number of supporting functionality for the widgets.  You can request the code unit from me.


  4. The service names listed in the example tables are the names that NavWidgets uses by default to access the web services. The names do not have to match, but you will need to configure the NavWidgets desktop application to look at a different name if they do not.  If you were using all four of the currently available widgets, your web services table would look like what is presented below.












Network Access to NAV Web Services

The device that is executing the widget must have network access to the NAV server that Web Services is running on.  For the iPhone / i Pad versions, that only which to use the App with an “inside the firewall WIFI connection, the setup is the same for any client that would be accessing NAV via the role tailored client.  If you will be using the cellular data network, or a WIFI connection outside your firewall, then you have a few options based on your company’s security preferences:

1. VPN, the iPhone has support for VPN connections to your network.  You would then set the app settings the same as your inside the firewall settings.  The app will use the VPN connection to resolve your servers address and establish communication with the server.

  1. 2.Develop and deploy a proxy service that emulates the web service operations necessary and accesses the NAV server behind the firewall, passing the results back as if the server was called directly.  You wold then configure the app to use the proxy server and port you define.

  2. 3.Open firewall access to the web services port on your NAV server (normally 7047) to allow external access to it.  (For security reasons, this is not recommended.)