You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Protocol Buffers
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:
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.
Kenton Varda
unread,
Nov 9, 2009, 8:37:16 PM11/9/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Dan, Protocol Buffers
You want: com.google.protobuf.Descriptors.FileDescriptor.buildFrom()
Dan
unread,
Nov 10, 2009, 8:22:17 PM11/10/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Protocol Buffers
Yes! That works, thanks.
> > Java Implementation.- Hide quoted text -
>
> - Show quoted text -