Im working on a project using web services to retrieve data from Navision. It’s builit in .Net using System.Messaging on the web services side and CC2 in Navision, communicating via MSMQ. Everything works fine, requests are sent to Nav and answers come back.
The thing is that the web services will be running in many instanses using the same message queue. To make sure the correct message is read from the queue I have to be able to identify my messages from Nav and match them with the sending intance.
Having two .net apps in both ends this is a simple task: when you send a message it gets an id which you can save on the sending side. On the recieving side I use the message Id to set the Message.CorrelationId for the response message. Last, on the sending side I just wait for a message in the queue that have Correlation Id that match my send message id.
Now to my question! Can I do something similar in Nav. How do I get the messageId from a message? And can I set a correlation Id when sending a message to a queue?
If you something about this or have used another solution for the problem, please tell me.