apache / apache/servicecomb-java-chassis

servicecomb由 1.X升级至 2.X 后InvokerUtils.syncInvoke()无法适配场景咨询

Open
#4,259 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.9k
Forks
814
Avg merge
8d 23h
Merged PRs (30d)
1

Description

业务网关implements InvocationHandler,在反射中做rpc调用,但是升级servicecomb后 InvokerUtils.syncInvoke方法参数变了,这个有啥办法处理Object[] args 转成 swaggerArguments,尝试过将method中parameters的name做key,但是没发保证arg[]顺序和method入参一致

例如:
public class Invoker implements InvocationHandler {
@Override
public Object invoke(Object proxy, Method method, Object[] args) {
Object response = InvokerUtils.syncInvoke(microserviceName,
microserviceSchemaId, microserviceOperationId,args);
}
}

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing the ServiceComb 1.x and 2.x InvokerUtils.syncInvoke signatures and tracing the provided InvocationHandler example. Determine how the Object[] args should map to the 2.x swaggerArguments while preserving the method parameter order. Done means the supported invocation path is documented or corrected with a verified argument mapping.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.