DerrickBrayanClayton / protobuf-net

Automatically exported from code.google.com/p/protobuf-net
0 stars 0 forks source link

WCF duplex passing array of objects; null at client #28

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I've got a wcf duplex callback that is passing an array of objects like so:

       [OperationContract(IsOneWay = true), ProtoBehavior]
       void Foo(SomeType[] data); // is a valid [DataContract] with Order

My problem is the visualUpdates is getting set to null on the client
side.  They don't seem to be getting deserialized no matter what I do.

Original issue reported on code.google.com by marc.gravell on 10 Nov 2008 at 7:21

GoogleCodeExporter commented 8 years ago
Related to [DataMember] and offset; add a DataMemberOffset to NET30 
[ProtoContract]?

Original comment by marc.gravell on 27 Nov 2008 at 6:47

GoogleCodeExporter commented 8 years ago

Original comment by marc.gravell on 26 Jun 2009 at 7:27

GoogleCodeExporter commented 8 years ago
Priority low? protobuf-net simply isn't making the crucial differentiation 
between an empty array and a null array during serialization - the array is 
always null after deserialization. This seems to be a serious defect.

Original comment by MattJHow...@gmail.com on 19 Nov 2010 at 11:04

GoogleCodeExporter commented 8 years ago
The underlying protobuf format (beyond my control) simply does not have a null 
construct, so while there are *workarounds* here, it isn't something that I can 
address directly.

Original comment by marc.gravell on 19 Nov 2010 at 2:00

GoogleCodeExporter commented 8 years ago
Wouldn't it be more valid to let it return an empty array then instead of null, 
considering that protobuf doesn't support 'null'? 

Seems the more logical thing to do here.

Original comment by w...@mylemans.com on 4 Jul 2011 at 9:35

GoogleCodeExporter commented 8 years ago
that is what v2 does

Original comment by marc.gravell on 4 Jul 2011 at 11:20

GoogleCodeExporter commented 8 years ago
A long gap, I know, but I *believe* that this is fixed in r469

Original comment by marc.gravell on 2 Nov 2011 at 9:53