tags:

views:

46

answers:

1

I am analyzing a BizTalk application (aka orchestration) that is communicating with a WCF service by MSMQ. I was wondering why one of the WCF service implementations has a MsmqMessage as a parameter in the service method. I was expecting a contract type T instead of a MsmqMessage.

This is not really binding agnostic, because the WCF service method holds a specific MSMQ type.

Is this really neccessary to have a MsmqMessage binding type when communicating from a BizTalk app to a WCF MSMQ service ?

This is the current code:

public void SaveDocumentASync(MsmqMessage<MyDocument> msg)
{
}

I want this:

public void SaveDocumentASync(MyDocument msg)
{
}
A: 

As far as I remember, the reason for this is that you're using MsmqIntegrationBinding, not the NetMsmqBinding. MsmqMessage<T> gives you access to the MSMQ message properties (both on the send and the receive) which can be useful on a lot of scenarios.

tomasr