dangdangdotcom / dubbox

Dubbox now means Dubbo eXtensions, and it adds features like RESTful remoting, Kyro/FST serialization, etc to the Dubbo service framework.
http://dangdangdotcom.github.io/dubbox
Apache License 2.0
4.89k stars 2.06k forks source link

场景2:dubbo消费端调用dubbo的REST服务:消费端放入了attachments信息服务端取不到 #312

Open gMan1990 opened 7 years ago

gMan1990 commented 7 years ago

RT

kimmking commented 7 years ago

show a testcase

gMan1990 commented 7 years ago

@kimmking 消费端: ax op q 1l 1lx7pky z 1 服务端:只写rest protocol <dubbo:protocol name="rest" port="-1" server="tomcat" extension="com.alibaba.dubbo.rpc.protocol.rest.support.LoggingFilter" /> _usms e fl4ivefqhn67 p

gMan1990 commented 7 years ago

@kimmking 消费者项目: --只写<dubbo:protocol name="dubbo",可以看到调用堆栈: image --只写<dubbo:protocol name="rest",没跟踪到attachments信息

kimmking commented 7 years ago

rest的附件机制跟dubbo协议不一样, 你看一下resteasy/javax-rs的附件使用方式

gMan1990 commented 7 years ago

@kimmking Google一下,没看到,估计要用英文搜

rangwea commented 6 years ago

是不是不支持这样传递数据啊

rangwea commented 6 years ago

@gMan1990 @kimmking 这个有没有解决?没办法就只能用headers传递数据了

rangwea commented 6 years ago

RpcContext.getContext().getAttachments() 在这里放置参数,也在这里取。不是在Invocation对象中取