Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1553

thrift nodejs service side can't read map structure, key as enum, value as Object

    XMLWordPrintableJSON

    Details

      Description

      Thrift JS client cannot read map of structures
      https://issues.apache.org/jira/browse/THRIFT-1238

      I think this issus still not fixed. Here is a example

      enum AutoAttribute {
      POWER = 0,
      MANIPULATE = 1,
      APPEARANCE = 2,
      DURABILITY = 3,
      }

      struct UserAutoDTO {
      1: required string autoId,
      2: required string autoName,
      3: required string color,
      4: required map<AutoAttribute, double> currentAttribute,
      }

      the client is scala(java), and service side is nodejs.

      [2012-04-05 08:02:41.547] [INFO] console - input.rstack:
      [2012-04-05 08:02:41.548] [INFO] console - undefined
      [2012-04-05 08:02:41.549] [INFO] console - input.rpos:
      [2012-04-05 08:02:41.549] [INFO] console - undefined

      /web/node_modules/thrift/lib/thrift/server.js:50
      throw e;
      ^
      TypeError: Cannot read property 'length' of undefined
      at Object.read (/web/gen-nodejs/auto_types.js:1670:29)

        Attachments

        1. THRIFT-1553-restore-nodejs-maps.patch
          2 kB
          Henrique Mendonca

          Issue Links

            Activity

              People

              • Assignee:
                henrique Henrique Mendonca
                Reporter:
                marsxu1984 Mars Hsu
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: