Create EDI to XML mapping

  1. Start Altova MapForce and insert the EDI message type ORDERS from EDIFACT.Nanonull (no sample file needed).
  2. On the menu, click Insert > XML Schema/File and select the newly created ORDERS.xsd file.
  3. When prompted to provide a sample file, click Skip.
  4. Select Envelope as the root element.
  5. In the Altova MapForce design window, use mouse to draw a connection line from Envelope on the left side to Envelope on the right side. MapForce connects matching child nodes automatically.

    Mapping EDI to XML
  6. On the menu, click File > Generate code in > C# (Sharp).
  7. As a target directory, select D:\EDI\CustomSchemas\EDIFACT.Nanonull\ORDERS.
  8. Click OK to create the source code.

    The Messages area shows when the source code is created.

  9. Close MapForce. No need to save anything.
  10. Open an administrator command prompt in the folder D:\EDI\CustomSchemas\EDIFACT.Nanonull\ORDERS.
  11. Run the batch job compile.bat with the folder name as a parameter:
    compile.bat D:\EDI\CustomSchemas\EDIFACT.Nanonull\ORDERS

    Visual Studio is not necessary for the task, the batch job uses tools included in .NET Framework.

    Source code files are deleted and replaced with an executable, mapping.exe.

You now have all files needed for importing the ORDERS folder into KC Plug-In as a new EDI type.