On Thursday, November 1, 2018 at 12:02:26 AM UTC+5:30, [email protected] 
wrote:
>
> proto file 
>
>
>
> syntax="proto3";
> package com.project.grpc.roleservice;
>
> message UserRequest {
>     string userName=1;}
>
> message RoleReply {
>     string userRole=1;}
>
> service UserRoleFromServer{
>     rpc getRoleUser(stream UserRequest) returns (stream RoleReply);}
>
>
>
> On Wednesday, October 31, 2018 at 11:50:08 PM UTC+5:30, Kun Zhang wrote:
>>
>> Assuming you are using protobuf-maven-plugin 
>> <https://www.xolstice.org/protobuf-maven-plugin/>, it doesn't matter 
>> that the generated files are under /generated-sources. The generated 
>> classes should be added automatically to your build path by the plugin. 
>> Just import them with the proper package names and your source should 
>> compile.
>> If it still doesn't work, you may want to share your whole project source 
>> so that other people can diagnose for you.
>>
>> On Tuesday, October 30, 2018 at 3:04:11 AM UTC-7, Passenger wrote:
>>>
>>> Using Java 
>>>
>>> I created a protobuffer . I generated all the classes . The classes were 
>>> generated in project/target directory .Now my java project folder looks 
>>> like this
>>>
>>> 1) src
>>> 2) target
>>> 3) pom.xml
>>>
>>> Proto file -
>>>
>>> syntax="proto3";
>>>
>>> option java_multiple_files = true;
>>> option java_package="com.grpc.project1";
>>>
>>> package com.grpc.project1;
>>>
>>> message Person{
>>>     string first_name=1;
>>>     string last_name=2;
>>>
>>> }
>>>
>>> message Greeting{
>>>     string message=1;
>>> }
>>>
>>> service HelloWorldService{
>>>
>>>     rpc sayHello(Person) returns (Greeting);
>>> }
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Now src also has sub folder main/java
>>> and target also has two sub folder -
>>> 1) /generated-sources/protobuf/grpc-java 
>>> 2)/generated-sources/protobuf/java
>>>
>>>
>>>
>>> No i want to implement my HelloWorldService class where should I define 
>>> the class ??
>>> Inside src/main/java
>>> or inside 
>>> 1) /generated-sources/protobuf/grpc-java 
>>> 2)/generated-sources/protobuf/java
>>>
>>> If I create class inside src/main/java i am unable to extend 
>>> HelloWorldServiceGrpc.HelloWorldServiceImpl niether i am able to import 
>>> target folderbut it is present inside  
>>> /generated-sources/protobuf/grpc-java/com/grpc/project1 
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/ce962841-067c-411d-928c-0ae11cfbee78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to