saqibpitafi / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

ContactEntry.Update() fails With Blank Org Name or Title #218

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Initialize a new ContactEntry object from an existing or new contact.
2. Set the default (Organizations[0]) Name or Title properties to a blank 
string ("").
3. Call Update() on the ContactEntry object.

What is the expected output? What do you see instead?
Expect to see nothing, the ContactEntry object should be written back to 
the server without error. Instead I am getting a GDataRequestException 
thrown. The server is responding with the HTTP "Bad Request" status code. 
The response string is "[Line 5, Column 20, element gd:orgTitle] Missing 
required text content".

Please use labels and text to provide additional information.
Stack trace from OUTER exception 
(Google.GData.Client.GDataRequestException):
   at Google.GData.Client.GDataRequest.Execute()
   at Google.GData.Client.GDataGAuthRequest.Execute(Int32 retryCounter)
   at Google.GData.Client.GDataGAuthRequest.Execute()
   at Google.GData.Client.Service.EntrySend(Uri feedUri, AtomBase 
baseEntry, GDataRequestType type, AsyncSendData data)
   at Google.GData.Client.Service.Update(AtomEntry entry, AsyncSendData 
data)
   at Google.GData.Client.Service.Update(AtomEntry entry)
   at Google.GData.Client.AtomEntry.Update()
   at Google.GData.Contacts.ContactEntry.Update()
   at QGC.FrmContactCard.WriteDataToContactCard() in 
C:\Users\gkaiser\Documents\Visual Studio 
2008\Projects\QGC\QGC\FrmContactCard.cs:line 231
   at QGC.FrmContactCard.btOK_Click(Object sender, EventArgs e) in 
C:\Users\gkaiser\Documents\Visual Studio 
2008\Projects\QGC\QGC\FrmContactCard.cs:line 29

Stack trace from INNER exception (System.Net.WebException):
   at System.Net.HttpWebRequest.GetResponse()
   at Google.GData.Client.GDataRequest.Execute()

If there is any more information I can provide please do not hesitate to 
let me know. This is using the .NET Framework 2.0.

Original issue reported on code.google.com by grkaiser@gmail.com on 11 Feb 2009 at 1:57

GoogleCodeExporter commented 9 years ago
This thread in Google Groups also seems to be dealing with the same issue: 
http://groups.google.com/group/google-contacts-
api/browse_thread/thread/6f1fe17d2b6dceea

Original comment by grkaiser@gmail.com on 11 Feb 2009 at 1:57

GoogleCodeExporter commented 9 years ago
ok. changed code in subversion to accomodate this. if you know do a org.Title 
="" or org.Title=null it will 
remove that element.

Same is true for the Name .

Will be in release 1.4.0.0 and after

Original comment by fman...@gmail.com on 18 Feb 2009 at 12:01