node-zookeeper-dubbo icon indicating copy to clipboard operation
node-zookeeper-dubbo copied to clipboard

增加withType参数

Open lishengguo opened this issue 7 years ago • 3 comments

增加withType参数,控制hessian是否返回{$class:'',$:{}},

lishengguo avatar Oct 16 '17 09:10 lishengguo

感谢提供新特性,不过有点不太明白这个参数的意义,能否稍微详细说明下,以及参数有哪些可选值,🙏。

omnip620 avatar Oct 18 '17 08:10 omnip620

withType是hessian返回的对像是否带类型,默认为false,为true时返回值形式如:{$class:'java.lang.Long',$:100}。 opt.withType改成opt.returnWithType更好理解点, 是吧。

lishengguo avatar Oct 19 '17 02:10 lishengguo

Hello, I would like to ask node-zookeeper-dubbo this module how to use it, I always use TypeError: Cannot read property 'buildUserAgentTree' of undefined can not find the method, in fact, this service interface exists, I use telnet to log in dubbo When you can view the interface information of the service through ls, the following is my call code, trouble to help look down

var nzd = require('node-zookeeper-dubbo');

const opt = { application:{ name:'parkhelper-service' }, registry:'127.0.0.1:2182', dubboVer:'2.6.1', group:'cn.parkhelper', root:'dubbo', dependencies:{ AgentService:{ interface:'cn.parkhelper.service.park.AgentService', version:'1.0-SNAPSHOT', group:'cn.parkhelper', timeout:5000 } } };

const Dubbo = new nzd(opt);

var arg1 = {$class:'java.lang.String',$:'8a04a41f59305d810159639b42ae000d'}; Dubbo.AgentService.buildUserAgentTree(arg1).then(function(data){ //error message is here console.log(data); }).catch(function(err){ console.log(err); })

xiaojinhe2 avatar Apr 01 '19 03:04 xiaojinhe2