Yes! That works, thanks.


On Nov 9, 8:37 pm, Kenton Varda <ken...@google.com> wrote:
> You want:  com.google.protobuf.Descriptors.FileDescriptor.buildFrom()
>
>
>
> On Mon, Nov 9, 2009 at 5:25 PM, Dan <lozi...@gmail.com> wrote:
>
> > Im trying to write the following client/server exchange using the Java
> > Protobuf API:
>
> > 1) Client makes a request to the server
> > 2) Server creates a series of Messages all of the same type to stream
> > back to the client.  The type of the messages will be different
> > depending on the parameters of the client's request.
> > 3) The Server streams the messages back to the client in the following
> > format:
>
> > <Descriptor Size>
> > <MessageDescriptor (as a DescriptorProto message)>
> > <Message Size>
> > <Message>
> > <Message Size>
> > <Message>
> > ...
>
> > 4) (This is where I'm stuck) The client makes a csv file from the
> > results by reading the field names from the DescriptorProto to use for
> > the header and iterates through the fields of each message to write
> > the records.  It looks like DynamicMessage should give me what I need
> > but I can't figure out how to convert the DescriptorProto object to
> > the Descriptor object.
>
> > Note: I know this approach of sending just the DescriptorProto for the
> > messages cannot possibly work if the message has any fields that are
> > of a Message Type that are not nested but for my use case I know that
> > fields of the messages returned will always be a primative type.  Even
> > using the approach described in the techniques section of the wiki of
> > sending an entire FileDescriptorSet I still have the same problem of
> > converting the Proto objects to the proper framework objects.  I've
> > seen in previous posts how to do this using the C++ API but not the
> > Java Implementation.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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