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.
0
Comments
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.
Documentation for Microsoft Navision
E/R diagrams, Workflow diagrams, UML diagrams, process diagrams
Avi
Documentation for Microsoft Navision
E/R diagrams, Workflow diagrams, UML diagrams, process diagrams