Oh, you want something like DynamicMessage except for services?
DynamicServiceStub, perhaps? There is no such thing included in the
library, but it would be really trivial to write. All you need to do is
implement the Service interface as a wrapper around the RpcChannel
interface. Have GetRequestPrototype() and GetResponsePrototype() return
DynamicMessages, and have CallMethod() just call the RpcChannel's
On Tue, Jun 30, 2009 at 2:03 PM, rthompson.dtisoft....@gmail.com <
> Right, but I'm importing a .proto file at runtime using the Importer
> class. This ultimately leaves me with a ServiceDescriptor. I'd like
> to instantiate that Service from the ServiceDescriptor.
> The python code has a ServiceStubBuilder class. Where is there a
> ServiceStubBuilder in the C++ API?
> On Jun 30, 1:33 pm, Kenton Varda <ken...@google.com> wrote:
> > Yes. In C++ the protocol compiler will generate a service interface and
> > stub implementation when given a .proto file containing a service
> > definition. This is equivalent to what Python's service_reflection
> > does.
> > But this is not an RPC implementation. You still have to add your own
> > networking layer.
> > On Tue, Jun 30, 2009 at 9:26 AM, rthompson.dtisoft....@gmail.com <
> > rthompson.dtisoft....@gmail.com> wrote:
> > > Is there a C++ equivalent to
> > >http://code.google.com/apis/protocolbuffers/docs/reference/python/goo.
> > > ?
> > > which is used to create protocol service and service stub classes from
> > > ServiceDescriptor objects at runtime.
> > > On Jun 29, 3:56 pm, Kenton Varda <ken...@google.com> wrote:
> > > > Protocol Buffers does not include an RPC implementation, only
> > > > interfaces for one. ServiceDescriptor is useful for implementing
> > > own
> > > > RPC system on top of protocol buffers -- it allows you to define your
> > > > services directly in the .proto file even though protocol buffers
> > > > does not provide RPC.
> > > > On Mon, Jun 29, 2009 at 10:15 AM, rthompson.dtisoft....@gmail.com <
> > > > rthompson.dtisoft....@gmail.com> wrote:
> > > > > What can you do with a ServiceDescriptor? Is there a
> > > > > DynamicServiceFactory similar to the DynamicMessageFactory where
> > > > > can instantiate a service when all you have is a ServiceDescriptor,
> > > > > some other equivalent way of doing it?
> > > > > Thanks!
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To post to this group, send email to email@example.com
To unsubscribe from this group, send email to
For more options, visit this group at