thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From King JKing <beuk...@gmail.com>
Subject Re: Wrong data return when connect from PHP - Java Thrift Service
Date Sat, 12 Mar 2011 05:07:57 GMT
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 <beuking@gmail.com> wrote:

> I've created this.
>
> https://issues.apache.org/jira/browse/THRIFT-1086
>
>
> On Tue, Mar 8, 2011 at 9:15 PM, Bryan Duxbury <bryan@rapleaf.com> wrote:
>
>> Sounds like a bug. Can you open a JIRA ticket?
>>
>> On Tue, Mar 8, 2011 at 12:26 AM, King JKing <beuking@gmail.com> 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.
>> >
>>
>
>

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