Send XML File from MSMQ to Navision

I’m trying to make a connection between a website and navision v3.70 using MSMQ. This works fine with text files, I can send and receive text files but now I want to use XML files and it doesn’t seem to work. This is the C/AL code for receiving XML files, does anybody know what the problem is. Comcom::MessageReceived(VAR InMessage : Automation “’’.IDISPATCH”) InMsg := InMessage; InStr := InMsg.GetStream; CREATE(XMLDom); XMLDom.load(InStr); InsertMSMQXML(XMLDom.documentElement); ---------------------------------------------------- Globals Comcom /Automation/ ‘Navision Communication Component version 2’.CommunicationComponent MQBus /Automation/ ‘Navision MS-Message Queue Bus Adapter’.MSMQBusAdapter InMsg /Automation/ ‘Navision Communication Component version 2’.InMessage XMLDom /Automation/ ‘Microsoft XML, v5.0’.DOMDocument XMLNode /Automation/ ‘Microsoft XML, v5.0’.IXMLDOMNode InStr /InStream This is the function that inserts a record when the XML file is imported. InsertMSMQXML(xmlCustomerNode : Automation “‘Microsoft XML, v5.0’.IXMLDOMNode”) MSMQTestData.TextValue := xmlCustomerNode.firstChild.firstChild.nodeValue; IF NOT MSMQTestData.INSERT THEN REPEAT MSMQTestData.“Entry No.” := MSMQTestData.“Entry No.” + 1; UNTIL MSMQTestData.INSERT