thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandeep Akinapelli <sakinape...@cloudera.com>
Subject Re: server side value is null
Date Wed, 16 Dec 2015 08:26:28 GMT
Here it is. I am supplying the target platform field for service2 function, but inside the
handler class at server side, the target platform field has null value.

namespace java xxx
namespace py xxx


enum SourcePlatform {
  xxx = 1,
  abc = 2,
}

enum Compiler {
  xxx = 1,
}

enum TargetPlatform {
  xxx = 1,
 }

union InputSource {
  1: string filePath,
  2: string xxx
}

union ResultOutputSource {
  1: string filePath,
  2: bool embedInResponse = true
}

struct Meta {
  1: required SourcePlatform sourcePlatform,
  2: required Compiler compiler
}

struct FSMMeta {
  1: optional string xxx,
}

struct Request {
  1: required Meta meta,
  3: required string entityId,
  4: required string tenantId,
  5: required InputSource inputSource,
  6: required ResultOutputSource outputSource,

  8: optional bool ignoreCase = true
  9: optional string version = "1";
  10: optional TargetPlatform targetPlatform,
  11: optional FSMMeta fsmMeta,  
}

struct Result {
  1: bool isSuccess, 
  2: string result 
}

exception InvalidValueException {
  1: i32 error_code,
  2: string error_msg
}


exception InvalidRequestException{
  1: i32 error_code,
  2: string error_msg
}

service CService {
  string ping(),
  Result service1(1: Request request) throws (1: InvalidRequestException e)
  Result service2(1: Request request) throws (1: InvalidRequestException e)
  }


> On Dec 16, 2015, at 12:12 AM, Jens Geyer <jensgeyer@hotmail.com> wrote:
> 
> Yes, some code would be great. Start with the IDL.
> ________________________________
> Von: Sandeep Akinapelli
> Gesendet: 16.12.2015 08:54
> An: user@thrift.apache.org
> Betreff: server side value is null
> 
> I am using python client and java server with TBinaryProtocol. When I am printing the
thrift object at client side, i see few parameters and the same parameters are coming as null
at server side. has any one seen this type of strange behavior.
> 
> I can provide the code and thrift files if needed.
> 
> regards,
> sandeep


Mime
View raw message