need help about MSMQ

subhastersubhaster Member Posts: 64
Hi everyone.....
this is a problem regarding retreieving messages from MSMQ . Firstly to receive messages from MSMQ , do we necessarily need the NAS running ? I mean has NAS got anything to do with MSMQing ?
Secondly, I have made a single instane codeunit called "Receive Xml" where I have written :-


OnRun()
CREATE(MQBus);
CREATE(ComCom);
MQBus.OpenReceiveQueue('.\Private$\MyQueue',0,0);
ComCom.AddBusAdapter(MQBus,1);

InsertMSMQXML(xmlItemNode : Automation "'Microsoft XML, v3.0'.IXMLDOMNode")
IF MSMQTestData.FIND('+') THEN
vIntNo:=MSMQTestData."Entry No."
ELSE vIntNo:=0;
MSMQTestData.INIT;
MSMQTestData."Entry No." := vIntNo + 1;
MSMQTestData.TextValue := xmlItemNode.firstChild.firstChild.nodeValue;
MSMQTestData.INSERT;

ComCom::MessageReceived(VAR InMessage : Automation "''.IDISPATCH")
InMsg := InMessage;
Instr := InMsg.GetStream;
CREATE(XmlDom);
XmlDom.load(Instr);
XmlDom.save('C:\');
MESSAGE('Message Successfully stored');
InsertMSMQXML(XmlDom.documentElement);


where MSMQTestData is a table with following fields :-
I. Entry No. : data type : integer
II.TextValue : data type : Text.
Unfortunately nothing is happening when I am running the codeunit .
Even the Queue that I have created (MyQueue) is a non-transactional one.
Please suggest me any probable solution what is wrong with code ?
Subhasish Chakraborty,
Systems Analyst,
MBS Dynamics.

Comments

Sign In or Register to comment.