Receive Xml from MsMq

Hi, I have successfully send the xml to the queue at server, my code is here : CREATE(CC2); CREATE(MqBus); CREATE(Xmlout); CC2.AddBusAdapter(MqBus,1); MqBus.OpenWriteQueue(‘ESGCOM\private$\myque’,0,0); MqBus.SenderAuthenticationLevel:= 2; OutMsg := CC2.CreateoutMessage(‘Message queue://ESGCOM\private$\myque’); OutS := OutMsg.GetStream(); Xmlout.load(‘c:\Item.xml’);; OutMsg.Send(0); CLEAR(CC2); CLEAR(MqBus); CLEAR(Xmlout); My Question is how can I receive the xml in msmq ? I have tried the code, but errors found… My code is like this… CREATE(MqBus); CREATE(CC2); CC2.AddBusAdapter(MqBus,1); MqBus.OpenReceiveQueue(‘ESGCOM\Private$\MyQue’,0,0); CC2::MessageReceived(VAR InMessage : Automation “’’.IDISPATCH”) InMsg := InMessage; InS := InMsg.GetStream(); XmlIn.load(Ins); InMsg.CommitMessage(); The error message is like this : “The Automation variable has not been instantiated. You can instantiate it by either creating or assigning it.” Any body find how to solve the problem ? Really thanks in advance.

There are multiple threads about this topic, you should be able to find them when you search with ‘MSMQ’

In the above there is missing a: CREATE(XmlIn); before you run the: xmlIn.LOAD(Ins)