If you are reporting any crash or any potential security issue, do not
open an issue in this repo. Please report the issue via ASRC(Alibaba Security Response Center) where the issue will be triaged appropriately.
[ ] I have searched the issues of this repository and believe that this is not a duplicate.
Ⅰ. Issue Description
http2dubbo验证接口多参数、多类型,java dubbo 服务的接口参数声明为 string 和 integer 时,会报错 given param not match the type .
Ⅱ. Describe what happened
java dubbo 服务的接口参数分别string 和 string 不会报错,string 和 Long 不会报错, string 和 integer 是会报错 can not transcode the request because the given param not match the type
If there is an exception, please attach the exception trace:
[Envoy (Epoch 0)] [2024-06-26 14:45:41.801][49][warning][filter] Failed to resolve headers, error is INVALID_ARGUMENT: can not transcode the request because the given param not match the type
{"authority":"localhost","bytes_received":"0","bytes_sent":"90","downstream_local_address":"172.23.0.7:80","downstream_remote_address":"172.23.0.1:59090","duration":"0","istio_policy_status":"-","method":"GET","path":"/dubbo/test?name=abcdddc&age=2","protocol":"HTTP/1.1","request_id":"381cf076-6c78-42d0-8159-d67c77fea2dc","requested_server_name":"-","response_code":"400","response_flags":"-","route_name":"-","start_time":"2024-06-26T14:45:41.801Z","trace_id":"-","upstream_cluster":"outbound|20880||providers:com.example.demo.dubbo.api.DemoService::.DEFAULT-GROUP.public.nacos","upstream_host":"-","upstream_local_address":"-","upstream_service_time":"-","upstream_transport_failure_reason":"-","user_agent":"curl/7.29.0","x_forwarded_for":"172.23.0.1"}
Ⅲ. Describe what you expected to happen
期望返回
{"result":"Hello abcdddc#2"}
Ⅳ. How to reproduce it (as minimally and precisely as possible)
申明dubbo接口
package com.example.demo.dubbo.api;
public interface DemoService {
String sayName(String name, Long age);
String sayHello(String name);
If you are reporting any crash or any potential security issue, do not open an issue in this repo. Please report the issue via ASRC(Alibaba Security Response Center) where the issue will be triaged appropriately.
Ⅰ. Issue Description
http2dubbo验证接口多参数、多类型,java dubbo 服务的接口参数声明为 string 和 integer 时,会报错 given param not match the type .
Ⅱ. Describe what happened
java dubbo 服务的接口参数分别string 和 string 不会报错,string 和 Long 不会报错, string 和 integer 是会报错 can not transcode the request because the given param not match the type
If there is an exception, please attach the exception trace:![image](https://github.com/alibaba/higress/assets/20533911/1c49d769-ed08-4cd6-8090-322a5bfc2216)
Ⅲ. Describe what you expected to happen
期望返回
{"result":"Hello abcdddc#2"}
Ⅳ. How to reproduce it (as minimally and precisely as possible)
public interface DemoService {
}
package com.example.demo.dubbo.service;
import com.example.demo.dubbo.api.DemoService;
import org.apache.dubbo.config.annotation.DubboService;
@DubboService public class DemoServiceImpl implements DemoService {
}
apiVersion: networking.higress.io/v1 kind: Http2Rpc metadata: name: httproute-http2rpc-demo namespace: higress-system spec: dubbo: service: com.example.demo.dubbo.api.DemoService version: group: methods:
单个参数
curl "localhost/dubbo/hello?name=abcdddc"
期待返回
{"result":"Hello abcdddc"}
多个参数,不同类型
curl "localhost/dubbo/test?name=abcdddc&age=2"
期待返回
{"result":"Hello abcdddc#2"}