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 Wed, 09 Mar 2011 10:56:04 GMT
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