[protobuf] on the wire sizes

2011-04-01 Thread AdrianPilko
I notice from: http://code.google.com/apis/protocolbuffers/docs/encoding.html There is a description of the size of output messages "on the wire" and presumably this could be used to manually calculate the size of a message. so far so good for simple messages... There are functions in the compil

[protobuf] Re: Protobuf in JAX-WS

2011-04-01 Thread Canggih
Or, maybe can I handle request and read the callback without using JAX WS (without java.xml.ws library)? On Apr 1, 10:04 am, Ben Wright wrote: > Unfortunately JAX-WS (Java API for XML Web Services) only works > directly with XML (anyone feel free to correct me if I'm > misinformed in this reg

[protobuf] Re: Protobuf in JAX-WS

2011-04-01 Thread Canggih
thanks. Actually, i'm using Restful web services. But, i'm confuse, how to use it for long polling method. I have search it, but the result is using JAX WS to handle the request and get callback response. is there a way to do it in pure protobuf? Maybe using another library? Thanks in advance Cang

Re: [protobuf] on the wire sizes

2011-04-01 Thread Evan Jones
On Apr 1, 2011, at 6:54 , AdrianPilko wrote: What is the [best] way to determine the on the wire size? You probably want msg.ByteSize() in C++, msg.getSerializedSize() in Java. Evan -- http://evanjones.ca/ -- You received this message because you are subscribed to the Google Groups "Proto

[protobuf] Re: self including message array

2011-04-01 Thread zad
message resource_info { optional string device_name=18; optional Res_type res_type=19 [default=RAW]; repeated resource_info resources=2; } the above message generate the following .h /*! \file deviceManager_hint.h * \brief message hints */ /*---

[protobuf] Re: self including message array

2011-04-01 Thread zad
message resource_info { optional string device_name=18; optional Res_type res_type=19 [default=RAW]; repeated resource_info resources=2; } the above message generates the following .h /*! \file deviceManager_hint.h * \brief message hints */ /*-

[protobuf] Re: self including message array

2011-04-01 Thread zad
Ok I'll do, I asked to be sure if a recursive definition was "syntactically" correct. Can you please check if there is a test case or an example? On Apr 1, 4:44 pm, Jason Hsueh wrote: > You appear to be using a third party implementation for pure C. You'll have > to check with the author of the

Re: [protobuf] Re: self including message array

2011-04-01 Thread Jason Hsueh
You appear to be using a third party implementation for pure C. You'll have to check with the author of the implementation. On Fri, Apr 1, 2011 at 7:25 AM, zad wrote: > message resource_info { >optional string device_name=18; >optional Res_type res_type=19 [default=RAW]; >

[protobuf] Will protobuf support JSON?

2011-04-01 Thread ZHOU Xiaobo
script languages can easily dealing with JSON, but in C/C++ is actually difficult. can protobuf support json encode/decode? -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to protobuf@googlegroups.com. To un

Re: [protobuf] Will protobuf support JSON?

2011-04-01 Thread Konrad Malawski
Sure, just google "protobuf json" -> http://code.google.com/p/protobuf-json/ -- Konrad Malawski XSolve.pl - Software Developer Java.pl - Polish Java User Group Project13.pl - Private Portfolio & Blog 2011/4/1 ZHOU Xiaobo > script lan

[protobuf] Repeat custom message extensions not working in Java on deserialisation

2011-04-01 Thread Ahab
I've been using protocols for a while, and just moved to extensions lasts week. Deserialising out of a byte[] back into my Batch object is now failing - protos below. I am looking in Eclipse and it is struggling with the repeat batchData objects - and my test is failing. They end up not being re

Re: [protobuf] Repeat custom message extensions not working in Java on deserialisation

2011-04-01 Thread Jason Hsueh
The most common issue with Java and extensions is not passing an ExtensionRegistry containing the extensions you want to the deserialization method. However, you mention that the parse is failing: if you didn't register the extensions, or didn't use an extension registry, then the data would simply

[protobuf] Re: Repeat custom message extensions not working in Java on deserialisation

2011-04-01 Thread Ahab
That worked. No issues now that I have added in the ExtensionRegistry. Thanks a lot Jason. On Apr 1, 5:17 pm, Jason Hsueh wrote: > The most common issue with Java and extensions is not passing an > ExtensionRegistry containing the extensions you want to the deserialization > method. However, yo

[protobuf] Java: Protobuf jars compatibility (2.4.0 with 2.0.3)

2011-04-01 Thread Blackbird
Hi, After finishing our project using latest protobuf-java-2.4.0a jar and corresponding protoc compiler, we came to know that there are usages of protobuf-2.0.3.jar (which is older) in our system. So, now it turns only one of these jars can exists. Can you guys let me know whether there will be a

Re: [protobuf] Will protobuf support JSON?

2011-04-01 Thread Austin Ziegler
On Fri, Apr 1, 2011 at 11:19 AM, Konrad Malawski wrote: > Sure, just google "protobuf json" -> http://code.google.com/p/protobuf-json/ > 2011/4/1 ZHOU Xiaobo >> >> script languages can easily dealing with JSON, but >> in C/C++ is actually difficult. >> can protobuf support json encode/decode? A