FS 338924 C-EPOD - NAV 2016 Export Interface

From Calidus HUB





Aptean Logo.png







AEL

C-EPOD - NAV 2016 Export Interface


CALIDUS EPOD

1st December 2016 - 0.1
Reference: FS 338924












































Functional Overview

Client Requirement

An interface is required direct to NAV 2016 from CALIDUS EPOD without the use of a proxy, utilising the new Webservice created in NAV 2016 for this purpose.


Solution Overview

Several changes are required to the Export process and database to allow this:

  • Due to the length of the webservice method specification, the database must be modified to allow this length of data.
  • A new XF type of NAV must be created.
  • The Auto Export process must be modified in several ways to work with the NAV webservice, keyed on the new NAV export type.
  • Certification rules must be modified to be more inclusive and configurable when using SSL with an invalid certificate.


Scope

This export type is expected to work solely with NAV webservices.


Set-up

Pre-requisites

Menu Structure

Data

An EPOD_XF_CONFIG entry must be made for the Site, as follows:

Field Value
EPL_XF_CONFIG_ID AEL
EPL_DESCRIPTION EPOD-NAV
EPL_XF_TYPE SOAP
EPL_XF_DESTINATION https://nav16.in2grate.co.uk:7167/AELEPODUP/WS/A%26E%20Leisure%20Ltd./Codeunit/GetNAVData
EPL_XF_ID NAV
EPL_EXPORT_FULLHEADERS N
EPL_WEB_PARAMETER xmlStrIn
EPL_WEB_USER NAV-DEV\EPOD
EPL_WEB_PASSWORD eP0DUs3r
EPL_SOAP_ACTION urn:microsoft-dynamics-schemas/codeunit/GetNAVData:ReturnNavDataAsXml
EPL_SOAP_NS urn:microsoft-dynamics-schemas/codeunit/GetNAVData
EPL_SOAP_NS_PREFIX nav
EPL_XF_DIRECTION O
EPL_XF_RECIPIENT
EPL_EXPORT_JOB_TYPES CD
EPL_XF_MSG_TYPE
EPL_EXPORT_FORMAT
EPL_IMAGE_TYPE
EPL_TIFF_COMPRESSION
EPL_FILENAME
EPL_EMAIL_ERRORS
EPL_INCLUDE_CSV_HEADER
EPL_CONTRACT_OPERATION ReturnNavDataAsXml
EPL_SOAP_VERSION text/xml; charset=utf-8

Note Note: The settings above are for the NAV 2016 development server. The exact configuration of the AEL server will be determined at a later date.


A new XF ID of value "NAV", Description "NAV2016" will be added to EPOD_LIST_ITEMS for the ListID of the ListName "XFConfigID"


Functional Description

Database

Table EPOD_XF_CONFIG field EPL_SOAP_ACTION will be increased in size to 100 characters.

All database procedures relating to this table and field will be modified to allow the data to be read.


The two instances of EPOD_UTILS will be changed to increase the maximum length of the EPL_SOAP_ACTION field to 100 characters.


Note Note: As the site is used as the XF Config ID, this will be picked up by the existing database package EPOD_JOB_GROUP_CONFIGS, which will ensure that that the messages are sent. No check is made on the XF ID (Type) being JOB, so no further changes are necessary. However, if in the future this change is made, NAV ID must be treated the same as JOB ID.


Admin

The Admin screen Import/Export Interface (xf_config.aspx) will show the "NAV" XF ID in the drop-down list of values, due to the changes made to the EPOD_LIST_ITEMS data shown above.

This screen will be modified to recognise that NAV IDs are to be treated the same as JOB IDs.

Furthermore, this screen will be modified to ensure that the length of the Soap Action field can be up to 100 characters. This should already be achieved through the changes to EPOD_UTILS shown above.


Auto-Export

A new key should be added to the app.config file of the AutoExport application, in section appSettings:

<add key="ValidateCertificates" value="N"/>

EPOD_SYS_EXPORT.TrustAllCertificatePolicy should be changed to return true.

This deprecated class should be removed and replaced with a call to

   ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, errors) =>
       { 
       if (ConfigurationManager.AppSettings.Get("ValidateCertificates")!=="Y")
           {
           return true;
           }
           else
           {
           return errors == System.Net.Security.SslPolicyErrors.None; 
           }
       };

In this way, if the app config file is configured for not validating certificates, which is the default processing, or the app config is not configured for this at all, the default behaviour will be that the application will trust all certificates. Only if the key is explicitly set to "Y" will the application validate the certificate of the server being connected to, to ensure authenticity.


EPOD_SYS_EXPORT requires a specific function to structure the message for NAV only, including a result parameter. This needs to be fairly generic in form.

In EPOD_SYS_EXPORT.createSoapEnvelope:

  • when adding Content to SoapRequest, first check EPOD_XF_CONFIG.EPL_XF_ID. If not set to "NAV", the code should do as now. If set to "NAV", the Content should be surrounded in CDATA tags e.g.
SoapRequest += "<![CDATA[" + Content + "]]>";
  • After closing the EPL_WEB_PARAMETER tag, check EPOD_XF_CONFIG.EPL_XF_ID. If set to "NAV", the code should add a new result parameter e.g.
