New contact via request Http

19 views
Skip to first unread message

siriemy

unread,
Apr 11, 2012, 5:09:34 AM4/11/12
to google-co...@googlegroups.com
Hello,
I'm trying to create a new gmail contact by request Httppost.
I create this body request:
 
 <atom:entry xmlns:atom='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'>
   <atom:category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact'/>
   <gd:name>
      <gd:givenName>aaa</gd:givenName>
      <gd:familyName>ccc</gd:familyName>
      <gd:fullName>ccc</gd:fullName>
   </gd:name>
   <atom:content type='text'>Notes</atom:content>
   <gd:email rel='http://schemas.google.com/g/2005#work' primary='true' address='a...@gmail.com' displayName='E. Bennet'/>
   <gd:email rel='http://schemas.google.com/g/2005#home' address='aa...@example.org'/>
   <gd:phoneNumber rel='http://schemas.google.com/g/2005#work' primary='true'>1111</gd:phoneNumber>
   <gd:phoneNumber rel='http://schemas.google.com/g/2005#home'>2222</gd:phoneNumber>
   <gd:im address='c...@gmail.com' protocol='http://schemas.google.com/g/2005#GOOGLE_TALK' primary='true' rel='http://schemas.google.com/g/2005#home'/>
 </atom:entry>
 
The response is "Http/1.1 201 Created". If I go on gmail I see the new contact but the names are empty (givenName,familyName and fullname).
Is there something of wrong in my request ?
 
Thanks
Andrea
Reply all
Reply to author
Forward
0 new messages