perl_search_m has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks, I am trying work upon SOAP::Lite version 0.710 and Perl 5.8.8, but unable to run the basic program even. I refered userguide and cookbook but couldn't find any solution working for me. I wrote the following script:
use SOAP::Lite; print SOAP::Lite -> uri('http://www.soaplite.com/Demo') -> proxy('http://services.soaplite.com/hibye.cgi') -> hi() -> result;
I tried to add up the proxy settings based upon the follwing syntax:
->proxy('http://endpoint.server/', proxy => ['http' => 'http://my.proxy.server/']);
but it gave the following error:
Odd number of elements in hash assignment at /usr/lib/perl5/vendor_perl/5.8.8/LWP/UserAgent.pm line 35. Unrecognized LWP::UserAgent options: my.proxy.server at /usr/lib/perl5 +/site_perl/5.8.8/SOAP/Lite.pm line 475
Kindly help me.

Replies are listed 'Best First'.
Re: connecting with SOAP::Lite 0.710
by Khen1950fx (Canon) on Sep 08, 2009 at 10:12 UTC
    This worked for me:

    use SOAP::Lite; print SOAP::Lite -> uri('http://www.soaplite.com/Demo') -> proxy('http://services.soaplite.com/hibye.cgi') -> hi() -> result; my $soap = SOAP::Lite->proxy('http://endpoint.server/', proxy => ['http' => 'http://my.proxy.server/']);
      Thanks!.. thr error message is no more there.. but still it is not connecting.. it is giving the following error message..
      500 Can't connect to services.soaplite.com:80 (connect: timeout) at so +ap_test.pl line 5
      Kindly suggest me the way out from this problem or do I need to change some config at my system?
        Put in a real working proxy for proxy
Re: connecting with SOAP::Lite 0.710
by Anonymous Monk on Sep 08, 2009 at 09:59 UTC
    It seems to work for me
    use SOAP::Lite; print SOAP::Lite -> uri('http://www.soaplite.com/Demo') -> proxy( 'http://services.soaplite.com/hibye.cgi', proxy => ['http' => 'http://invalid/'], ) -> hi() -> result; __END__ 500 Can't connect to invalid:80 (Bad hostname 'invalid') at - line 2
    Maybe you need to upgrade LWP?

    pmvers SOAP::Lite LWP

    SOAP::Lite: 0.710.08 LWP: 5.831