As you may have caught on by this point, I've ported the Provisioning API to the GData Objective-C Client Library. It's been working well, but I just noticed one place where I had accidentally used fetchEntryWithURL:delegate:didFinishSelector: instead of fetchEntryByUpdatingEntry:forEntryURL:delegate:didFinishSelector: when working with my GDataEntryBase subclass for Group entries. Switching it over now results in the following errors:
-:1: namespace error : Namespace prefix apps on property is not defined
domain.tld</id><apps:property name="groupId" value="grou...@domain.tld"
-:1: namespace error : Namespace prefix apps on property is not defined
ain.tld"></apps:property><apps:property name="groupName" value="Group Name"
-:1: namespace error : Namespace prefix apps on property is not defined
Group Name"></apps:property><apps:property name="emailPermission" value="Domain"
-:1: namespace error : Namespace prefix apps on property is not defined
e="Domain"></apps:property><apps:property name="permissionPreset" value="Custom"
-:1: namespace error : Namespace prefix apps on property is not defined
reset" value="Custom"></apps:property><apps:property name="description" value=""
2013-03-06 17:10:00.886 My App Name[57390:c03] Could not parse error: Error Domain=NSXMLParserErrorDomain Code=4 "Line 1: Document is empty
" UserInfo=0x6a5a600 {NSLocalizedDescription=Line 1: Document is empty
}
This is when taking a single group entry returned by my group feed and immediately update it with no changes. The entry from the fetch feed XML response is as follows:
<updated>2013-03-06T21:27:16.006Z</updated>
<apps:property name="groupId" value="grou...@domain.tld"/>
<apps:property name="groupName" value="Group Name"/>
<apps:property name="emailPermission" value="Domain"/>
<apps:property name="permissionPreset" value="Custom"/>
<apps:property name="description" value=""/>
</entry>
I am able to correctly read the properties from my GDataEntryBase subclass, so it's parsing it correctly and understanding the namespaces. However, when I run fetchEntryByUpdatingEntry:forEntryURL:delegate:didFinishSelector: on the unchanged object (and the aforementioned errors are displayed), the following is the request XML that is actually sent (note the lack of the 'apps' namespace on the property elements, due to the errors):
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<property name="groupId" value="grou...@domain.tld"/>
<property name="groupName" value="Group Name"/>
<updated>2013-03-06T21:27:16.006Z</updated>
</entry>
And the XML response I get back is the following truncated error:
I've been pouring through my code and am not seeing any difference between my working user GDataEntryBase subclass and broken group GDataEntryBase subclass, nor any difference between my working GDataObject subclasses which are used for 'apps:login', 'apps:name', 'apps:nickname', etc., elements and the apparently broken (but working for other fetches) GDataObject subclass for 'apps:property' elements.
I have noticed that while 'entry' elements from working user fetch feeds do not have the namespace URL attributes specified, for example:
The namespace URLs are automatically added to the 'entry' element when using fetchEntryByUpdatingEntry:forEntryURL:delegate:didFinishSelector:, for example:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<apps:quota limit="25600"/>
<updated>1970-01-01T00:00:00.000Z</updated>
<apps:login agreedToTerms="true" changePasswordAtNextLogin="false" userName="username" ipWhitelisted="false" suspended="false" admin="false"/>
<apps:name familyName="Name" givenName="User"/>
<title>username</title>
</entry>
However, in the failing use of fetchEntryByUpdatingEntry:forEntryURL:delegate:didFinishSelector: with the group GDataEntryBase subclass (the one with the namespace errors), those namespace URL attributes are not being automatically added to the 'entry' element.
Any tips as to where things might be going wrong would be _greatly_ appreciated as I'm having a horrendous time tracing this particular issue.