omnip620 / node-zookeeper-dubbo

A middleware helps node to communicate dubbo by using its default protocol, which is registered in zookeeper
300 stars 80 forks source link

Fail to decode request due to: RpcInvocation #105

Closed yangchongduo closed 5 years ago

yangchongduo commented 5 years ago
const customerObj = {
      $class: 'com.GetSellingCountParam',
      $: {
        beginStockDate: java.String(1557304977000),
        endStockDate: java.String(1557304977000),
        shopkeeperId: java.String('2323')
      }
    }

一直报这个错 不知道为什么

yangchongduo commented 5 years ago

Do not add a version number dubboVer is not required Can the document be written?

zjfcgis commented 4 years ago

我的也是这个问题,在网上找到了解决方案,不过需要改这个库的源码,坑啊。

const customerObj = {
      $class: 'com.GetSellingCountParam',
      $: {
        beginStockDate: java.String(1557304977000),
        endStockDate: java.String(1557304977000),
        shopkeeperId: java.String('2323')
      }
    }

一直报这个错 不知道为什么

zjfcgis commented 4 years ago

应该是js的数据类型和后端dubbo参数对应不上,需要检查数据类型并严格对应,比如数字只能是2而不是"2"。