Welcome to WebmasterWorld Guest from 50.19.53.104

Forum Moderators: open

Message Too Old, No Replies

Google WebmasterTools Java GData API Issue

An XML parsing issue using Google's WebmasterTools Java GData API

     

dugald

10:34 pm on Mar 25, 2010 (gmt 0)

5+ Year Member



I'm trying to run Google's WebmasterToolsClient Java sample code [code.google.com], but am getting the stack trace shown at the bottom of my post.

I've tried running the code on Windows XP and Mac OS X, but both OS's get this problem. I'm using gdata-1.40.3 and have tried 1.5 and 1.6 JVMs.

Can anyone get this code running or suggest how to resolve the issue?


Running with user: #*$!XX
Printing user's sites:
com.google.gdata.util.ParseException: [Line 1, Column 2564, element wt:verification-method] Unknown attribute: 'file-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:838)
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:2036)
at com.google.gdata.client.Service.getFeed(Service.java:1074)
at com.google.gdata.client.Service.getFeed(Service.java:936)
at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:638)
at com.google.gdata.client.Service.getFeed(Service.java:955)
at sample.webmastertools.WebmasterToolsClient.printUserSites(WebmasterToolsClient.java:144)
at sample.webmastertools.WebmasterToolsClient.runExamples(WebmasterToolsClient.java:468)
at sample.webmastertools.WebmasterToolsClient.main(WebmasterToolsClient.java:438)
Caused by: com.google.gdata.util.ParseException: Unknown attribute: 'file-content'
at com.google.gdata.data.AttributeHelper.assertAllConsumed(AttributeHelper.java:522)
at com.google.gdata.data.AbstractExtension$AttributesHandler.processEndElement(AbstractExtension.java:244)
at com.google.gdata.util.XmlParser.endElement(XmlParser.java:996)
at org.xml.sax.helpers.ParserAdapter.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)Sample run completed.

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.xml.sax.helpers.ParserAdapter.parse(Unknown Source)
at com.google.gdata.util.XmlParser.parse(XmlParser.java:677)
... 16 more

dugald

12:13 am on Mar 26, 2010 (gmt 0)

5+ Year Member



This is fixed now by gdata-1.41.1
 

Featured Threads

Hot Threads This Week

Hot Threads This Month