Hi experts,

I have a bunch of WCF services which use DataContracts in their
interface. We tried using the built-in serializer in NETCF and
encountered that it is really bad in performance in deserializing
larger pieces of data :(
So we went to look into  protbuf-net...

But I am not sure how I should use it on the NETCF side. Things seem
to work fine on the WCF 'server' side (using
Serializer.Serialize<List<Product>>(ms, products.ToList());) and the
data gets transferred to the NETCF client.
But if I then try to do this in the NETCF client:
   var p = Serializer.Deserialize<List<Product>>(responseStream);

I get this exception:
---
ProtoBuf.ProtoException was unhandled
  Message="Mismatched group tags detected in message"
  StackTrace:
       at ProtoBuf.SerializationContext.EndGroup(Int32 tag)
       at ProtoBuf.Serializer`1.Deserialize[TCreation](SimpleWrapper&
instance, SerializationContext context)
       at ProtoBuf.Serializer`1.DeserializeChecked[TCreation]
(SimpleWrapper& instance, SerializationContext source)
       at ProtoBuf.SerializerSimpleProxy`1.Deserialize(List`1& value,
SerializationContext source)
       at ProtoBuf.Serializer.Deserialize[T](SerializationContext
source)
       at ProtoBuf.Serializer.Deserialize[T](Stream source)
       at NETCFClient.MainForm.getProductsEx_Click(Object sender,
EventArgs e)
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.ButtonBase.WnProc(WM wm, Int32 wParam,
Int32 lParam)
       at System.Windows.Forms.Control._InternalWnProc(WM wm, Int32
wParam, Int32 lParam)
       at Microsoft.AGL.Forms.EVL.EnterMainLoop(IntPtr hwnMain)
       at System.Windows.Forms.Application.Run(Form fm)
       at NETCFClient.Program.Main()
---

Well, of course DataContracts do not exist in NETCF so I went along
and generated XmlSerializer-compatible types for the NETCF app with
the netcfsvcutil.exe tool.
And obviously protbuf-net can not handle this now...

What should i do? :)
Thanks!

-Christian

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to