views:

32

answers:

1

I'm starting to experiment with using ActiveMQ (in conjunction with the ActiveMQ.NMS bindings) to support some cross platform RPC messaging that we're looking at doing.

As part of this I'd like to be able to define our RPC contracts in the manner WCF provides - eg.

[ServiceContract]
public interface IUsers
{
    [OperationContract]
    IEnumerable<IUser> void GetByEmail(string email);
}

And I'm looking at contributing to the ApackeMQ.NMS.WCF project to allow this to work, and I have some experience at writing custom bindings so I'm away with that.

However, I'm having trouble with a conceptual issue first with how WCF operates. Obviously at some level a call through a proxy on a client channel for "GetByEmail" must get converted into message and response objects so that they can be serialized. I'd like to be able to know how this works to get a better overall understanding of WCF.

I am unable to find any documentation as to exactly how that is done and indeed which classes within the fairly hefty WCF infrastructure are involved.

Has anyone got any pointers? A top level explanation and/or directions to the classes would be brilliant.

Thanks.

A: 

There is a step before that: How (what format) to use for the serialization?

WCF connects through Bindings, and the configuration of the binding picks a format/protocol.

And 'how' the command is transferred for each protocol? I don't know and I don't think it will be very helpful to dig into that (low level) stuff.

Henk Holterman
Surely what format (the "how") will come after this step? DataContractSerializer which is used in most bindings by default just acts against serializable POCOs. So my inference was that WCF converts a Service/Operation contract into message/response serializable objects under the hood, and then the serializer can step in?
Kieran Benton
WCF delegates this. It is protocol-dependent. The binding classes do this, each in its own manner. You can ask how SOAP serializes a message, but not how WCF does it.
Henk Holterman
Ok, thats fair enough and does make sense. Have you any idea which class is actually doing this for one of the standard bindings so I can reflector it and take a look? Cheers.
Kieran Benton