thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Avinash Dongre <dongre.avin...@gmail.com>
Subject Re: C++ not sending structure values correctly to Java server
Date Fri, 26 Apr 2013 10:28:50 GMT
Forget to mention that from Java and Perl Client everything is working fine.


On Fri, Apr 26, 2013 at 3:55 PM, Avinash Dongre <dongre.avinash@gmail.com>wrote:

> I have following IDL.
>
> struct ColumnValue {
>      1: optional bool   bool_val       // BOOLEAN
>      2: optional byte   byte_val       // TINYINT
>      3: optional i16    i16_val        // SMALLINT
>      4: optional i32    i32_val        // INT
>      5: optional i64    i64_val        // BIGINT, TIMESTAMP
>      6: optional double double_val     // FLOAT, DOUBLE
>      7: optional string string_val     // CHAR, VARCHAR
>      8: optional binary binary_val     // BINARY
>      9: optional BlobLocator blob_val  // BLOB
>     10: optional ClobLocator clob_val  // CLOB
> }
>
> I am trying to send the list of this ColumnValue to Java Server as follows
>
> for (int id = 1; id <= 100; id++) {
>
>       std::vector<ColumnValue> cvList;
>
>       cvList.push_back(ColumnValue());
>       cvList.back().i32_val = id % 98;
>
>       cvList.push_back(ColumnValue());
>       cvList.back().i32_val = id;
> }
>
> But On Java side when I do following
>
> ColumnValue.getI32_val()
>
> I am always getting 0.
>
> Thanks
> Avinash
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message