Contact Us 1-800-596-4880

Upgrading and Migrating Microsoft Dynamics NAV Connector to Version 4.0

Upgrade Anypoint Connector for Microsoft Dynamics NAV (Microsoft Dynamics NAV Connector) from version 3.x to version 4.x.

Supported Upgrade Paths

From Version To Version

3.x

4.x

Changes in This Release

4.0

  • This connector is now compatible with Java 17 only.

  • The SOAP stack now uses Apache CXF 4.2.4 and the Jakarta XML Bind, XML Web Services, JWS, and SOAP APIs. Applications that depend on Apache CXF 3 or the Java EE JAXB, JAX-WS, JWS, or SAAJ packages must be re-verified. Operation names and the nav configuration prefix are unchanged.

  • The NTLM and OAuth connection types now include optional Response Timeout and Response Timeout Unit fields on the Advanced tab. The default response timeout is 5000 milliseconds. Expressions aren’t supported for these fields.

    For more information, see NTLM Connection Type and OAuth Connection Type.

  • The JAXB-XJC external library for the NTLM and OAuth connection types is now org.glassfish.jaxb:jaxb-xjc:4.0.9. Version 3.x used com.sun.xml.bind:jaxb-xjc:2.3.9.

  • These libraries are upgraded to address reported security vulnerabilities:

    • The Apache CXF library is upgraded to version 4.2.4.

    • The JAXB runtime and XJC libraries are upgraded to version 4.0.9.

    • The Jakarta XML Bind API is upgraded to version 4.0.5.

    • The Apache Commons Lang library is upgraded to version 3.21.0.

  • These libraries are added to address reported security vulnerabilities:

    • The Jakarta XML Web Services API is added at version 4.0.3.

    • The Jakarta XML SOAP API is added at version 3.0.2.

    • The Jakarta JWS API is added at version 3.0.0.

    • The SAAJ implementation is added at version 3.0.6.

    • The Bouncy Castle libraries are added at version 1.86.

Requirements

Ensure your system meets the following compatibility requirements before you perform the upgrade:

Application/Service Version

Mule runtime

4.9.0 and later

Java

17

Microsoft Dynamics NAV

  • 2013 R2

  • 2015

  • 2016

  • 2017

Upgrade Prerequisites

Before you perform the upgrade, you must:

  1. Create a backup of your files, data, and configuration in case you need to restore to the previous version.

  2. Ensure that your environment meets the version 4.x requirements, including Java 17 and Mule runtime 4.9.0 or later.

  3. Re-verify applications that depend on Apache CXF 3 or the Java EE JAXB, JAX-WS, JWS, or SAAJ packages.

  4. Update the JAXB-XJC external library to org.glassfish.jaxb:jaxb-xjc:4.0.9 for the NTLM and OAuth connection types.

  5. Install Microsoft Dynamics NAV Connector 4.x to replace the connector operations that were previously included in version 3.x.

Upgrade Steps

Follow these steps to perform the upgrade from Microsoft Dynamics NAV Connector 3.x to Microsoft Dynamics NAV Connector 4.x:

  1. In Anypoint Studio, create a Mule project.

  2. In the Mule Palette view, click Search in Exchange.

  3. In the Add Dependencies to Project window, enter dynamics nav in the search field.

  4. In the Available modules section, select Microsoft Dynamics NAV and click Add.

  5. Click Finish.

  6. Verify that the mule-microsoft-dynamics-nav-connector dependency version is 4.x.x in the pom.xml file, where x.x is the minor release and patch version number. For example, if you are upgrading to version 4.0, the dependency version in the pom.xml file should be 4.0.0.

Studio upgrades the connector automatically.

Verify the Upgrade

After you install the latest version of the connector, follow these steps to verify the upgrade:

  1. In Studio, verify that there are no errors in the Problems or Console views.

  2. Check the project pom.xml file and verify that there are no problems.

  3. Test the connection and verify that the operations work.

Troubleshooting

If there are problems with caching the parameters and caching the metadata, try restarting Studio.

Revert the Upgrade

If it is necessary to revert to the previous version of Microsoft Dynamics NAV Connector, change the mule-microsoft-dynamics-nav-connector dependency version in the project’s pom.xml file to the previous version.

You must update the project’s pom.xml file in Anypoint Studio.

Send SOAP Requests in XML Format

To support Microsoft Dynamics NAV Connector in CloudHub 2.0, the client must provide SOAP requests in raw XML format instead of using Plain Old Java Objects (POJOs).

Follow these steps to send or receive SOAP requests in raw XML format:

  1. Make sure you have the prerequisites, such as Mule 4.9.0 or later, and obtain the WSDL file.

  2. Identify all Mule flows that use Microsoft Dynamics NAV SOAP operations.

  3. For the request body, update the content type to application/xml and provide SOAP requests in raw XML format instead of using POJOs.

    Page Operation Configuration

    XML for sending SOAP requests directly:

    <item:Read xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:item="urn:microsoft-dynamics-schemas/page/item_card">
          <item:No>1000</item:No>
       </item:Read>
    Transform message of Page Operation

    XML for using the DataWeave transform method to convert JSON to XML payload:

    <ee:transform doc:name="Transform Message" doc:id="52c376d8-70de-44b3-b388-4837f0790795">
           <ee:message>
               <ee:set-payload><![CDATA[%dw 2.0
       output application/xml
       ---
       {
           Read @("xmlns": "urn:microsoft-dynamics-schemas/page/item_card"): {
               No: 1000
           }
       }]]></ee:set-payload>
           </ee:message>
       </ee:transform>
  4. For the response body, you will receive SOAP responses in raw XML format and must handle these responses accordingly.

    XML of a SOAP response:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:item="urn:microsoft-dynamics-schemas/page/item_card">
       <soapenv:Header/>
       <soapenv:Body>
          <item:Read_Result>
             <item:Item>
                <item:No>Returned_1000</item:No>
                <item:Description>Returned_Awesome_Product</item:Description>
                <item:UnitPrice>100.00</item:UnitPrice>
             </item:Item>
          </item:Read_Result>
       </soapenv:Body>
    </soapenv:Envelope>

    XML for using the DataWeave method to transform XML payload:

    <ee:transform doc:name="Transform Response">
        <ee:message>
            <ee:set-payload><![CDATA[%dw 2.0
    output application/java
    ns soapenv http://schemas.xmlsoap.org/soap/envelope/
    ns item urn:microsoft-dynamics-schemas/page/item_card
    ---
    payload.soapenv#Envelope.soapenv#Body.item#Read_Result.item#Item
    ]]></ee:set-payload>
        </ee:message>
    </ee:transform>