...
Requirements
- SOAtest/Virtualize 20222023.1 2 and later.Protocol Buffer Compiler (protoc). See https://protobuf.dev/installation/.
- Java 11 or later.
Build the protobuf-extension.jar
You will need to build a Protobuf extension jar to use the Protobuf extension. To do so:
- Download the Protocol Buffer Compiler (protoc) mentioned in Requirements.
- Run the following command with the appropriate arguments:
Code Block java -jar com.parasoft.soavirt.messages.protobuf.jar <ARGUMENTS>
The example below (for Windows) shows the command with all arguments. This will generate the jar (protobuf-extension.jar) which can then be added to SOAtest:
| Code Block |
|---|
java -jar com.parasoft.soavirt.messages.protobuf-<VERSION>.jar -protoc C:\protoc-<VERSION>-win64\bin\protoc.exe -includes -protoDir C:\<PATH_TO_PROTO_FILES> -logLevel 4 |
For more information about the Protobuf jar, run:
...
- .
...
Installation
This artifact can be installed from the UI or the command line.
...
- Go to Parasoft > Preferences and click System Properties.
- Click Add JARs and choose thecom.parasoft.soavirt.messages.protobuf-extension<version>.jar.
- Click Apply.
- Restart SOAtest/Virtualize.
Command Line Installation
Add com.parasoft.soavirt.messages.protobuf-extension<version>.jar to the system.properties.classpath property in your settings properties file. For example:
system.properties.classpath=<path to jar>/com.parasoft.soavirt.messages.protobuf-extension1.3.0.jar
Configuring Protobuf Files Location
The location of your Protobuf files is configured through a Java system property that specifies the path to a local directory that contains your .proto files.
| Code Block |
|---|
-J-Dcom.parasoft.soavirt.messages.protobuf.files=<PATH_TO_PROTO_FILES> |
Usage
| Anchor | ||||
|---|---|---|---|---|
|
...
One of the benefits of using the Protobuf extension is the ability to use it in conjunction with the gRPC Transport in order to send messages in one format and receive messages in another format.
Change Log
1.3
- Decode grpc-status-details-bin header to JSON when both Protobuf and gRPC extensions are loaded
1.2
- Resolved issue sometimes detecting the wrong message type
- Resolved various issues in schema generation
- Automatically detect and consume ProtoJSON
1.0
- Initial release