MSMQ import to navision

Red_sweRed_swe Member 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

  • SteveOSteveO Member Posts: 164
    Is your codeunit set to SingleInstance?
    Just have to ask :wink:
    This isn't a signature, I type this at the bottom of every message
  • Red_sweRed_swe Member Posts: 4
    yepp tried it both on and off
  • DenSterDenSter Member Posts: 8,307
    Navision can't read from a transactional Message Queue. The MSMQ you are reading from must be non-transactional.
Sign In or Register to comment.