I usually use SpringEL when creating a protobuf using Spring XML; like this:
T(your.protobuf.package.OuterType$MsgType).newBuilder().setField1( "foo" 
).setField2( "bar" ).build() }"/>
some details on SpringEL.

On Monday, February 25, 2013 11:20:23 AM UTC-5, Mark wrote:

> In Java I can do the following:
> MyObject.Builder builder = MyObject.newBuilder();
> builder.setXXX(...);
> builder.setYYY(...);
> MyObject obj =;
> I would like to perform these tasks in Spring so that I can inject an 
> instance into another class.  What is the easiest way to perform this task 
> using XML?
> Thanks,
> Mark

You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
Visit this group at
For more options, visit

Reply via email to