Code and WSDL

koschei on 2002-04-16T21:26:09

Available for download are:

Use at your own risk and sanity. Note that you should modify either the SOAP.pm to use a different WSDL file, or call:

my $google = WWW::Search::Google::SOAP->new()
        ->wsdl('http://where.is.my.google.com/GoogleSearch.wsdl');

Otherwise it will probably barf at some point.

Or subclass it and provide your own key() and wsdl() methods (they just need to return values).

I'm inclined to think that some sort of uniform method of accessing one's library of WSDL files is needed. Like some sort of WSDL module that, when you install it, you tell it where you like to have WSDL files loaded from. Another module, such as my Google one, could then say that it wants a WSDL file and asks the library. If the library has it, it returns it, else it fetches it from somewhere. The problem there is the somewhere. Perhaps the module in question could supply somewhere where it thinks it's best to get the WSDL file and the WSDL module can decide whether to get it or not and whether to cache it locally or not. Blah Blah Blah.

I'm not happy with it at present, so feel free to rip it to pieces. I'll be touching it up, bringing it in line with WWW::Search modules and then emailing it to Leon. Suggestions are welcome.


WSDL file

acme on 2002-04-17T09:13:39

WWW::Search::Google is just a simple API to the SOAP Google interface and is what people will want most of the time (oh, and it ties in nicely with the WWW::Search stuff). Of course, it'd be handy to pass in more parameters - but have you seen Net::Google?

Google got back to me this morning and have finally posted the WSDL file on their website, the way it should be: http://api.google.com/GoogleSearch.wsdl

Re:WSDL file

koschei on 2002-04-20T12:46:05

Haven't looked properly at Net::Google yet - haven't been in to uni to play with the speedy systems there (haven't got a linux box local and don't like running/editing Perl under Mac/Win/RISCOS). Particularly a module that needs the net. So that'll happen sometime this week. It sounds promising. I just hope the implementation is nice. =)

Ideally, what I want is to be able to use WWW::Search::Google for simple stuff, but also extend it. I've modified my WWW::Search::Google::SOAP so that it returns WWW::SearchResults objects, but the interface is still too API based rather than action oriented.

Yay Google for posting the wsdl.