Hi all,

I have a strange behavior with java release 2.3.0 and I need your help:


message Request {
    required Api api_call = 1;
    extensions 100 to 200;

message RefundRequest {
    extend Request {
        optional RefundRequest refund_request = 100;
    required int32 orderId = 1;

Client (java):

Protos.RefundRequest refundRequest =

Protos.Request request =
.setExtension(Protos.RefundRequest.refundRequest, refundRequest)

Server (java):

byte[] data; // data is properly initialized with all bytes transmitted over the wire.

Protos.Request request = Protos.Request.parseFrom(data);

// request.getApiCall() is correct. now I need to get transmitted order Id. I do expect to have 2.

ExtensionRegistry registry = ExtensionRegistry.newInstance();

RefundRequest refundRequest = Protos.RefundRequest.parseFrom(
                    data, registry

here is the problem:

refundRequest.getOrderId() returns always "1" ?!? no exceptions during encoding, transmitting and receiving the data.

What I do wrong?

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 unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to