XMLPorts and the MSMQ Bus Adapter

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

nstoev: I just recently worked with the XML Ports within Navision for a Web Service, and I ran into an issue in which the XMLPort would not export a <!DOCTYPE> node after the root node was established…an example is as follows: <?xml verison="1.0"?> <!DOCTYPE=“Somedoctypestuff”> No matter what I did, I could not get !DOCTYPE to show because the XMLPort desginer would not allow for multiple roots. If I recall correctly, a MSMQ looks as follows: <?xml version="1.0"?> 5 9 Based upon this, I would expect it to work. Is there any way that you can intercept the MSMQ and view to see what the XML data is that is being passed to Navision? You could just create an OUTSTREAM to a file and then paste it to this thread…