[protobuf] TypeModel.DeserializeType(value) Exception Message request.

2011-10-11 Thread Lex
Hi, We have recently started using protobuf-net for some serialization tasks that we have. Our particular problem is that our serialized objects can live for possibly weeks at a time before we need to de- serialize them. In the mean time we may need to re-factor some of the namespaces of the

[protobuf] Re: Contribution: C++Builder Compiling

2011-10-11 Thread Scott Saad
A quick status update on this effort: - I forked the source at GitHub under the protobuf-cppbuilderhttps://github.com/saadware/protobuf-cppbuilderproject. - The biggest overarching changes revolved around namespaces. These changes were minimal but touched many files. - Main cause

[protobuf] How to dynamically parse protobuf with extension messages

2011-10-11 Thread prem
On one machine, serialized a Message2, which has been extended from Message1. The parameters in Mesage2 were set using setExtension API. Did writeDelimitedTo to write to a byte outpurstream. Then ran protoc --include_imports --descriptor_set_out=message2.desc -- java_out=message2.proto On the

[protobuf] Re: How to dynamically parse protobuf with extension messages

2011-10-11 Thread Benjamin Wright
It sounds like you're working in Java. In Java you need to create, setup, and then provide an ExtensionRegistry 1) The way you do this is you create a new one... final ExtensionRegistry extensionRegistry = ExtensionRegistry.newInstance(); 2) then register any extensions you

Re: [protobuf] TypeModel.DeserializeType(value) Exception Message request.

2011-10-11 Thread Marc Gravell
In standard use, protouf-net is fully contract based and doesn't care what *types* are involved; this only matters if you are using the DynamicType option (which is outside the core protobuf stuff). If the types aren't stable, there is an event on the TypeModel that can be used to map in both

[protobuf] Re: A bit more protobuf help please

2011-10-11 Thread Benjamin Wright
Dale - sounds like you figured it out, but the quick answer anyway (for anyone else listening...) The code I provided expects that the Descriptor files you have are created with the --include_imports directive provided to protoc... which means that all the imported files will be included in the

[protobuf] XML or XSD to .proto files

2011-10-11 Thread Jerry
Is there an existing tool for generating .proto files, or protobuf Messages themselves, from XML or an XSD ? If no such tools exist in wide use, what would be a good starting point for rolling my own .proto file generator? Meaning, what API's or Utils in the protobuf lib might facilitate the

[protobuf] ParseFromArray or ArrayInputStream+ParseFromZeroCopyStream?

2011-10-11 Thread Jim Hunziker
Is there a difference between using ParseFromArray and using ParseFromZeroCopyStream on an ArrayInputStream? For a plain buffer of data, is the behavior different when using these two methods? Also, is it necessary to call Next() in a loop when using ArrayInputStream+ParseFromZeroCopyStream? --

[protobuf] Re: A bit more protobuf help please

2011-10-11 Thread Dale Durham
Thanks again for all your help Benjamin!!! I just got it all working and would still probably be tinkering without your help. Dale On Oct 11, 9:52 am, Dale Durham geny...@gmail.com wrote: Never mind, I figured it out. My descriptor files are named differently. So when the dependency list is

Re: [protobuf] Trying to create a new message from command line input

2011-10-11 Thread Christopher Head
What seems to be the problem? I just created a simple test case that seems to work perfectly. My proto file looks like this: CUT HERE message Outer { message Inner { required int32 foo = 1; } optional Inner inner = 1; } CUT HERE My C++ source file looks

[protobuf] Re: How to dynamically parse protobuf with extension messages

2011-10-11 Thread prem
Thanks for the info. this solution requires the Class MyMesage be present on the receiving side. I was trying to just use the description-out file created by the protoc tool. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this

[protobuf] Re: How to dynamically parse protobuf with extension messages

2011-10-11 Thread Benjamin Wright
In that case I recommend you browse through my recent discussion with Dale Durham as I walked him through the process of using the FileDescriptorSet's that are created when you compile using the -- descriptor_set_out flag to protoc or can obtain from another runtime that has access to compiled

[protobuf] Re: How to dynamically parse protobuf with extension messages

2011-10-11 Thread prem
Thanks, that was the missing part, got it working with the desc file, without the need for the MyMessage class. on the way with the above code I got error: java.lang.IllegalArgumentException: ExtensionRegistry.add() must be provided a default instance when adding an embedded message extension.