node-hessian icon indicating copy to clipboard operation
node-hessian copied to clipboard

'hessian-proxy' throw exception:Out of Original Buffer's Boundary

Open cfuns opened this issue 9 years ago • 1 comments

when I use hessian-proxy get useInfo Entity,all data can normal return data but 'xiaoyan.li-1',begin I think maybe hessian-proxy version is low,but when i grow version from 0.0.4 to 0.0.5, the result is same like before. while I found the test data 'yue.zhang-2' like 'xiaoyuan.li-1' ,It's will really work better and return normal data. Now I think maybe hessian protocal control in hessian-proxy possible have bug. what My check code like this below:

var name = process.argv[2];
var file = process.argv[3];
var Proxy = require('hessian-proxy').Proxy;

var fs = require('fs');

name ='xiaoyan.li-1';//yue.zhang-2

fs.readFile(file,function(err,contents){
   var lines = contents.toString().split("\n").length - 1;
   console.log(lines+"===="+name);
   var url = "http://host:port/employee-hessian/hessian/UserFacade";

   var proxy = new Proxy(url);
   console.log("queryUserByLoginName : " + url);

   proxy.invoke("queryUserByLoginName", [name], function (err, reply) {
      if (err) {
        console.log(err);
      }
      console.log("source ====="+ reply);
      console.log("00000000999==="+JSON.stringify(reply));
      //callback(err, reply);
   });
});

the exception like this:

{ [AssertionError: Out of Original Buffer's Boundary] name: 'AssertionError', actual: false, expected: true, operator: '==', message: 'Out of Original Buffer's Boundary' }

cfuns avatar Jun 21 '15 00:06 cfuns