This seems to have to do with running into a proxy server or being in a NAT enviroment from my perspective.
This error indicates that your connection to the outside is a little borked... I of course can not say for sure as I do nto know your setup but I can say that I have been able to get this google search working when having a direct connection to the internet, I personaly have not tried to get it working over a shielded connection but I guess you will have to look into getting SOAP::Lite to work with your proxy or your NAT setup. On 11/26/05, Mandar Rahurkar <[EMAIL PROTECTED]> wrote: > > Hi, > I am using following script to access Google Api however I get the > following error : > > 502 Bad Gateway at ./googly.pl line 15 . > > I think the problem is with SOAP::Lite package. Has anyone experience this > error before ? > > Thanks, > Mandar > > > > #! /ws/ifp-22/scratch/Perl/bin/perl > > use SOAP::Lite; > > @ARGV == 2 or die "Usage: googly <query> <number of results>\n" ; > > my($q, $maxResults) = @ARGV; > > > $key="-------------------"; > # key, q, start, maxResults, filter, restrict, safeSearch, > # lr, ie, oe > my @params = ($key, $q, 0, $maxResults, 0, '', 0, '', 'latin1', 'latin1'); > > my $result = > SOAP::Lite > -> service("file:GoogleSearch.wsdl") > -> doGoogleSearch(@params); > > print join "\n", > map( { qq{<a href="$_->{URL}">} . ($_->{title} || > $_->{URL}) . qq{</a> > <br />} } @{$result->{resultElements}} ); > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > >