google-protocol-buffer

protoc custom plugin erroring out with Program not found or is not executable

半城伤御伤魂 提交于 2020-06-09 05:37:45
问题 I am trying to build a custom protoc plugin to generate custom output from .proto files. I literally copied java file containing CodeGenerator from protoc custom plugin as a starting point and renamed it. I also followed executable and created .sh file. The content of my shell script is as follows. I also add the PATH variable value and output of the plugin execution. Can someone point me where I am going wrong with this? The shell script runs fine separately executing the main method 回答1:

How to implement com.google.protobuf.BlockingRpcChannel for gRPC generated Java code?

风格不统一 提交于 2020-03-25 21:59:29
问题 I recently took a proto file representing a gRPC service and generated Java code from it. However, all the interfaces expect a com.google.protobuf.BlockingRpcChannel and I don't have any idea on how to create it. When I look at example, I see people using io.grpc.ManagedChannel but that is because the generated Java code used that type instead. I'm not sure if it's because i'm using a specific version of protobuf or what? public static BlockingInterface newBlockingStub(com.google.protobuf

The method emptyIntList() is undefined

被刻印的时光 ゝ 提交于 2019-12-24 10:24:42
问题 I am new to Google Protobuf . Tried to play with it using below student.proto file. syntax = "proto3"; package rld; option java_package = "com.rld"; option java_outer_classname = "StudentDTO"; message Student { string name = 1; int32 roll = 2; repeated int32 mark = 3; //Marks in various subjects } message StudentDatabase { repeated Student student = 1; } Then I tried to compile it using below Protobuf compiler command. From here, I downloaded the compiler. protoc -I=. --java_out=. ./student

Google's Vision Api protobuf response object to Python dictionary

百般思念 提交于 2019-12-12 12:45:04
问题 I'm working on a project in which I need to analyze an image using Google's Vision API and post the response to a Dynamodb table. I have successfully implemented the Vision API, but not able to convert its response into Python Dictionary. Here's what I have tried: if form.is_valid(): obj = form obj.imageFile = form.cleaned_data['imageFile'] obj.textFile = form.cleaned_data['textFile'] obj.save() print(obj.imageFile) # Process the image using Google's vision API image_path = os.path.join

How to compile google-fhir proto files

大憨熊 提交于 2019-12-08 07:12:51
问题 Looking at the readme for google-fhir it says to run bazel build , which works, however none of the protocol files have been compiled. Running protoc --proto_path=. --java_out=. proto/stu3/resources.proto returns a bunch of error about other protos not being found. This goes backwards until 'descriptor.proto' which is not a proto in the folder. None of the protocol files in that directory will manually compile into java files. *On another note, I was able to take other example protos from

How to compile google-fhir proto files

六眼飞鱼酱① 提交于 2019-12-08 03:21:26
Looking at the readme for google-fhir it says to run bazel build , which works, however none of the protocol files have been compiled. Running protoc --proto_path=. --java_out=. proto/stu3/resources.proto returns a bunch of error about other protos not being found. This goes backwards until 'descriptor.proto' which is not a proto in the folder. None of the protocol files in that directory will manually compile into java files. *On another note, I was able to take other example protos from other sources and compile those successfully. UPDATE Running the command protoc --proto_path=proto/stu3/ -