SoapRequest += "<" + EPOD_XF_CONFIG.EPL_SOAP_NS_PREFIX + ":result />";


The configuration as specified in this document will result in a web request as follows:

Web Request Headers:

SOAP envelope:

   <?xml version="1.0" encoding="utf-8"?>
   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
       xmlns:nav="urn:microsoft-dynamics-schemas/codeunit/GetNAVData">"
   <soapenv:Header>
   </soapenv:Header>
   <soapenv:Body>
       <nav:ReturnNavDataAsXml>
           <nav:XmlInData><![CDATA[
               ... content ...
           ]]></nav:XmlInData>
       </nav:ReturnNavDataAsXml>
       <nav:result />
       </soapenv:Body>
   </soapenv:Envelope>

This will be sent to https://nav16.in2grate.co.uk:7167/AELEPODUP/WS/A%26E%20Leisure%20Ltd./Codeunit/GetNAVData

If the data is correct and processed correctly in NAV, the response will be as follows:

   <Soap:Envelope xmlns:Soap=\"http://schemas.xmlsoap.org/soap/envelope/\">
       <Soap:Body>
           <ReturnNavDataAsXml_Result 
               xmlns=\"urn:microsoft-dynamics-schemas/codeunit/GetNAVData\">
               <xmlStrIn>
                   <NAV_RECEIPT RESULT=\"ACK\">
                   <SUCCESS>ePOD Job:SHP000008=Web Request processed successfully </SUCCESS>
                   </NAV_RECEIPT>
               </xmlStrIn>
           </ReturnNavDataAsXml_Result>
       </Soap:Body>
   </Soap:Envelope>

The existing check on the return value need not be changed, as it checks solely on whether the returned string contains RESULT="ACK", which this string does.


Appendix A: TEST PLAN

Test Script / Scenario ReferenceC-EPOD - NAV 2016 Export InterfaceCall Number(s): 338924
Test Script / Scenario DescriptionTest the new NAV2016 export.PASS / ISSUES / FAIL
Menu AccessN/A 
Pre-requisitesNoneTested By:
 
Test ObjectiveTo test that: the export can be configured; the Admin system works as expected and; the export works as expected.Date:
 



Step Action Result Remarks P/F
1 Admin screens      
  None      
1.01 Open all affected screens, namely Site, Job Group and XF Config. These screens open without errors.    
1.02 In XF Config, choose to Add a new configuration. Check the ID. The ID should allow NAV2016 to be selected.    
1.03 Select NAV2016 and type SOAP. All expected fields are allowed to be entered, as if this were a JOB ID and type SOAP.    


Step Action Result Remarks P/F
2 Auto-Export      
  Configure XF Config to a test system.      
2.01 Complete a job that is present in NAV2016. Run AutoExport. Check the XF Audit. The message should be sent once successfully.    
2.02 Cancel a job that is present in NAV2016. Run AutoExport. Check the XF Audit. The message should be sent once successfully.    
2.03 Complete a job that will cause an error in processing in NAV2016, (to be confirmed by the NAV team). Run AutoExport. Check the XF Audit. The message should be marked as failed.    
2.04 Change the configuration to point to an invalid webservice. Complete a job. Run AutoExport. Check the XF Audit. The message should be marked as failed.    


Appendix B: Quote & Document References

Cost Details
Activity Estimate
No. of Days
No. of Days Rate per Day (£) Cost (£ Exc. VAT)
Requirements 0.00 0.00 0 £0.00
Change Request Evaluation 0.00 0.00 0 £0.00
Functional Specification 0.50 0.50 0 £0.00
Technical Specification 0.00 0.00 0 £0.00
Development 2.50 2.50 0 £0.00
Testing and Release 0.75 0.75 0 £0.00
Implementation 0.25 0.25 0 £0.00
Project Management 0.25 0.25 0 £0.00
 
TOTAL 4.25 4.25   £0.00
Estimate excludes training, release to live and go live support.

B.1 References

Ref NoDocument Title & IDVersionDate
1Reference10.101/01/2011


B.2 Glossary

Term Definition
EPOD Electronic Proof of Delivery. The OBS EPOD system is CALIDUS ePOD.
CALIDUS eSERV The OBS mobile system to complete Service functionality in the field. This is part of the CALIDUS ePOD system.
PDA The mobile device on which the C-ePOD system will run in the field. This can be a Phone, EDA or industrial PDA, running Android.
DAL Data Access Layer. A mechanism for accessing data by the system that is removed from the application, allowing for simplified access and providing protection to the data, as only approved DAL methods can be used to modify it.
GPS Global Positioning System. A mechanism of retrieving accurate positioning information in the form of Latitude and Longitude (Lat-Long) co-ordinates from a device.
GPRS, 3G, HSDPA, Data Service All terms referring to mobile device network connectivity, and the speed at which the device connects to the internet.


B.3 Authorised By


Barry Preece

OBSL Project Manager
_____________________________

Lorraine Harris

I2G Project Manager
_____________________________