Join 3,558 readers in helping fund MetaFilter (Hide)


Help me to learn to use an API.
June 17, 2007 1:57 PM   Subscribe

Help me to learn to use an API.

I've been learning Java on and off for a while, and I've come to a point where I can write very (very) simple programmes. I need a goal to create some motivation to go further with it, and what I would like to do is learn to use the Google AdWords API. (No particular reason to choose this other than I work with AdWords through its web interface quite a lot).

I have zero knowledge about web services. From my initial research I think I may need to learn some XML, though I had been under the impression that Axis would handle this for me. Alas, I've been unable eve to get it running on OSX, making me think I need to go closer to first principles and circle back to this.

Any advice on how to proceed or what to cover would be much appreciated. I can use OSX or Windows XP, if that makes any difference.

Thanks!
posted by StephenF to Computers & Internet (3 answers total) 3 users marked this as a favorite
 
The first thing you need to do is have Axis create the interface to the web service. This is really quite simple, as Axis provides a tool called WSDL2Java. You just run it, plugging in the WSDL URL for the service you want (which for AdWords can be found here). Axis will generate all the classes you need, and you don't need to know any XML whatsoever.
posted by cerebus19 at 2:37 PM on June 17, 2007


Visual Studio 2005 comes with a similar utility called simply "Wsdl", which can generate a class for using the API in multiple languages.
posted by mkb at 6:15 PM on June 17, 2007


It depends on the language you want to use, as each langauge will have different bindings for a given API. For example in Perl you can just install Google::Adwords from CPAN (perl -MCPAN -e 'install Google::Adwords') and then start with the simple examples in the docs. You don't really have to know anything about XML or SOAP, that is all abstracted away for you by the underlying modules. But every language will have different bindings, so there will be a different way of doing it for everybody.
posted by Rhomboid at 6:42 AM on June 18, 2007


« Older My HP Pavillion dv4000 is not ...   |  Are there any tools to copy a ... Newer »
This thread is closed to new comments.