Contact Entry missing in the AtomEntryCollection

5 views
Skip to first unread message

Kulvinder Singh

unread,
May 1, 2008, 3:33:00 AM5/1/08
to google-co...@googlegroups.com
Hi,

I have a google contact given by XML feed as seen through Fiddler :

<entry><id>http://www.google.com/m8/feeds/contacts/testingaccount%40gmail.com/base/81799ef08759fec</id><updated>2008-05-01T07:07:50.273Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact'/><title type='text'>New Test -2</title><content type='text'></content><link rel='self' type='application/atom+xml' href='http://www.google.com/m8/feeds/contacts/testingaccount%40gmail.com/base/81799ef08759fec'/><link rel='edit' type='application/atom+xml' href='http://www.google.com/m8/feeds/contacts/testingaccount%40gmail.com/base/81799ef08759fec/1209625670273000'/></entry>

I am not seeing this in the AtomEntryCollection and when i debugged the code, i found that e.CreatingEntry=true and thats whay it is not being added.

Can anyone look into this and let me know the reason ?

protected void OnParsedNewEntry(object sender, FeedParserEventArgs e)
        {
            // by default, if our event chain is not hooked, add it to the collection
            Tracing.TraceCall("received new item notification");
            Tracing.Assert(e != null, "e should not be null");
            if (e == null)
            {
                throw new ArgumentNullException("e");
            }
            if (this.NewAtomEntry != null)
            {
                Tracing.TraceMsg("\t calling event dispatcher");
                this.NewAtomEntry(this, e);
            }
            // now check the return
            if (e.DiscardEntry != true)
            {
                if (e.CreatingEntry == false)
                {
                    if (e.Entry != null)
                    {
                        // add it to the collection
                        Tracing.TraceMsg("\t new AtomEntry found, adding to collection");
                        e.Entry.Service = this.Service;
                        this.Entries.Add(e.Entry);
                    }
                    else if (e.Feed != null)
                    {
                        // parsed a feed, set ourselves to it...
                        Tracing.TraceMsg("\t Feed parsed found, parsing is done...");
                    }
                }
            }

            if (e.DoneParsing == true)
            {
                this.BaseUriChanged(this.ImpliedBase);
            }

        }


Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.

Kulvinder Singh

unread,
May 1, 2008, 5:56:12 AM5/1/08
to google-co...@googlegroups.com
There were other contacts as well in the feed and their ContactEntry was created successfully.

Kulvinder Singh

unread,
May 1, 2008, 7:16:36 AM5/1/08
to google-co...@googlegroups.com
I can simply replicate this issue by adding two contact entries in UI. One with only Name and other with Name + any other info.

When i download, the entry with only name is not getting downloaded.

Kulvinder Singh

unread,
May 1, 2008, 7:27:28 AM5/1/08
to google-co...@googlegroups.com
To prove it furthur, i created 3 contacts in UI with only name in them and downloaded and surprisingly, google API parsed only one of them. However, if there is only one contact with just name in it, it is being parsed.

Kulvinder Singh

unread,
May 1, 2008, 10:48:41 PM5/1/08
to google-co...@googlegroups.com
Any Updates ?

Jeff S

unread,
May 2, 2008, 12:45:43 PM5/2/08
to Google Contacts API
Hi Kulvinder,

I'm looking into this, and I'll let you know what I find out :)

Happy coding,

Jeff
> <entry><id>http://www.google.com/m8/feeds/contacts/testingaccount%40gmail.com/ba...</id><updated>2008-05-01T07:07:50.273Z</updated><category scheme='http://schemas.google.com/g/2005#kind'term='http://schemas.google.com/contact/2008#contact'/><title type='text'>New Test -2</title><content type='text'></content><link rel='self' type='application/atom+xml' href='http://www.google.com/m8/feeds/contacts/testingaccount%40gmail.com/ba...><link rel='edit'
> type='application/atom+xml' href='http://www.google.com/m8/feeds/contacts/testingaccount%40gmail.com/ba...></entry>
>
> I am not seeing this in the AtomEntryCollection and when i debugged the code, i found that e.CreatingEntry=true and thats whay it is not being added.
>
> Can anyone look into this and let me know the reason ?
>
> protected void OnParsedNewEntry(object sender, FeedParserEventArgs e)
> {
> // by default, if our event chain is not hooked, add it to the collection
> Tracing.TraceCall("received new item notification");
> Tracing.Assert(e != null, "e should not be null");
> if (e == null)
> {
> throw new ArgumentNullException("e");
> }
> if (this.NewAtomEntry != null)
> {
> Tracing.TraceMsg("\t calling event dispatcher");
> this.NewAtomEntry(this, e);
> }
> // now check the return
> if (e.DiscardEntry != true)
> {
> if (e.CreatingEntry == false)
> {
> if (e.Entry != null)
> {
> // add it to the collection
> Tracing.TraceMsg("\t new AtomEntry found, adding to collection");
> e.Entry.Service = this.Service;
> this.Entries.Add(e.Entry);
> }
> else if (e.Feed != null)
> {
> // parsed a feed, set ourselves to it...
> Tracing.TraceMsg("\t Feed parsed found, parsing is done...");
> }
> }
> }
>
> if (e.DoneParsing == true)
> {
> this.BaseUriChanged(this.ImpliedBase);
> }
>
> }
>
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
>
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
>
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
>
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
>
> ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

