apache / apache/servicecomb-mesher
How to register schema in mesher to make intercalls from other microservices.
- Dominant language
- Go
- Stars
- 688
- Forks
- 69
- PR merge metrics
- No merged PRs in 30d
Description
I have java chassis SDK based `serviceA` talks to mesher acting as sidecar proxy for the python based `serviceB`.
When I call serviceB operations via mesher with restclient like this
```
RestTemplate restTemplate = RestTemplateBuilder.create();
String result =
restTemplate.getForObject("cse://testApp:serviceB/shippingservice/bmi?height={height}&weight={weight}"
, null, String.class,request.getHeight(),request.getWeight());
```
I am always ended up in `Message Not Found` Error.
```
{
"message": "Not Found"
}
```
Relevant logs
```
2023-03-02 13:12:31.428 INFO 1206 --- [oup0-1-thread-1] o.a.s.registry.swagger.SwaggerLoader : try to load schema locally, appId=[testApp], serviceName=[serviceB], schemaId=[shippingservice]
2023-03-02 13:12:31.444 WARN 1206 --- [oup0-1-thread-1] o.a.s.registry.swagger.SwaggerLoader : no schema in local, and can not get schema from service center, appId=Elavon, microserviceName=shippingservice, version=1.1.1, serviceId=387916b7066a225101afb347c009988e1a78ea67, schemaId=shippingservice.
```
Then I realised that mesher would not know about the schema/operations supported by the sidecar main `serviceB` which it proxies.
So the question is how to register the schema in mesher with the operations supported in the microservice in `serviceB`
I have tried creating schema `yaml` file and put it under `mesher/conf` folder. But it does not work. The schemas are not getting uploaded or registered in the service center.
Please suggest how to make intercommunication calls from serviceA to serviceB through mesher?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.