Hi, I’ve been trying to get MSMQ Bus Adapter to work with XML Port instead of MSXML DOM automation objects but I seem to have a problem with detection of the End of stream. The problem is as follows: Code:
ComCom::MessageReceived(VAR InMessage : Automation "''.IDISPATCH") InMsg := InMessage; InS := InMsg.GetStream(); InXMLPort.SETSOURCE(InS); InXMLPort.IMPORT;
For this code snippet I get an XML Parser error that the text/xml portion cannot exist more than once. I suspected that the stream is not closed properly and is read repeatedly by the XMLPort import. The same code works fine if I substitute the last two lines with XMLDom.load(InS); where XMLDom is a MSXML DOM automation object. I tried loading the stream into a BigText variable and this caused Navision to get into a loop and eventually to crash due to lack of memory (the memory was quickly increasing until it took up all of my RAM). So has anybody seen a similar situation or has anybody succeded in loading a MSMQ stream into an XMLPort ? Nikolai