Hi,
The reason you are getting the exception is most likely because there is
already a ACL rule for scope=default, so you have to update this existing
rule instead of trying to insert one with the same scope. A code snippet to
enable a calendar to be publicly readable -
public void setAcl() throws Exception {
AclEntry entry = new AclEntry();
entry.setScope(new AclScope(AclScope.Type.DEFAULT, null));
entry.setRole(CalendarAclRole.READ);
URL aclUrl =
new URL("http://www.google.com/calendar/feeds/default/acl/full/default");
myService.update(aclUrl, entry);
}
Hope it helps,
Austin
On Feb 4, 2008 4:47 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
>
> Hope someone can give me some guidance.
>
>
> Here's the stack trace :
>
> compile-single:
> run-single:
> Exception in thread "main" java.lang.IllegalStateException: attribute
> value should not be set for default type
> at com.google.gdata.data.acl.AclScope.validate(Unknown Source)
> at com.google.gdata.data.AbstractExtension.generate(Unknown
> Source)
> at
> com.google.gdata.data.ExtensionPoint.generateExtensions(Unknown
> Source)
> at com.google.gdata.data.BaseEntry.generateAtom(Unknown
> Source)
> at com.google.gdata.client.Service.insert(Unknown Source)
> at com.google.gdata.client.GoogleService.insert(Unknown
> Source)
> at test.TestGoogleACL.main(TestGoogleACL.java:31)
> Java Result: 1
> BUILD SUCCESSFUL (total time: 1 second)
>
>
> Big thanks to everyone who read =)
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Calendar 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-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---