I'm new to WCF and Protobuf. So recently I upgraded the version of protobuf library used in our WCF service to version 3.0.101. I've a WCF client which uses an older version of Protobuf library, 2.0.0.668.
When the server and the client are on two different versions of protobuf library (which should be supported?), my service is misbehaving, as it is getting null values in all the parameters of the invoked contract. When both are using the same version, everything works fine. The situation remains the same when client in on new version and server is on older version of Protobuf library. (I want this use case to be working).
How to make the WCF service and client talk to each other (if possible, without being needed to upgrade either)?
So I decided to do a network trace to see the difference between the transmitted soap messages, what I found is, lets say when the client is on older version of Protobuf library, it sends all primitive data-types like string,long etc in a plain soap envelop (xml tags), but any complex object types are transmitted by encoding it in a protobuf tag. So when both the client and server are on the same versions, they are able to deserialize these transmitted values correctly. But when they are on different version, it is unable to deserialize any soap message with mixed tags (proto and vanilla), and I'm getting null is my method parameters.
On the other side, when client is on a newer version and the server is on the old version, the client sends primitive data types encoded in a proto tag, which the server does not deserializes properly (getting Null value in the parameter).
My method (contract) is quite simple where it accepts a string argument, and returns an object .