I have a lot more info about this problem. I'm beginning to think I have missed something really fundamental about the batch processing interface. Hopefully, someone will see the problem.
Here is what I discovered. My items were being deleted. But, amazingly, for each item that was deleted another was inserted! The inserted item has the attributes and values of the deleted item but, obviously, a different id. Below is the XML for the delete sequence. I have annotated the interesting sections. Hopefully, sharper eyes than mine will spot what is going on. Thanks for any ideas, -=beeky This is the feed before any entries have been added <atom:feed xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'> <atom:id>http://www.google.com/base/feeds/items</atom:id> <atom:updated>2008-09-29T20:31:06.831Z</atom:updated> <atom:title type='text'>Items matching query: [customer id(int): 4694225]</atom:title> <atom:link rel='alternate' type='text/html' href='http:// base.google.com'/> <atom:link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.google.com/base/feeds/ items'/> <atom:link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='http://www.google.com/base/feeds/ items'/> <atom:link rel='http://schemas.google.com/g/2005#batch' type='application/atom+xml' href='http://www.google.com/base/feeds/ items/batch'/> <atom:link rel='self' type='application/atom+xml' href='http:// www.google.com/base/feeds/items?start-index=1&max-results=25'/> <atom:author> <atom:name>Google Inc.</atom:name> <atom:email>[EMAIL PROTECTED]</atom:email> </atom:author> <atom:generator version='1.0' uri='http://base.google.com'>GoogleBase</ atom:generator> <openSearch:totalResults>1</openSearch:totalResults> <openSearch:startIndex>1</openSearch:startIndex> <openSearch:itemsPerPage>25</openSearch:itemsPerPage> <g:customer_id xmlns:g='http://base.google.com/ns/1.0' type='int'>4694225</g:customer_id> <!-- this is the entry I intend to delete --> <atom:entry> <atom:id>http://www.google.com/base/feeds/items/5381120016999159792</ atom:id> <atom:published>2008-09-29T20:28:00.000Z</atom:published> <atom:updated>2008-09-29T20:28:00.000Z</atom:updated> <app:control xmlns:app='http://purl.org/atom/app#'> <app:draft>yes</app:draft> </app:control> <atom:category scheme='http://base.google.com/categories/itemtypes' term='biogeographic data'/> <atom:title type='text'>Eudyptes crestatus</atom:title> <atom:content type='html'> </atom:content> <atom:link rel='alternate' type='text/html' href='http:// base.google.com/base/a/4694225/D5381120016999159792'/> <atom:link rel='self' type='application/atom+xml' href='http:// www.google.com/base/feeds/items/5381120016999159792'/> <atom:link rel='edit' type='application/atom+xml' href='http:// www.google.com/base/feeds/items/5381120016999159792'/> <atom:author> <atom:name>beeky</atom:name> <atom:email>[EMAIL PROTECTED]</atom:email> </atom:author> <g:cache_id xmlns:g='http://base.google.com/ns/1.0' type='text'>13233051</g:cache_id> <g:application xmlns:g='http://base.google.com/ns/1.0' type='text'>BuldInsertOBIS</g:application> <g:target_country xmlns:g='http://base.google.com/ns/1.0' type='text'>US</g:target_country> <g:location xmlns:g='http://base.google.com/ns/1.0' type='location'>location<g:longitude>-66.2167</g:longitude> <g:latitude>-53.2167</g:latitude> </g:location> <g:expiration_date xmlns:g='http://base.google.com/ns/1.0' type='dateTime'>2038-01-19T03:14:07Z</g:expiration_date> <g:customer_id xmlns:g='http://base.google.com/ns/1.0' type='int'>4694225</g:customer_id> <g:depth xmlns:g='http://base.google.com/ns/1.0' type='float'>0.0</ g:depth> <g:item_language xmlns:g='http://base.google.com/ns/1.0' type='text'>en</g:item_language> <g:validname xmlns:g='http://base.google.com/ns/1.0' type='text'>Eudyptes crestatus</g:validname> <g:item_type xmlns:g='http://base.google.com/ns/1.0' type='text'>biogeographic data</g:item_type> <gd:feedLink xmlns:gd='http://schemas.google.com/g/2005' rel='media' href='http://www.google.com/base/feeds/items/5381120016999159792/ media' countHint='0'/> </atom:entry> </atom:feed> This is the feed after the delete entry has been added. This feed is sent to Google. <atom:feed xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'> <atom:id>http://www.google.com/base/feeds/items</atom:id> <atom:updated>2008-09-29T20:31:06.831Z</atom:updated> <atom:title type='text'>Items matching query: [customer id(int): 4694225]</atom:title> <atom:link rel='alternate' type='text/html' href='http:// base.google.com'/> <atom:link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.google.com/base/feeds/ items'/> <atom:link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='http://www.google.com/base/feeds/ items'/> <atom:link rel='http://schemas.google.com/g/2005#batch' type='application/atom+xml' href='http://www.google.com/base/feeds/ items/batch'/> <atom:link rel='self' type='application/atom+xml' href='http:// www.google.com/base/feeds/items?start-index=1&max-results=25'/> <atom:author> <atom:name>Google Inc.</atom:name> <atom:email>[EMAIL PROTECTED]</atom:email> </atom:author> <atom:generator version='1.0' uri='http://base.google.com'>GoogleBase</ atom:generator> <openSearch:totalResults>1</openSearch:totalResults> <openSearch:startIndex>1</openSearch:startIndex> <openSearch:itemsPerPage>25</openSearch:itemsPerPage> <g:customer_id xmlns:g='http://base.google.com/ns/1.0' type='int'>4694225</g:customer_id> <atom:entry> <atom:id>http://www.google.com/base/feeds/items/5381120016999159792</ atom:id> <atom:published>2008-09-29T20:28:00.000Z</atom:published> <atom:updated>2008-09-29T20:28:00.000Z</atom:updated> <app:control xmlns:app='http://purl.org/atom/app#'> <app:draft>yes</app:draft> </app:control> <atom:category scheme='http://base.google.com/categories/itemtypes' term='biogeographic data'/> <atom:title type='text'>Eudyptes crestatus</atom:title> <atom:content type='html'> </atom:content> <atom:link rel='alternate' type='text/html' href='http:// base.google.com/base/a/4694225/D5381120016999159792'/> <atom:link rel='self' type='application/atom+xml' href='http:// www.google.com/base/feeds/items/5381120016999159792'/> <atom:link rel='edit' type='application/atom+xml' href='http:// www.google.com/base/feeds/items/5381120016999159792'/> <atom:author> <atom:name>beeky</atom:name> <atom:email>[EMAIL PROTECTED]</atom:email> </atom:author> <g:cache_id xmlns:g='http://base.google.com/ns/1.0' type='text'>13233051</g:cache_id> <g:application xmlns:g='http://base.google.com/ns/1.0' type='text'>BuldInsertOBIS</g:application> <g:target_country xmlns:g='http://base.google.com/ns/1.0' type='text'>US</g:target_country> <g:location xmlns:g='http://base.google.com/ns/1.0' type='location'>location<g:longitude>-66.2167</g:longitude> <g:latitude>-53.2167</g:latitude> </g:location> <g:expiration_date xmlns:g='http://base.google.com/ns/1.0' type='dateTime'>2038-01-19T03:14:07Z</g:expiration_date> <g:customer_id xmlns:g='http://base.google.com/ns/1.0' type='int'>4694225</g:customer_id> <g:depth xmlns:g='http://base.google.com/ns/1.0' type='float'>0.0</ g:depth> <g:item_language xmlns:g='http://base.google.com/ns/1.0' type='text'>en</g:item_language> <g:validname xmlns:g='http://base.google.com/ns/1.0' type='text'>Eudyptes crestatus</g:validname> <g:item_type xmlns:g='http://base.google.com/ns/1.0' type='text'>biogeographic data</g:item_type> <gd:feedLink xmlns:gd='http://schemas.google.com/g/2005' rel='media' href='http://www.google.com/base/feeds/items/5381120016999159792/ media' countHint='0'/> </atom:entry> <!-- the delete entry as generated by the client --> <atom:entry> <atom:id>http://www.google.com/base/feeds/items/5381120016999159792</ atom:id> <batch:operation xmlns:batch='http://schemas.google.com/gdata/batch' type='delete'/> </atom:entry> </atom:feed> the result feed <atom:feed xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'> <atom:id>http://www.google.com/base/feeds/items</atom:id> <atom:updated>2008-09-29T20:31:07.471Z</atom:updated> <atom:title type='text'>Items matching query: [customer id(int): 4694225]</atom:title> <atom:link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.google.com/base/feeds/ items'/> <atom:link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='http://www.google.com/base/feeds/ items'/> <atom:link rel='http://schemas.google.com/g/2005#batch' type='application/atom+xml' href='http://www.google.com/base/feeds/ items/batch'/> ???????? where did this come from. It apparently does an insert using the values from the deleted entry creating id ...4844! <atom:entry> <atom:id>http://www.google.com/base/feeds/items/5298379408417094844</ atom:id> <atom:published>2008-09-29T20:31:07.000Z</atom:published> <atom:updated>2008-09-29T20:31:07.000Z</atom:updated> <app:control xmlns:app='http://purl.org/atom/app#'> <app:draft>yes</app:draft> </app:control> <atom:category scheme='http://base.google.com/categories/itemtypes' term='biogeographic data'/> <atom:title type='text'>Eudyptes crestatus</atom:title> <atom:content type='html'> </atom:content> <atom:link rel='alternate' type='text/html' href='http:// base.google.com/base/a/4694225/D5381120016999159792'/> <atom:link rel='self' type='application/atom+xml' href='http:// www.google.com/base/feeds/items/5298379408417094844'/> <atom:link rel='edit' type='application/atom+xml' href='http:// www.google.com/base/feeds/items/5298379408417094844'/> <atom:author> <atom:name>beeky</atom:name> <atom:email>[EMAIL PROTECTED]</atom:email> </atom:author> <g:cache_id xmlns:g='http://base.google.com/ns/1.0' type='text'>13233051</g:cache_id> <g:application xmlns:g='http://base.google.com/ns/1.0' type='text'>BulkDeleteOBIS</g:application> <g:target_country xmlns:g='http://base.google.com/ns/1.0' type='text'>US</g:target_country> <g:location xmlns:g='http://base.google.com/ns/1.0' type='location'>location<g:longitude>-66.2167</g:longitude> <g:latitude>-53.2167</g:latitude> </g:location> <g:expiration_date xmlns:g='http://base.google.com/ns/1.0' type='dateTime'>2038-01-19T03:14:07Z</g:expiration_date> <g:customer_id xmlns:g='http://base.google.com/ns/1.0' type='int'>4694225</g:customer_id> <g:depth xmlns:g='http://base.google.com/ns/1.0' type='float'>0.0</ g:depth> <g:item_language xmlns:g='http://base.google.com/ns/1.0' type='text'>en</g:item_language> <g:item_type xmlns:g='http://base.google.com/ns/1.0' type='text'>biogeographic data</g:item_type> <g:validname xmlns:g='http://base.google.com/ns/1.0' type='text'>Eudyptes crestatus</g:validname> <batch:status xmlns:batch='http://schemas.google.com/gdata/batch' code='201' reason='Created'/> <batch:operation xmlns:batch='http://schemas.google.com/gdata/batch' type='insert'/> <gd:feedLink xmlns:gd='http://schemas.google.com/g/2005' rel='media' href='http://www.google.com/base/feeds/items/5298379408417094844/ media' countHint='0'/> </atom:entry> <!-- the entry was successfully deleted <atom:entry> <atom:id>http://www.google.com/base/feeds/items/5381120016999159792</ atom:id> <atom:updated>2008-09-29T20:31:07.492Z</atom:updated> <atom:title type='text'>Deleted</atom:title> <atom:content type='text'>Deleted</atom:content> <batch:status xmlns:batch='http://schemas.google.com/gdata/batch' code='200' reason='Success'/> <batch:operation xmlns:batch='http://schemas.google.com/gdata/batch' type='delete'/> </atom:entry> </atom:feed> On Sep 29, 11:00 am, icebackhaz <[EMAIL PROTECTED]> wrote: > The only thing different with what I'm doing is that I add > BatchUtils.declareEntryExtensions(service.getExtensionProfile()); > > (Hm, I see I'm doing it for each item which doesn't make sense, since > there is not (obvious) per entry association!) > > On Sep 26, 1:43 pm, beeky <[EMAIL PROTECTED]> wrote: > > > I put together a command line app to read item ids from a file and > > send a batch of delete requests. The file of ids was created by a > > similar app that does a batch insert and writes the ids to a file when > > an insert is successful. > > > while (( line = idLog.readLine()) != null){ > > GoogleBaseEntry gentry = new GoogleBaseEntry() ; > > gentry.setId ( line ); > > BatchUtils.setBatchOperationType(gentry, BatchOperationType.DELETE > > ); > > feed.addEntry(gentry); > > > } > > > GoogleBaseFeed result = > > service.batch(FeedURLFactory.getDefault().getItemsBatchFeedURL(),feed); > > > BatchUtils.isSuccess() is true for all of the GoogleBaseEntry objects > > in result but the items are not deleted. > > > What am I missing? This seems like the most simple of batch > > operations. > > > -=beeky --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Base Data 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-Base-data-API?hl=en -~----------~----~----~----~------~----~------~--~---
