Hello Sean,
I'm sorry that this is a little confusing, but to clarify: Google
provides an "official" client library for Java, available at
http://code.google.com/p/google-api-adwords-java/. The client library
is meant to be a standalone way to get started writing Java
applications against the AdWords API without having to worry about
generating your own stub classes from our WSDLs, and it also takes
care of things like logging and API unit usage tracking. The namespace
for the classes provided by the client library is
com.google.api.adwords.v1x.*. The client library ships with what
should be working samples that can be run against the client
library .jars out of the box.
Independent of the client library is our generic Java sample code,
available at
http://code.google.com/p/adwords-api-java-samples/. This
code is meant to be a "reference" implementation of certain API
methods, and we link to it inline from the AdWords API developer
guide. Equivalent code is available in many languages other than Java.
It's not meant to compile and run against the client library, but you
can get it working if you generate your own stub classes using the
Axis framework. This code uses the
com.google.adwords.api.adwords.v1x.* namespace.
So, in short, if you're planning on using the client library and want
to try some examples that should work out of the box, the code that
ships with the client library in the "examples" directory should be
your first stop.
Cheers,
-Jeff Posnick, AdWords API Team
On Aug 3, 10:23 pm, Sean Molloy <
sean.mol...@paradoxdigital.com>
wrote:
> In fact, I can change all kinds of the string values and get the same
> null pointer. I also should note that the sample DOES NOT COMPILE
> with the includes. The sample includes the following:
>
> import com.google.adwords.api.adwords.v11.AccountInterface;
>
> But the ACTUAL package path (from the JAR) is:
>
> import com.google.api.adwords.v11.AccountInterface;
>
> So the samples are already a little sketchy.
>
> On Aug 3, 8:09 pm, Sean Molloy <
sean.mol...@paradoxdigital.com> wrote:
>
> > I am suffering the exact same error. I am using the samples provided
> > and trying to do EITHER "GetClientAccounts" or "GetAllCampaigns", but
> > all I get is the same null pointer exception.
>
> > java.lang.NullPointerException
>
> > com.google.api.adwords.v11.AccountServiceSoapBindingStub.getClientAccounts_aroundBody3$advice(AccountServiceSoapBindingStub.java:
> > 146)
>
> > com.google.api.adwords.v11.AccountServiceSoapBindingStub.getClientAccounts(AccountServiceSoapBindingStub.java:
> > 1)
>
> > This null is coming from within the ad words code, so something is not
> > right.
>
> > On Aug 1, 9:45 am, AdWords API Advisor <
adwordsapiadvi...@google.com>
> > wrote:
>
> > > Hello Gregg,
>
> > > If you're using the packaged client library fromhttp://
code.google.com/p/google-api-adwords-java/thenyoushould try
> > > using the samples provided with the client library. The samples athttp://
code.google.com/p/adwords-api-java-samples/areintendedto be