Java Client Library Updated

16 views
Skip to first unread message

AdWords API Advisor

unread,
Apr 2, 2008, 6:10:33 PM4/2/08
to AdWords API Forum
An updated version of Java client library is available from
http://code.google.com/p/google-api-adwords-java/. Some of the notable
changes in this release:

- Added support for v12 (removed support for v10).
- Both properties, version and alternateUrl from adwords.properties
are now used to construct the request URL. To make API call against
live account using v11, set "version=v11" and "alternateUrl=https://
adwords.google.com".
- Added support for new property "clientId" in adwords.properties.
It replaces previously used "clientEmail". In addition to supporting
clientEmail, "clientId" property introduces support for
clientCustomerId (e.g., "joe....@gmail.com", "123-456-7890",
"1234567890").
- Bug fixes.

Bugs and feature requests can be filed at
http://code.google.com/p/google-api-adwords-java/issues/list.

--Stan

pornllc

unread,
Apr 2, 2008, 8:39:49 PM4/2/08
to AdWords API Forum
Thank you thank you thank you Stan!



On Apr 2, 3:10 pm, AdWords API Advisor <adwordsapiadvi...@google.com>
wrote:
> An updated version of Java client library is available fromhttp://code.google.com/p/google-api-adwords-java/. Some of the notable
> changes in this release:
>
>   - Added support for v12 (removed support for v10).
>   - Both properties, version and alternateUrl from adwords.properties
> are now used to construct the request URL. To make API call against
> live account using v11, set "version=v11" and "alternateUrl=https://
> adwords.google.com".
>   - Added support for new property "clientId" in adwords.properties.
> It replaces previously used "clientEmail". In addition to supporting
> clientEmail, "clientId" property introduces support for
> clientCustomerId (e.g., "joe.sh...@gmail.com", "123-456-7890",

Sam Dark

unread,
Apr 3, 2008, 9:17:23 AM4/3/08
to AdWords API Forum
Just in time! Thank you.

On 3 апр, 02:10, AdWords API Advisor <adwordsapiadvi...@google.com>
wrote:
> An updated version of Java client library is available fromhttp://code.google.com/p/google-api-adwords-java/. Some of the notable
> changes in this release:
>
>   - Added support for v12 (removed support for v10).
>   - Both properties, version and alternateUrl from adwords.properties
> are now used to construct the request URL. To make API call against
> live account using v11, set "version=v11" and "alternateUrl=https://
> adwords.google.com".
>   - Added support for new property "clientId" in adwords.properties.
> It replaces previously used "clientEmail". In addition to supporting
> clientEmail, "clientId" property introduces support for
> clientCustomerId (e.g., "joe.sh...@gmail.com", "123-456-7890",

Ian

unread,
Apr 4, 2008, 12:18:32 PM4/4/08
to AdWords API Forum
The AdWords JAR file shouldn't include external dependencies - I've
raised a bug report about this at http://code.google.com/p/google-api-adwords-java/issues/detail?id=8

AdWords API Advisor

unread,
Apr 7, 2008, 11:25:42 AM4/7/08
to AdWords API Forum
There will be a patch release this week which will include both JARs,
with and without dependencies.

--Stan

tozor

unread,
Apr 8, 2008, 2:35:21 PM4/8/08
to AdWords API Forum
The previous jar that I have been using very successfully in my
production environment did not contain the javax.servlet classes.
They are now included in this jar which has a bad side effect of not
loading into tomcat:

Apr 8, 2008 1:23:04 PM org.apache.catalina.loader.WebappClassLoader
validateJarFile
INFO: validateJarFile(/home/adlucent/damn/tomcat-production/webapps/
adlucent/WEB-INF/lib/adwords-api-1.0.0.jar) - jar not loaded. See
Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/
Servlet.class

I can re-jar it on my end, but wanted to post here as I would think
that using this jar within tomcat is not unique to my application.

Tim



On Apr 7, 10:25 am, AdWords API Advisor <adwordsapiadvi...@google.com>
wrote:

tozor

unread,
Apr 8, 2008, 2:54:54 PM4/8/08
to AdWords API Forum
I noticed there is a new release which includes a no dependency jar.
I also noticed the list of external dependencies in the README.
However I was wondering which of those jars are needed for compilation
and which are needed at run time. Again I can do this by trial and
error myself but it might be nice to have a clean list for those
trying to package up a tight tomcat install.

Tim

tozor

unread,
Apr 8, 2008, 7:04:30 PM4/8/08
to AdWords API Forum
I thought I would post a follow up to my investigation. The following
jars are needed at runtime along with the no dependency adwords-
api-1.0.1-loner.jar.

aspectjrt.jar
axis-1.2.1.jar
commons-discovery-0.2.jar
commons-logging-1.0.4.jar
jaxrpc.jar
saaj.jar
wsdl4j-1.5.1.jar

The j2ee.jar which is listed as an external dependency does not appear
to be needed, and in fact is the root cause of my original post (it
contains the java.servlet classes which tomcat objected to). In
addition this jar is HUGE (almost 7MB). Interestingly the previous
adwords jar file I was using for V11 (the one from the sourceforge
project) does not contain the j2ee.jar classes.

As a philisophical point, I think that the fewer dependencies the
better. Since this jar is a support jar for Adwords java application
writers, I'm not sure why it is necessary to have the commons-logging
(and in turn commons-discovery) dependencies. This seems unnecessary.
There used to be a term called "DLL hell" to refer to the morass of
disparate library dependencies required for Windows application
developers. The commons libraries tend to fall into the same trap
(e.g. you can't use commons-fileupload without commons-io). The
reason this is an issue is that all of these jars on the classpath can
result in much more memory intensive java applications.

Tim

pornllc

unread,
Apr 8, 2008, 8:27:44 PM4/8/08
to AdWords API Forum
Is anyone else getting this error when trying to use the new -
loner.jar and the ReportService?


Code:

ReportInterface service = (ReportInterface)
user.getService(user.REPORT_SERVICE);

java.lang.ClassCastException:
com.google.api.adwords.v11.ReportServiceSoapBindingStub

Looks like the client library is linking to v11 instead of v12. Anyone
else seeing this? I've filed an issue:
http://code.google.com/p/google-api-adwords-java/issues/detail?id=9



tozor

unread,
Apr 8, 2008, 8:58:32 PM4/8/08
to AdWords API Forum
I've gotten that error before when I had the adwords version set to
v12 but my code was compiled against v12. In my case I had an
incorrect setting in a properties file.

Tim

tozor

unread,
Apr 8, 2008, 8:59:24 PM4/8/08
to AdWords API Forum
Sorry I meant to say my version was set to v11 but my code was
compiled against v12.

Tim

pornllc

unread,
Apr 8, 2008, 10:43:18 PM4/8/08
to AdWords API Forum
Tim,

I've only had experience before with working on v10 - is there
something I need to do (method call, etc) to "set" the API to v12?

tozor

unread,
Apr 8, 2008, 11:21:26 PM4/8/08
to AdWords API Forum
It is set one of two ways:

1) As a direct argument to an AdwordsUser constructor.
2) In the adwords.properties file. This file is used when the no arg
AdwordsUser constructor is used.

There is a sample adwords.properties in the directory where you
installed the adwords java package. Also the code in the
AdwordsUser.java (foound in src/com/google/api/adwords/lib) is pretty
easy to understand if you take a look at it.

Tim
Reply all
Reply to author
Forward
0 new messages