I have an MSMQ that receives XML format messages from various sources. I have a WCF endpoint (using MsmqIntegrationBinding) that I want to receive these messages. I defined the following:
[ServiceContract(Namespace = "http://TestApp.MSMQService", ProtectionLevel = ProtectionLevel.None)]
[ServiceKnownType(typeof(String))]
public interface IMsmqReceiverService
{
[OperationContract(IsOneWay = true, Action = "*")]
void SubmitQueueMessage(MsmqMessage<String> msg);
}
Hoping that would receive any XML message, however it only receives messages formated:
<?xml version="1.0">
<string>message</string>
For various reasons we don't know, and don't want to know, the schema of the xml message, getting it into a String would be sufficient. How can I define an endpoint that recieves XML messages with any nodes that arrive on the queue regardless of the schema used in the message?
Additionally, given a String buffer containing the XML of a message, how can I put that onto a MSMQ using System.Messaging.MessageQueue.Send without it getting wrapped in additional xml?