There is a framework for this. ICE (ZeroC), protocol buffers, etc.
For example, my protocol buffer implementation (protobuf-net) runs on mono, MS.NET, CF, Silverlight, etc., and the binary format is compatible with various languages (java, etc.). If you start with .proto (custom definition language), you can use it to create an object layer in each language you want.
source share