wsdl2js was originally developed as a subproject of
one of my first Firefox extensions.
I wanted to have programmatic access to the Google Search API from Firefox, so
GoogleSearch.wsdl seemed like a good solution.
When I surfed the net looking for an existing wsdl2js converter, I ran into a bunch of dead ends.
There were a number of articles that showed how to use SOAP from Mozilla, and many used
My guess was that no one did this because it was too tedious -- the objects used in the APIs have
a many fields, and it is not much fun to write the code that extracts them from the SOAP XML.
automatically. (Analogous tools already existed for Java and .NET.)
wsdl2js.py, version 0.9
is the Python script that I wrote to generate
to make the API a bit easier to use. Note that you will have to obtain a license key from
http://www.google.com/apis/ before you
can use this API.
and the output file with
python wsdl2js.py -f GoogleSearch.wsdl -o GoogleSearch.js
To experiment with GoogleSearch.js, I recommend using
Chickenfoot. Once you have your
Google license key, paste the
code into the Chickenfoot editor, override the
and then add the following line of code:
If you see
apple appear in Chickenfoot's Output pane, then you know that it's working!
If I haven't already made this abundantly clear, I have no idea whether wsdl2js will work on any WSDLs
besides Google's. In fact, I would be pretty surprised if it did because I know that the wsdl2java
codebase is rather large, so I doubt that my 500 lines of badly-written Python handle all of the
intricacies of WSDL, of which I know very little about, honestly. If I were to trying to produce
a comprehensive solution to the wsdl2js problem, I would probably write something that uses wsdl2java
An interesting postscript to this story...
Sadly, no one ever really ended up using Google Dominoes.
I had originally planned to incorporate
Ryan Jazayeri's work on Google URLs,
but I never got around to it. I remember that over a year after creating Dominoes, I got an email from
someone saying that they had installed it, and that it was "a jaw-dropping idea + implementation."
This was quite a compliment, but it also made me laugh, reminding me of the following quote:
"The makers of Bowflex have been ordered to pay a $1 million penalty because some people were injured
while using the machine.
The company was shocked, and said, "You mean, somebody actually used their
Bowflex?!" - Conan O'Brien
© 2004-2005 Michael Bolin