MSMQ import to navision

Red_swe
Red_swe Posts: 4
Hi im trying to import a XML file from MSMQ but nothing is happening, im only trying to verify that the code is picking up something...anything. the MSMQ itself is working and contains messages, any suggestions???
CREATE(MQBus);
CREATE(CC2);
CC2.AddBusAdapter(MQBus,1);
MQBus.OpenReceiveQueue('Curie\Private$\mp3.com',0,0);
MESSAGE('started');

CC2::MessageReceived(VAR InMessage : Automation "''.IDISPATCH")

InMsg := InMessage;
Ins := InMsg.GetStream();
CREATE(XMLDoc);
IF XMLDoc.load(Ins) THEN
MESSAGE('working')
ELSE
MESSAGE('not working');
ERROR(XMLDoc.parseError.reason);

Comments