Sending XML message to MSMQ

aviavi Member Posts: 3
edited 2004-11-23 in Navision Attain
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.

Comments

Sign In or Register to comment.