Frank Mantek

unread,
May 3, 2008, 6:14:24 AM5/3/08
to google-co...@googlegroups.com
Can you send me the feed that is produced in this case?

Regards

Frank Mantek
Google

Kulvinder Singh

unread,
May 3, 2008, 6:37:44 AM5/3/08
to google-co...@googlegroups.com
Hi Frank,

The following is the XML which i got but it created only one entry (name = "Test-1") in the collection :


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'>myTest...@gmail.com2008-05-03T10:32:07.468Zhttp://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact'/>http://www.google.com/'/>http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base'/>http://schemas.google.com/g/2005#post' type='application/atom+xml' href='http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base'/>http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base?max-results=2147483647'/>contact syncmyTest...@gmail.comContacts'>http://www.google.com/m8/feeds'>Contacts312147483647http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base/64b40e218db6406b2008-05-01T12:35:16.952Zhttp://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact'/>http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base/64b40e218db6406b'/>http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base/64b40e218db6406b/1209645316952000'/>http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base/79303d328b0d16ce2008-05-01T12:34:57.306Zhttp://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact'/>http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base/79303d328b0d16ce'/>http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base/79303d328b0d16ce/1209645297306000'/>http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base/79303d328b0d16cf2008-05-01T11:24:41.839Zhttp://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact'/>http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base/79303d328b0d16cf'/>http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base/79303d328b0d16cf/1209641081839000'/>

Frank Mantek

unread,
May 5, 2008, 9:54:58 AM5/5/08
to google-co...@googlegroups.com
Ok. There was a bug in the generic atom parser regarding link entries, that i believe i have fixed. i submitted code and dlls into subversion, can you verify the fix?

Those DLLs are submitting now and should be version > 1.1.4.1

Regards

Frank Mantek
Google

Kulvinder Singh

unread,
May 6, 2008, 6:45:39 AM5/6/08
to google-co...@googlegroups.com
Hi Frank,

Thanks a lot for your prompt fixes as always. It is working fine now.

Thanks
Kulvinder Singh

----- Original Message ----
From: Frank Mantek <fma...@gmail.com>
To: google-co...@googlegroups.com
Sent: Monday, May 5, 2008 7:24:58 PM
Subject: Re: Contact Entry missing in the AtomEntryCollection

Ok. There was a bug in the generic atom parser regarding link entries, that i believe i have fixed. i submitted code and dlls into subversion, can you verify the fix?

Those DLLs are submitting now and should be version > 1.1.4.1

Regards

Frank Mantek
Google
On May 3, 2008, at 12:37 PM, Kulvinder Singh wrote:

Hi Frank,

The following is the XML which i got but it created only one entry (name = "Test-1") in the collection :


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'>myTest...@gmail.com 2008-05-03T10:32:07.468Zhttp://schemas.google.com/g/2005#kind'term='http://schemas.google.com/contact/2008#contact'/>http://www.google.com/'/>http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base'/>http://schemas.google.com/g/2005#post' type='application/atom+xml' href='http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base'/>http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base?max-results=2147483647'/> contact syncmyTest...@gmail.com Contacts'>http://www.google.com/m8/feeds'>Contacts 3 1 2147483647http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base/64b40e218db6406b 2008-05-01T12:35:16.952Zhttp://schemas.google.com/g/2005#kind'term='http://schemas.google.com/contact/2008#contact'/>http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base/64b40e218db6406b'/>http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base/64b40e218db6406b/1209645316952000'/>http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base/79303d328b0d16ce 2008-05-01T12:34:57.306Zhttp://schemas.google.com/g/2005#kind'term='http://schemas.google.com/contact/2008#contact'/>http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base/79303d328b0d16ce'/>http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base/79303d328b0d16ce/1209645297306000'/>http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base/79303d328b0d16cf 2008-05-01T11:24:41.839Zhttp://schemas.google.com/g/2005#kind'term='http://schemas.google.com/contact/2008#contact'/>http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base/79303d328b0d16cf'/>http://www.google.com/m8/feeds/contacts/myTestContact%40gmail.com/base/79303d328b0d16cf/1209641081839000'/>
Reply all
Reply to author
Forward
0 new messages