Hi Charlie, To confirm - you're moving from the old java library<https://code.google.com/p/google-api-adwords-java/>using AdWordsUser to the new java library <https://code.google.com/p/google-api-ads-java/> using AdWordsSession, right? It also looks like you're just using the new library on your classpath (based on the class names in the stack trace). I could have sworn I added logging for the report download URL endpoint - are you seeing the URL in your logs? That particular message usually means that the service at the endpoint you're trying to download from is misconfigured.
- Kevin Winter AdWords API Team On Friday, February 8, 2013 1:40:40 PM UTC-5, Charlie Saunders wrote: > > Hi everyone, > > I'm new to this forum and topic, so please forgive me if I have posted > this in the wrong location or if this is a very newbie question. > > I'm attempting to migrate some Java based tools that use the AdWords API > from using AdWordsUser (having the email/password in the source) to > OAuth2, getting the credential using > setServiceAccountPrivateKeyFromP12File. > > Since I no longer have an AdWords user, I was looking to change from this: > ReportDownloadResponse response = ReportUtils.downloadReport(user, > reportDefinition, fos); > > to this: > ReportDownloadResponse response = new > ReportDownloader(adwordsApiSession).downloadReport(reportDefinition); > > It seems like my OAuth validation is successful (I can mess up the user > name, for example, and I will get a message that validation failed), but my > download fails with the following message/stack trace (UrlUpdater is the > name of my class): > > [Fatal Error] :2:12: Open quote is expected for attribute "{1}" associated > with an element type "lang". > [08 Feb 2013 13:33:35,331-report_download:ERROR:AWT-EventQueue-0] Couldn't > process XML into a Document > HTTP Response Code: 503, ErrorText: <!DOCTYPE html> > org.xml.sax.SAXParseException: Open quote is expected for attribute "{1}" > associated with an element type "lang". > <html lang=en> > <meta charset=utf-8> > <meta name=viewport content="initial-scale=1, minimum-scale=1, > width=device-width"> > <title>Error 503 (Server Error)!!1</title> > <style> > *{margin:0;padding:0}html,code{font:15px/22px > arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% > auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px > no-repeat;padding-right:205px}p{margin:11px 0 > 22px;overflow:hidden}ins{color:#777;text-decoration:none}a > img{border:0}@media screen and > (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}} > </style> > <a href=//www.google.com/><img src=// > www.google.com/images/errors/logo_sm.gif alt=Google></a> > <p><b>503.</b> <ins>That’s an error.</ins> > <p>The service you requested is not available at this time.<p>Service > error -27. <ins>That’s all we know.</ins> > > at > com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:246) > at > com.google.api.ads.adwords.lib.utils.v201209.ReportDownloader.handleResponse(ReportDownloader.java:119) > at > com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284) > at > com.google.api.ads.adwords.lib.utils.v201209.ReportDownloader.downloadReport(ReportDownloader.java:93) > at urlupdater.UrlUpdater.downloadAdHocReport(UrlUpdater.java:487) > at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124) > at urlupdater.UrlUpdater.<init>(UrlUpdater.java:441) > at > com.google.api.ads.adwords.lib.utils.XmlFieldExtractor.getDocument(XmlFieldExtractor.java:124) > at urlupdater.AccountSelector$2$1.run(AccountSelector.java:86) > at > com.google.api.ads.adwords.lib.utils.XmlFieldExtractor.extract(XmlFieldExtractor.java:80) > at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) > at > com.google.api.ads.adwords.lib.utils.v201209.ReportDownloader.handleResponse(ReportDownloader.java:121) > at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:702) > at > com.google.api.ads.adwords.lib.utils.v201209.ReportDownloader.downloadReport(ReportDownloader.java:93) > > Does anyone know what I might be doing wrong? I can post more details > about my reportDefinition if it seems necessary. > > Thank you! > > Charlie > > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.