to make it simple, here is one proto file and two jUnits tests. The
first one passes through and the second one fails. See the comments for
details.
Protos.proto:
enum Api {
REFUND = 1;
}
message Request {
required Api api_call = 1;
extensions 100 to 200;
}
You are parsing the serialization as a RefundRequest, not a Request. The 1
that is being returned is the value of the api_call field - on the wire this
looks like the order_id field - both have tag 1 and are varint encoded.
On Thu, Jan 13, 2011 at 8:58 AM, Simeon Mitev