I'm a little confused here...

Normally, assuming that this is using the Google implementation, you would
have, in your generated code:

- a generated concrete client proxy
- a generated abstract server stub

The client code would "new" the client proxy (the yellow code). Your server
code would declare a type that subclasses the abstract stub, and register
*that*. You wouldn't need to declare your own client/server core types.
Have you perhaps simply not generated the right client/server stubs?


On Sun, 21 Feb 2021, 16:01 Herbert Falk, <[email protected]> wrote:

> I have the following *.proto file:
>
> package CredentialExchange;
> option go_package = "
> gitlab.com/openfmb/psm/ops/protobuf/go-/CredentialExchange";
> option java_package = "pcitek.CredentialExchange";
> option java_multiple_files = true;
> option csharp_namespace = "pcitek.CredentialExchange";
>
> import "uml.proto";
>
> // The greeting service definition.
> service CredExchangeSend {
>   // Sends a Credential Exchange message
>   rpc Cred (Management) returns (Management) ;
> }
>
> // MISSING DOCUMENTATION!!!
> message sendCredentialsRequest
> {
>     // MISSING DOCUMENTATION!!!
>     bytes encrypted = 1 [(uml.option_required_field) = true,
> (uml.option_multiplicity_min) = 1];
> }
>
> // MISSING DOCUMENTATION!!!
> message Management
> {
>     option (uml.option_openfmb_profile) = true;
>     // Version of the redundancy protocol
>     uint32 version = 1 [(uml.option_required_field) = true,
> (uml.option_multiplicity_min) = 1];
>     // Is a number that can be used to correlate request/responses
>     uint32 messageID = 2 [(uml.option_required_field) = true,
> (uml.option_multiplicity_min) = 1];
>     // Date and Time at which the message was started to be encoded.
>     string utcTimeOfMessage = 3 [(uml.option_required_field) = true,
> (uml.option_multiplicity_min) = 1];
>     // MISSING DOCUMENTATION!!!
>     sendCredentialsRequest sendCredentialsRequest = 4;
> }
>
> I am trying to stage a Client Service for CredExchangeSend.
>
> My current service declaration is:
>
>         public  class CredentialExchangeService
>         {
>             public Task<pcitek.CredentialExchange.Management> rxd(
>                 pcitek.CredentialExchange.Management request)
>             {
>                 PCItek.Redundancy.CredentialExInt.decode(request);
>                 return (null);
>             }
>
>         }
>
> For the actual send, I need to pass in the actual Management class filled
> in.
>
> This is what I am trying to do:
>
>
> namespace pcitek.CredentialExchange
> {
>     public class sendCredentials
>     {
>         public async Task Send(pcitek.CredentialExchange.Management info)
>         {
>
>             string address = Redundancy.getRedundancyPeerAddress();
>             using var channel = GrpcChannel.ForAddress(address+":5001");
>             //
>
>             var client = new
> pcitek.CredentialExchange.sendCredentials(channel)
>
>
>
>
>
>
>         }
>     }
> }
>
> The yellow'd statement fails because sendCredentials is not known.  Please
> note I also have: mapped a receiver service
> to: 
> endpoints.MapGrpcService<PCItek.Redundancy.services.CredentialExchangeService>();
>
> Any help would be appreciated.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/protobuf/d9500f87-994e-49a7-a30f-658f77652109n%40googlegroups.com
> <https://groups.google.com/d/msgid/protobuf/d9500f87-994e-49a7-a30f-658f77652109n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/CAF95VAwBfFBEWjoJMQ9gBuHVhe4E9j6z7Lg_Voxz5STsY5Pm3g%40mail.gmail.com.

Reply via email to