var Proxy = require('hessian-proxy').Proxy;
var proxy = new Proxy('http://127.0.0.1:9098/test-provider/provider/com.yuanxin.paas.ssb.TestService', '', '', proxy);
proxy.invoke('test', null, function (err, reply) {
console.log('test: ' + reply);
});
proxy.invoke('test0', [25], function (err, reply) {
console.log('test0: ' + JSON.stringify(reply));
})
proxy.invoke('test1', null, function (err, reply) {
if (err) {
console.log('test1: ' + err);
}
console.log('test1: ' + JSON.stringify(reply));
})
var argForTest2 = {
i: 2
};
argForTest2.__type__ = 'com.yuanxin.paas.ssb.Arg';
proxy.invoke('test2', [argForTest2], function (err, reply) {
if (err) {
console.log('test2: ' + err);
}
console.log('test2: ' + JSON.stringify(reply));
})
var argForTest3 = {