Hi Julian,
I tried it out and it works!! so thanks a lot. But ;( now I am getting
another exception as following. Do you have any idea as to why would
it come?
com.google.gdata.util.ParseException: [Line 13, Column 67243, element
gd:fullName] Missing required text content
at com.google.gdata.util.XmlParser.throwParseException(XmlParser.java:
722)
at com.google.gdata.util.XmlParser.parse(XmlParser.java:685)
at com.google.gdata.util.XmlParser.parse(XmlParser.java:568)
at com.google.gdata.data.BaseFeed.parseAtom(BaseFeed.java:793)
at com.google.gdata.wireformats.input.AtomDataParser.parse
(AtomDataParser.java:68)
at com.google.gdata.wireformats.input.AtomDataParser.parse
(AtomDataParser.java:39)
at com.google.gdata.wireformats.input.CharacterParser.parse
(CharacterParser.java:100)
at com.google.gdata.wireformats.input.XmlInputParser.parse
(XmlInputParser.java:52)
at com.google.gdata.wireformats.input.AtomDualParser.parse
(AtomDualParser.java:66)
at com.google.gdata.wireformats.input.AtomDualParser.parse
(AtomDualParser.java:34)
at com.google.gdata.client.Service.parseResponseData(Service.java:
1878)
at com.google.gdata.client.Service.getFeed(Service.java:1035)
at com.google.gdata.client.Service.getFeed(Service.java:897)
at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:
631)
at com.google.gdata.client.Service.getFeed(Service.java:916)
at Contacts.main(Contacts.java:71)
Caused by: com.google.gdata.util.ParseException: Missing required text
content
at com.google.gdata.data.AttributeHelper.consume(AttributeHelper.java:
101)
at com.google.gdata.data.extensions.FullName.consumeAttributes
(FullName.java:158)
at com.google.gdata.data.AbstractExtension
$AttributesHandler.processEndElement(AbstractExtension.java:243)
at com.google.gdata.util.XmlParser.endElement(XmlParser.java:996)
at org.xml.sax.helpers.ParserAdapter.endElement(ParserAdapter.java:
626)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement
(AbstractSAXParser.java:593)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement
(XMLDocumentFragmentScannerImpl.java:1774)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl
$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2930)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next
(XMLDocumentScannerImpl.java:648)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next
(XMLNSDocumentScannerImpl.java:140)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument
(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
(XML11Configuration.java:807)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse
(XMLParser.java:107)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse
(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl
$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.xml.sax.helpers.ParserAdapter.parse(ParserAdapter.java:405)
at com.google.gdata.util.XmlParser.parse(XmlParser.java:677)
... 14 more
On Jun 28, 5:59 am, "Julian (Google)" <[email protected]> wrote:
> Hi,
>
> From a previews
> thread:http://groups.google.com/group/google-contacts-api/browse_thread/thre...
>
> Try adding the parameter ?max-results=1000 to your feed URL.
>
> --Julian.
>
> On Jun 28, 9:03 am, "Behzad Tabibian" <[email protected]> wrote:
>
> > Dear Jay,
> > I believe you are using Java API, I think Java API doesn't have autopaging
> > property(which should be located in Service object, in .Net API it's located
> > in RequestSetting class) so you may need to use queries and setMaxResults
> > method to retrieve maximum number of contacts you wish.
>
> > BT
>
> > -----Original Message-----
> > From: [email protected]
>
> > [mailto:[email protected]] On Behalf Of Jay Kapadia
> > Sent: Sunday, June 28, 2009 4:54 AM
> > To: Google Contacts API
> > Subject: [Contacts API] Re: Regarding contacts returned
>
> > Hi Behzad,
> > Which object or a class will I find the property. Do you have the
> > source code?
>
> > Thanks
> > Jay
>
> > On Jun 26, 11:50 pm, "Behzad Tabibian" <[email protected]> wrote:
> > > Hi Jay,
> > > I think you need to set AutoPaging value of your service to True so you
> > can
> > > retrieve all contacts.
>
> > > Cheers
> > > BT
>
> > > -----Original Message-----
> > > From: [email protected]
>
> > > [mailto:[email protected]] On Behalf Of Jay Kapadia
> > > Sent: Saturday, June 27, 2009 11:17 AM
> > > To: Google Contacts API
> > > Subject: [Contacts API] Regarding contacts returned
>
> > > Hi,
> > > I am trying to fetch gmail contacts from my account. I am getting only
> > > the top 25 records. Following is the code.
>
> > > userName = args[0];
> > > password = args[1];
> > > // Create a new Contacts service
> > > myService = new ContactsService("My Application");
> > > try {
> > > myService.setUserCredentials(userName, password);
> > > } catch (AuthenticationException e) {
> > > // TODO Auto-generated catch block
> > > e.printStackTrace();
> > > }
> > > // Get a list of all entries
> > > URL metafeedUrl = null;
> > > try {
> > > metafeedUrl = new
> > > URL("http://www.google.com/m8/feeds/contacts/"
> > > + userName + "@gmail.com/full");
> > > } catch (MalformedURLException e) {
> > > // TODO Auto-generated catch block
> > > e.printStackTrace();
> > > }
>
> > > ContactFeed resultFeed = null;
> > > try {
> > > resultFeed = myService.getFeed(metafeedUrl,
> > > ContactFeed.class);
> > > entries = resultFeed.getEntries();
> > > } catch (IOException e) {
> > > // TODO Auto-generated catch block
> > > e.printStackTrace();
> > > } catch (ServiceException e) {
> > > // TODO Auto-generated catch block
> > > e.printStackTrace();
> > > }
>
> > > Jay Kapadia
>
> > > Checked by AVG -www.avg.com
> > > Version: 8.5.374 / Virus Database: 270.12.93/2204 - Release Date: 06/26/09
> > > 18:00:00
>
> > Checked by AVG -www.avg.com
> > Version: 8.5.374 / Virus Database: 270.12.93/2204 - Release Date: 06/27/09
> > 05:53:00
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Contacts 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-contacts-api?hl=en
-~----------~----~----~----~------~----~------~--~---