Hi, I am actually working on a C# application for managing shared contacts using the .NET Client Library. This application shall use batch feeds. The batch feed works fine for inserting and also deleting contacts. However I have a problem with updating contact entries. When I try to update a couple of entries, I get back a collection with only one entry, which has a batch data status code 400 and an error message "Missing entry Id".
I debugged the problem down to the source code of the client library and checked the raw requests that are sent. These requests seemt to look quite different for inserts and updates, so I am wondering if I found a bug in the library. Could anyone please give a comment, so that I can raise an issue if necessary? Thanks! Here is the batch request for inserting 3 contact entries (which works fine): <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http:// schemas.google.com/gdata/batch" xmlns:gd="http://schemas.google.com/g/ 2005"> <batch:operation type="insert" /> <entry> <gd:email address="[email protected]" primary="true" rel="http:// schemas.google.com/g/2005#work" /> <batch:id>insert0</batch:id> <batch:operation type="insert" /> <title type="text">Test User 0</title> <category term="http://schemas.google.com/contact/2008#contact" scheme="http://schemas.google.com/g/2005#kind" /> </entry> <entry> <gd:email address="[email protected]" primary="true" rel="http:// schemas.google.com/g/2005#work" /> <batch:id>insert1</batch:id> <batch:operation type="insert" /> <title type="text">Test User 1</title> <category term="http://schemas.google.com/contact/2008#contact" scheme="http://schemas.google.com/g/2005#kind" /> </entry> <entry> <gd:email address="[email protected]" primary="true" rel="http:// schemas.google.com/g/2005#work" /> <batch:id>insert2</batch:id> <batch:operation type="insert" /> <title type="text">Test User 2</title> <category term="http://schemas.google.com/contact/2008#contact" scheme="http://schemas.google.com/g/2005#kind" /> </entry> </feed> And here is the batch feed for updating the newly created contact entries (which fails): <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http:// schemas.google.com/gdata/batch" xmlns:gd="http://schemas.google.com/g/ 2005"> <batch:operation type="update" /> <entry> <gd:email address="[email protected]" primary="true" rel="http:// schemas.google.com/g/2005#work" /> <title type="text">Test User 0updated</title> <link href="http://www.google.com/m8/feeds/photos/media/induit.de/ 6438a1ca8a831b6d/1B2M2Y8AsgTpgAmY7PhCfg" rel="http:// schemas.google.com/contacts/2008/rel#edit-photo" type="image/*" /> <link href="http://www.google.com/m8/feeds/contacts/induit.de/full/ 6438a1ca8a831b6d" rel="self" type="application/atom+xml" /> <link href="http://www.google.com/m8/feeds/contacts/induit.de/full/ 6438a1ca8a831b6d/1233055640422000" rel="edit" type="application/atom +xml" /> <category term="http://schemas.google.com/contact/2008#contact" scheme="http://schemas.google.com/g/2005#kind" /> <content type="text" /> <source> <id>http://www.google.com/m8/feeds/contacts/induit.de/full</id> <link href="http://www.google.com/m8/feeds/contacts/induit.de/ full" rel="http://schemas.google.com/g/2005#feed" type="application/ atom+xml" /> <link href="http://www.google.com/m8/feeds/contacts/induit.de/ full" rel="http://schemas.google.com/g/2005#post" type="application/ atom+xml" /> <link href="http://www.google.com/m8/feeds/contacts/induit.de/ full/batch" rel="http://schemas.google.com/g/2005#batch" type="application/atom+xml" /> <title type="text">Batch Feed</title> <updated>2009-01-27T12:27:20+01:00</updated> </source> <updated>2009-01-27T12:27:20+01:00</updated> </entry> <entry> <gd:email address="[email protected]" primary="true" rel="http:// schemas.google.com/g/2005#work" /> <title type="text">Test User 1updated</title> <link href="http://www.google.com/m8/feeds/photos/media/induit.de/ 565ab6a28f1faf82/1B2M2Y8AsgTpgAmY7PhCfg" rel="http:// schemas.google.com/contacts/2008/rel#edit-photo" type="image/*" /> <link href="http://www.google.com/m8/feeds/contacts/induit.de/full/ 565ab6a28f1faf82" rel="self" type="application/atom+xml" /> <link href="http://www.google.com/m8/feeds/contacts/induit.de/full/ 565ab6a28f1faf82/1233055640533000" rel="edit" type="application/atom +xml" /> <category term="http://schemas.google.com/contact/2008#contact" scheme="http://schemas.google.com/g/2005#kind" /> <content type="text" /> <source> <id>http://www.google.com/m8/feeds/contacts/induit.de/full</id> <link href="http://www.google.com/m8/feeds/contacts/induit.de/ full" rel="http://schemas.google.com/g/2005#feed" type="application/ atom+xml" /> <link href="http://www.google.com/m8/feeds/contacts/induit.de/ full" rel="http://schemas.google.com/g/2005#post" type="application/ atom+xml" /> <link href="http://www.google.com/m8/feeds/contacts/induit.de/ full/batch" rel="http://schemas.google.com/g/2005#batch" type="application/atom+xml" /> <title type="text">Batch Feed</title> <updated>2009-01-27T12:27:20+01:00</updated> </source> <updated>2009-01-27T12:27:20+01:00</updated> </entry> <entry> <gd:email address="[email protected]" primary="true" rel="http:// schemas.google.com/g/2005#work" /> <title type="text">Test User 2updated</title> <link href="http://www.google.com/m8/feeds/photos/media/induit.de/ 52cba980a0d385b/1B2M2Y8AsgTpgAmY7PhCfg" rel="http://schemas.google.com/ contacts/2008/rel#edit-photo" type="image/*" /> <link href="http://www.google.com/m8/feeds/contacts/induit.de/full/ 52cba980a0d385b" rel="self" type="application/atom+xml" /> <link href="http://www.google.com/m8/feeds/contacts/induit.de/full/ 52cba980a0d385b/1233055640674000" rel="edit" type="application/atom +xml" /> <category term="http://schemas.google.com/contact/2008#contact" scheme="http://schemas.google.com/g/2005#kind" /> <content type="text" /> <source> <id>http://www.google.com/m8/feeds/contacts/induit.de/full</id> <link href="http://www.google.com/m8/feeds/contacts/induit.de/ full" rel="http://schemas.google.com/g/2005#feed" type="application/ atom+xml" /> <link href="http://www.google.com/m8/feeds/contacts/induit.de/ full" rel="http://schemas.google.com/g/2005#post" type="application/ atom+xml" /> <link href="http://www.google.com/m8/feeds/contacts/induit.de/ full/batch" rel="http://schemas.google.com/g/2005#batch" type="application/atom+xml" /> <title type="text">Batch Feed</title> <updated>2009-01-27T12:27:20+01:00</updated> </source> <updated>2009-01-27T12:27:20+01:00</updated> </entry> </feed> For me it looks like that all entry elements in the second feed are missing the <batch:id> and <batch:operation> elements. And as far as I know these elements should exist according to the API documentation... Thanks in advance, Matthias --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Contacts API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-contacts-api?hl=en -~----------~----~----~----~------~----~------~--~---
