Andre', Another suggestion: these other clients, I presume, are in other languages? Could you take that string, and write a cmdline program that demarshals it in one of the other languages that work? Just to verify that indeed it's just a Python-only problem?
On Thu, Jan 11, 2018 at 12:42 PM, Chet Murthy <murthy.c...@gmail.com> wrote: > Andre', > > (1) The message is generated in which language? Python? > > (2) Can you supply the IDL for the message payload and message itself? > > On Thu, Jan 11, 2018 at 10:35 AM, André Lemos <ale...@plux.info> wrote: > >> On Thu, Jan 11, 2018 at 5:32 PM, Kevin Clark <kevin.cl...@gmail.com> >> wrote: >> >> > On Thu, Jan 11, 2018 at 8:41 AM André Lemos <ale...@plux.info> wrote: >> > >> > > On Thu, Jan 11, 2018 at 4:34 PM, Kevin Clark <kevin.cl...@gmail.com> >> > > wrote: >> > > >> > > > On Thu, Jan 11, 2018 at 8:19 AM André Lemos <ale...@plux.info> >> wrote: >> > > > >> > > > > On Thu, Jan 11, 2018 at 4:13 PM, Kevin Clark < >> kevin.cl...@gmail.com> >> > > > > wrote: >> > > > > >> > > > > > On Thu, Jan 11, 2018 at 7:40 AM André Lemos <ale...@plux.info> >> > > wrote: >> > > > > > >> > > > > > > Hi, >> > > > > > > >> > > > > > > >> > > > > > > When parsing through a TBinaryProtocol, trying to get the >> > > > > > readMessageBegin, >> > > > > > > readI32, returns 16777216, which will raise an EOFError, >> because >> > > it's >> > > > > > just >> > > > > > > a too big of a value. If I use something like 25, I do get >> > > something >> > > > > > pretty >> > > > > > > closer to what I am trying to get, although I still get the >> > initial >> > > > bit >> > > > > > of >> > > > > > > the protocol, and not just the name I am trying to get. >> > > > > > > >> > > > > > > Any hints as to where I should be looking? >> > > > > > >> > > > > > >> > > > > > >> > > > > > Providing the language of the lib you’re using, the code, and >> the >> > > > message >> > > > > > you expect to be on the wire would make it easier for someone to >> > help >> > > > > you. >> > > > > >> > > > > >> > > > > >> > > > > I am using Python 2, I've sent the code. The message I am trying >> to >> > > > parse, >> > > > > looks like this: >> > > > > >> > > > > >> > > > > \x01\x00\x00\x00\xed\x00\x00\x00\x80\x01\x00\x04\x00\x00\ >> > > > x00\x15RequestProcessListing\x00\x00\x00\x00\x0c\x00\x01\ >> > > > x0b\x00\x01\x00\x00\x00\x10\xfe\x8e\xc3F\xed\\\x8aG\x97+\ >> > > > x0cp\x0eY\x05U\x0b\x00\x02\x00\x00\x00\x0fThe >> > > > > Observer XT\x08\x00\x03\x00\x00\x00\x02\x0b\x00\x04\x00\x00\x00\ >> > x12The >> > > > > Observer XT >> > > > > >> > > > > 14\x0b\x00\x05\x00\x00\x00\x08LEMOS-PC\x0b\x00\x06\x00\ >> > > > x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ >> > > > x00\x00\x00\x00\x00\x0c\x00\x07\x08\x00\x01\x00\x00\x00\ >> > > > x01\x0c\x00\x02\x0c\x00\x01\x0b\x00\x01\x00\x00\x00\x00\ >> > > > x08\x00\x02\x00\x00\x00\x00\x0f\x00\x03\x0c\x00\x00\x00\ >> > > > x00\x0f\x00\x04\x0c\x00\x00\x00\x00\x00\x00\x0c\x00\x03\ >> > > > x02\x00\x01\x01\x02\x00\x02\x01\x0b\x00\x03\x00\x00\x00\ >> > > > x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ >> > > > x00\x00\x00\x00\x00\x00\x00 >> > > > >> > > > >> > > > Well the number you’ve pasted looks like it’s 1 << 24, so it should >> fit >> > > in >> > > > a 32 bit int just fine. I’m not seeing actual code anywhere, just >> > > > descriptions of method calls. I suspect this is a simple oversight >> but >> > > it’s >> > > > hard to tell you more without the actual code and the precise error >> > > > message. >> > > > >> > > >> > > >> > > >> > > here's the code (Python 2): >> > > >> > > trans1 = TTransport.TMemoryBuffer() >> > > trans1.open() >> > > trans = TTransport.TMemoryBuffer(body) >> > > trans.open() >> > > iprot = TBinaryProtocol.TBinaryProtocol(trans) >> > > oprot = TBinaryProtocol.TBinaryProtocol(trans1, >> strictWrite=False) >> > > tr = Processor(CommonService.CommonService.Iface()) >> > > tr.process(iprot, oprot) >> > > >> > > >> > > issue is that readI32() gets me a EOFError as it tries to read way >> past >> > the >> > > full message. >> > >> > >> > Ah! Issue looks like it’s youre using strictWrite=False in one of the >> > protocols. That’s going to skip writing the version which the read side >> is >> > looking for. Been too long since I touched the code to remember the >> > intended purpose of those args, but that should at least tell you why >> it’s >> > blowing up - it expects more data because a 32 bit version should be >> there >> > in the header. >> > >> > Hope that helps. >> >> >> >> Still the same problem... >> >> >> File "thrift/protocol/TBinaryProtocol.py", line 153, in >> readMessageBegin >> name = self.trans.readAll(sz) >> File "thrift/transport/TTransport.py", line 65, in readAll >> raise EOFError() >> EOFError >> >> >> >> :\ >> > >