MSMQ problem (The stream returned a read error)

SteveO
Member Posts: 164
I am using the Navision Communication Component and the MSMQ bus adapter to read messages off a message queue.
The problem I am experiencing is that the following code:
InMsg := InMessage;
StreamIn := InMsg.GetStream;
CREATE(XMLDOM);
XMLDOM.load(StreamIn); // THIS LINE RIGHT HERE :evil:
causes a message to pop up that states "The stream has returned a read error". The necessary processing still continues and there are no other problems, it's just that this message is very annoying and also the app we are trying to develop is meant to be automatic. ie. The user shouldn't have to keep on clicking on the OK button every time this message pops up.
My OS is Windows 2000 Professional.
Navision Version : 3.01 3.10 3.6 3.7 (Happens in all of them)
XMLDOM is automation server: 'Microsoft XML, v3.0'.DOMDocument30
And I have installed MSMQ components (I suspect the error might be because I am running in WORKGROUP mode???)
This program works fine if I don't read the xml from the stream, ie it is a physical file on my harddrive. (This is not the answer though as we need to read from the stream) Anybody know why this message pops up and how to get rid of it??
Thanks
SteveO
The problem I am experiencing is that the following code:
InMsg := InMessage;
StreamIn := InMsg.GetStream;
CREATE(XMLDOM);
XMLDOM.load(StreamIn); // THIS LINE RIGHT HERE :evil:
causes a message to pop up that states "The stream has returned a read error". The necessary processing still continues and there are no other problems, it's just that this message is very annoying and also the app we are trying to develop is meant to be automatic. ie. The user shouldn't have to keep on clicking on the OK button every time this message pops up.
My OS is Windows 2000 Professional.
Navision Version : 3.01 3.10 3.6 3.7 (Happens in all of them)
XMLDOM is automation server: 'Microsoft XML, v3.0'.DOMDocument30
And I have installed MSMQ components (I suspect the error might be because I am running in WORKGROUP mode???)
This program works fine if I don't read the xml from the stream, ie it is a physical file on my harddrive. (This is not the answer though as we need to read from the stream) Anybody know why this message pops up and how to get rid of it??
Thanks
SteveO
This isn't a signature, I type this at the bottom of every message
0
Comments
-
Hi SteveO,
try the following code snippet ...
InMsg := InMessage;
IF InDOM.load(InMsg.GetStream) THEN
...your processing here ...
else
ERROR(InDOM.parseError.reason);
On the other hand try to use MSXML4 SP2, while this release has several bugfixes inside...
Good luck...
Stefan0 -
Thanks for your reply.
I managed to get the problem sorted out.
I am now using the component that you suggested.
Many Thanks!!This isn't a signature, I type this at the bottom of every message0 -
I am getting the same "The stream has returned a read error" message on my installation.
I've tried installing the NAS on a Windows 2000 box, and a Windows 2003 box. Same results on both. My setup in code does not include a XMLDOM object, so some of the pointers listed further up in this thread seem not to apply. After quite a bit of searching on the Knowledge Base at MBS Partner site and the forums here, I'm still feeling quite stumped.
Any insights would be appreciated. Please let me know if more details for my particular setup are required.Kristopher Webb
Microsoft Dynamics NAV Developer0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions