Sending XML message to MSMQ

avi
Member Posts: 3
I have used MSMQ and NAS to receive messages from an external .Net application into Navision. Using a XML DomDocument Automation variable, I can easily extract the incoming XML wrapped message from a receive queue.
Now I need to do the reverse communication, i.e. send an XML message back to the external application. If I use the following code, the message sent to the queue is in plain text format.
TempStr := 'TEST';
OutStr := OutMsg.GetStream();
OutStr.WRITE(TempStr);
OutMsg.Send(0);
where the variables are:
Name DataType Subtype
OutMsg Automation 'Navision Communication Component version 2'.OutMessage
OutStr OutStream
TempStr Text
Can anybody please tell me how to wrap the string TempStr into XML format so that the external application can extract it properly?
Thanks,
Avi.
Now I need to do the reverse communication, i.e. send an XML message back to the external application. If I use the following code, the message sent to the queue is in plain text format.
TempStr := 'TEST';
OutStr := OutMsg.GetStream();
OutStr.WRITE(TempStr);
OutMsg.Send(0);
where the variables are:
Name DataType Subtype
OutMsg Automation 'Navision Communication Component version 2'.OutMessage
OutStr OutStream
TempStr Text
Can anybody please tell me how to wrap the string TempStr into XML format so that the external application can extract it properly?
Thanks,
Avi.
0
Comments
-
Hi,
Check out 'Talking With Navision: Say Hello to Navision and Expect Navision To Be Polite' article at MSDN:
http://msdn.microsoft.com/library/defau ... vision.asp
It has the code you need.http://www.NaviTools.com
Documentation for Microsoft Navision
E/R diagrams, Workflow diagrams, UML diagrams, process diagrams0 -
Thanks a lot. Its a great article, solved my purpose.
Avi0 -
Too bad it is the only onehttp://www.NaviTools.com
Documentation for Microsoft Navision
E/R diagrams, Workflow diagrams, UML diagrams, process diagrams0
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