Options

Problem in sending an XML File from Navision to MSMQ

subhastersubhaster Member Posts: 64
Hi ,
I met with an error , the moment , I send and XML file from Navison to MSMQ.
For this I am using the following code :-
CLEAR(CC2); 
CLEAR(MqBUS); 
CREATE(CC2); 
CREATE(MqBUS); 
CC2.AddBusAdapter(MqBUS,1); 
MqBUS.OpenWriteQueue('.\Private$\fromNavision',0,0); 
MqBUS.SenderAuthenticationLevel:= 2; 
OutMsg := CC2.CreateoutMessage('Message queue://'); 
IF ISCLEAR(XMLDom) THEN 
CREATE(XMLDom); 
XMLDomMgmt.SetNormalCase; 
XMLProccesingInst := XMLDom.createProcessingInstruction('xml','version=''1.0'' encoding=''windows-1252'''); 
XmlNode := XMLDom.appendChild(XMLProccesingInst); 
CLEAR(XmlNode); 
XmlNode := XMLDom.createElement('Description'); 
XmlNode.text:='Red Ribbons'; 
XMLDom.appendChild(XmlNode); 

OutS.WRITE(XMLDom.documentElement); 
OutMsg.Send(0);

When i run this code, it is showing me an error :
You have used an invalid data type , and on running the debugger , the break point was found to be coming at
OutS.WRITE(XMLDom.documentElement);

can u please suggest me , what change should i make in my code ?
thanks in advance ,
Subhasish Chakraborty,
Systems Analyst,
MBS Dynamics.

Comments

Sign In or Register to comment.