Skip to content

Using SSL certificate in Karate-gRPC. Caught exception while waiting for rpc #19

@debayandesarkar

Description

@debayandesarkar

Hi,
Thanks for sharing this implementation. I am trying to automate a gRPC service call following the example documented here. My feature file looks like below

Feature: DeterminationAPI GetTax

  Background:
    * def Client = Java.type('com.github.thinkerou.karate.GrpcClient')
    * def client = Client.create('eg-gtp-tax-engine-adapter-mvp-grpc.kmc-default.us-west-2.test.beardsley.abc.com',443)

  Scenario: do it
    * def payload = read('getTax.json')
    * def response = client.call('com.abc.tax.amounts.v1beta1.DeterminationAPI/getTax', payload)
    * def response = JSON.parse(response)
    * print response

I have included the jar file which has the .proto file of the gRPC service (e.g. com.abc.tax.amounts.v1beta1.DeterminationAPI). However, I am getting the below error.

Jun 08, 2021 12:01:51 AM com.github.thinkerou.demo.helloworld.HelloWorldServerMain start
INFO: Server started listening on 50051
00:01:51.182 [main] WARN  testing.ServerStart - Started server on port...Jun 08, 2021 12:01:51 AM com.github.thinkerou.karate.service.GrpcCall excute
WARNING: Call grpc failed, maybe you should see the follow grpc information.
Jun 08, 2021 12:01:51 AM com.github.thinkerou.karate.service.GrpcCall excute
INFO: []

com.intuit.karate.exception.KarateException: determinationAPI.feature:8 - javascript evaluation failed: client.call('com.abc.tax.amounts.v1beta1.DeterminationAPI/getTax', payload), Can't find service with name: DeterminationAPI

	at ✽.* def response = client.call('com.abc.tax.amounts.v1beta1.DeterminationAPI/getTax', payload) (determinationAPI.feature:8)


Can you please help troubleshooting this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions