CC2::MessageReceived(VAR InMessage : Automation "''.IDISPATCH") // get the xml message InMsg := InMessage; InS := InMsg.GetStream(); // import xml into Navision XMLPort.IMPORT(50010, InS);I got the XMLParser error. I tried to save the InS to file to see what went wrong, but it went on and on, duplicating the original message in infinite loop. Can anyone help me how to use XMLPort.IMPORT with the XML message from the MSMQ?
Comments
Note that XMLPorts cannot update records, only import new ones. You have to program your XMLPort to handle that separately. Make sure that the records in your sample file are all new records.
Check out codeunit 99008518 for more examples of how Commerce Gateway uses XMLPorts.
RIS Plus, LLC