fetchEntryByUpdatingEntry:delegate:didFinishSelector: sending initial fetched XML instead of updated properties in GDataEntryBase subclass

17 views
Skip to first unread message

Morgan Aldridge

unread,
Feb 22, 2013, 1:05:22 PM2/22/13
to gdata-objec...@googlegroups.com
I have subclassed GDataServiceBase, GDataFeedBase, and GDataEntryBase to work with the Provisioning API and all seems to be working well (creating, fetching, deleting users, groups, nicknames, group memberships, etc.), but I've run into an issue with updating users. I'm finding that when I call fetchEntryByUpdatingEntry:delegate:didFinishSelector: and pass it my GDataEntryBase subclass, it works correctly (performs a PUT to the correct URL) and returns a 200 response code, but when I view the log of the data request & response, the request is exactly the XML that was returned by fetchFeedWithURL:delegate:didFinishSelector: and none of the modifications to the properties are included.

My classes for 'apps:login', 'apps:name', etc., properties are--following the examples set by the rest of the GData.framework implementation, subclasses of GDataObject and use stringValueForAttribute:/setStringValue:forAttribute: & boolValueForAttribute:/setBoolValue:defaultValue:forAttribute: to get/set their values and my GDataEntryBase subclass uses objectForExtensionClass:/setObject:forExtensionClass: (this all seems to work correctly as I can confirm that the correct objects with the correct values are in my GDataEntryBase subclass instance immediately before passing to fetchEntryByUpdatingEntry:delegate:didFinishSelector:).

I've poured through the GData.framework implementation and am not quite seeing where it decides to send the XML instead of building it from the objects in my GDataEntryBase subclass, if that's even what's happening. What might I be missing here? Any hints as to where to further troubleshoot would be greatly appreciated.

I'm about to start changing some code over to creating new instances of my GDataEntryBase subclass, setting the appropriate properties, copying the ETag from the fetched object, and try passing that to fetchEntryByUpdatingEntry:delegate:didFinishSelector: instead of modifying the same instance I fetched, but all documentation points to my not needing to do it that way (and I don't want to accidentally miss/remove some properties during the update).

Morgan Aldridge

unread,
Feb 22, 2013, 4:17:58 PM2/22/13
to gdata-objec...@googlegroups.com
Okay, I found & resolved the issue: I had misunderstood the functionality of setBoolValue:defaultValue:forAttribute:. By replacing with setExplicitBoolValue:forAttribute: I was able to solve my issues.
Reply all
Reply to author
Forward
0 new messages