I don't see any obvious problems.  Try printing the whole message just
before serializing and just after parsing to see if they are both as you
expect.

On Sat, Oct 18, 2008 at 11:24 PM, comsatcat <[EMAIL PROTECTED]> wrote:

>
> I have a simple client server in python... I have the following
> protobuf definition:
>
> message NodeListData {
>        enum State {
>                FALSE = 0;
>                TRUE = 1;
>        }
>        required string node = 1;
>        required string folder = 2;
>        required State pendingcsr = 3;
> }
>
> message NodeList {
>        repeated NodeListData items = 1;
> }
>
> message Packet {
>        enum Type {
>                ACK = 0;
>                KEEP_ALIVE = 1;
>                AUTHORIZE = 2;
>                ADD_ENDPOINT = 3;
>                GET_ENDPOINT_STATS = 4;
>                ENDPOINT_STATS = 5;
>                REMOVE_ENDPOINT = 6;
>                NODE_LIST = 7;
>        }
>        required Type type = 1;
>        optional Ack ack = 2;
>        optional KeepAlive keepalive = 3;
>        optional Authorize authorize = 4;
>        optional AddEndpoint addendpoint = 5;
>        optional EndpointStats endpointstats = 6;
>        optional RemoveEndpoint removeendpoint = 7;
>        optional NodeList nodelist = 8;
> }
>
> *note some fields have been removed for shortening this message*
>
> My problem is with the NodeList type...
>
> I've verified in my server that I am doing a
> packet.nodelist.items.add(), then proceeding to set the required
> values of the returned NodeItemList.
>
> I then send the packet over the wire.
>
> I receive the packet from the client and do a:
>
> for i in packet.nodelist.items:
>    print str(i.node)
>
> and it only comes back with 1 result, no matter how many I build in
> the server (I've tried up to 3)...
>
> Any ideas?
>
> I'm doing this exactly the same way with a different packet type and
> it works fine... am I just missing something small?
>
> Thanks,
> Ben
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to