By update server to use Thrift 0.6.0, this problem is resolved. Thanks On Wed, Mar 9, 2011 at 5:56 PM, King JKing <[email protected]> wrote:
> I've created this. > > https://issues.apache.org/jira/browse/THRIFT-1086 > > > On Tue, Mar 8, 2011 at 9:15 PM, Bryan Duxbury <[email protected]> wrote: > >> Sounds like a bug. Can you open a JIRA ticket? >> >> On Tue, Mar 8, 2011 at 12:26 AM, King JKing <[email protected]> wrote: >> >> > Dear all, >> > >> > I use PHP to get value from my Java Thrift Service (Implement >> THaHsServer). >> > Here is my PHP code: >> > $this->socket = new TSocket($this->_host, $this->_port, true); >> > $this->transport = new TFramedTransport($this->socket); >> > $this->protocol = new >> TBinaryProtocolAccelerated($this->transport); >> > $this->client = new ServiceReadClient($this->protocol); >> > But sometimes, PHP get wrong value. I also use Java client to check. >> Java >> > client always return right value. >> > >> > Here is my thrift file >> > i32 get_point(1:required i32 userId) >> > >> > I change to: >> > struct Point{ >> > 1:required i32 point >> > } >> > Point get_point(1:required i32 userId) >> > Now PHP always return right value. >> > >> > That maybe the problem when using PHP to connect to Java Service. Now I >> > always use Struct for return value instead of primitive value. >> > >> > >
