Perhaps it is obvious in MS world, apologies just in case. There are lots of references to this article: MSMQ, WCF and IIS: getting them to play nicely (part 1 of 3).
What I am struggling with is that the only method in service contract is SendMessage. And implementation of this method is on service side, while I would expect client to be sending messages, and service receiving them via listener. Does this mean that SendMesage method will be called by IIS/WAS/Net.MsmqListener(?) as soon as it discovers a message in a queue defined by endpoint?
And if so then message is passed as as string and not as object of System.Messaging.Message
public void SendMessage(string message)
The way I am "sending" message to this queue from my client is roughly like this:
Message m = new Message();
m.Recoverable = true;
m.Body = myxmlargs.ToString();
MessageQueue q = getQueue();
q.Send(m);
I got my implementation working and here's what I learned along the way: