I would like to use the MsmqIntegrationBinding to integrate with existing MSMQ system. The serialization it provides works well but wrapping data contracts with MsmqMessage seems redundant. Do I really need to contaminate the service contract with MSMQ concern when all I care about is the message contract

That's what I have right now

[OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = true)]
public void Operation1(MsmqMessage<Data1> msg)

That's what I would like to have

[OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = true)]
public void Operation1(Data1 msg)

Alternatively I could try to use netMsmqBinding but I don't know how to make it work with the right XML schema.

有帮助吗?

解决方案

Unfortunately yes, using the msmqIntegrationBinding means that you must use the MsmqMessage wrapper. I agree it's not great but that's the way it works.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top