[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 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 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.