What is the cleanest way to process queue messages calling an XML Port


I’m developing a connection between Navision and another application. For this I developed a webservice that sends an XML file to a MSMQ. Then NAS will get the message and process it to Navision. I’ve done a couple of projects within this area but the problem is that I never used XML Ports. Now I’m working with NAV 4 and the way of processing messages in Navision is very different from 3.7(What I used to work with). I have 2 specific questions:

  1. Can I use as XML Port object that I created to import an XML(from the message queue with same structure) into the fields and tables specified in the object with having to make any code? How?

  2. From the moment that codeunit ApplicationManagement::NASHandler function runs what should be the following development architecture considering I want to use the same architecture used by the standard application?

Note: The purpose is to use XML Port to insert the data into tables “Purchase Header” and “Purchase Line”

Thank you

Yes, you can use xmlport. For example see XMLPORT 99008503 - Inbound Purchase Invoice. This object is used by communication between Navision and Biztalk.

Final architecture is related to client version and purpose of final application.