Update Contact Group Info

184 views
Skip to first unread message

letsgo

unread,
May 18, 2009, 12:45:08 PM5/18/09
to Google Contacts API
In my effort to update a Contact's Group Membership I am getting error
code 400 and this message. I am attaching my XML , can someone please
point me where I am making the mistake.


Error 400 - The prefix "gContact" for element
"gContact:groupMembershipInfo" is not bound

'<?xml version=\'1.0\' encoding=\'UTF-8\' ?>
<entry xmlns=\'http://www.w3.org/2005/Atom\'
xmlns:gd=\'http://schemas.google.com/g/2005\'>
<id>http://www.google.com/m8/feeds/contacts/xxx%40xxx.com/base/
3548c88e8a736b8b</id>
<updated>2009-05-15T21:37:41.928Z</updated>
<category scheme=\'http://schemas.google.com/g/2005#kind\'
term=\'http://schemas.google.com/contact/2008#contact\' />
<link rel=\'self\' type=\'application/atom+xml\'
href=\'http://www.google.com/m8/feeds/contacts/xxx%40xxxx.com/base/
3xxxxxx\' />
<link rel=\'edit\' type=\'application/atom+xml\'
href=\'http://www.google.com/m8/feeds/contacts/xxxx%40xxx.com/base/
3xxxxx\' />
<gd:email rel=\'http://schemas.google.com/g/2005#work\'
address=\'xxx...@xxx.com \' />
<gContact:groupMembershipInfo deleted=\'false\'
href=\'http://www.google.com/m8/feeds/groups/rogting
%40student.fdu.edu/base/297a0f2e8d34a436\' />
</entry> '

Julian (Google)

unread,
May 19, 2009, 11:39:33 AM5/19/09
to Google Contacts API
Hi,

You are missing the Contacts namespace, you try using the following:

<entry xmlns='http://www.w3.org/2005/Atom'
xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
xmlns:gContact='http://schemas.google.com/contact/2008'
xmlns:gd='http://schemas.google.com/g/2005'>

Cheers,
Julian.

On May 18, 5:45 pm, letsgo <jack.singh....@gmail.com> wrote:
> In my effort to update a Contact's Group Membership I am getting error
> code 400 and this message. I am attaching my XML , can someone please
> point me where I am making the mistake.
>
> Error 400 - The prefix &quot;gContact&quot; for element
> &quot;gContact:groupMembershipInfo&quot; is not bound
>
> '<?xml version=\'1.0\' encoding=\'UTF-8\' ?>
>  <entry xmlns=\'http://www.w3.org/2005/Atom\'
>  xmlns:gd=\'http://schemas.google.com/g/2005\'>
> <id>http://www.google.com/m8/feeds/contacts/xxx%40xxx.com/base/
> 3548c88e8a736b8b</id>
>  <updated>2009-05-15T21:37:41.928Z</updated>
>  <category scheme=\'http://schemas.google.com/g/2005#kind\'
>    term=\'http://schemas.google.com/contact/2008#contact\' />
>  <link rel=\'self\' type=\'application/atom+xml\'
>   href=\'http://www.google.com/m8/feeds/contacts/xxx%40xxxx.com/base/
> 3xxxxxx\'  />
> <link rel=\'edit\' type=\'application/atom+xml\'
>   href=\'http://www.google.com/m8/feeds/contacts/xxxx%40xxx.com/base/
> 3xxxxx\' />
>         <gd:email rel=\'http://schemas.google.com/g/2005#work\'
>         address=\'xxx_...@xxx.com \' />

Jaskaran Singh

unread,
May 21, 2009, 1:29:22 PM5/21/09
to google-co...@googlegroups.com
Thanks Julian
Reply all
Reply to author
Forward
0 new messages