wcf - Does MsmqIntegrationBinding support multiple service operations -


i'm learning msmqintegrationbinding. samples , guidelines i've seen far covering scenario where, there 1 operation 1 data contract. tried add contract , service started successfully. cannot figure out how reach second operation. such thing possible binding?

[servicecontract] [serviceknowntype(typeof(data1))] [serviceknowntype(typeof(data2))] public interface isampleservice {     [operationcontract(isoneway = true, action = "*")]     void operation1(msmqmessage<data1> msg);      [operationcontract(isoneway = true)]     void operation2(msmqmessage<data2> msg); }  public class sampleservice : isampleservice {     [operationbehavior(transactionscoperequired = true, transactionautocomplete = true)]     public void operation1(msmqmessage<data1> msg)     {         var data = msg.body;     }      [operationbehavior(transactionscoperequired = true, transactionautocomplete = true)]     public void operation2(msmqmessage<data2> msg)     {         var data = msg.body;     } } 

calling code

var queue = new messagequeue(@".\private$\samplequeue"); var body = new data1() { data = "some data" }; var message = new message(body); message.label = "some label"; queue.send(body, messagequeuetransactiontype.single); 

this fire operation1 has action set "*".

this interesting question.

the action operationcontractattribute used wcf stack populate ws-addressing soap headers. it's use overridden in way queued bindings.

it possible there undocumented feature of wcf allows mapping of msmq message headers operation based on action attribute acting filter, if there don't know form take.

i think simplest explanation is: no, it's not possible, , reason msmqintegrationbinding says on tin: it's interop on functionality.

because forced call operation msmqmessage wrapper kind of makes binding semantically one-dimensional, , lends theory intended wrap single endpoint operation support interop legacy com , activex clients.

anyhow, there's no law saying binding must support multiple operations, bindings don't support callbacks, , others one-way operations.

appreciate doesn't answer question directly.


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -