Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

SOAP::Lite, WSDL and the example

by Sifmole (Chaplain)
on Jan 21, 2007 at 04:18 UTC ( #595722=perlquestion: print w/replies, xml ) Need Help??
Sifmole has asked for the wisdom of the Perl Monks concerning the following question:

All, I am trying to figure out how to use SOAP::Lite for calling webservices, specifically using the wsdl variation in SOAP::Lite. The only example ( the stock quote ) for wsdl simply does not work for me -- I get back a blank, and the trace shows that there is a null exception error at the far end. However, when I use a GUI tool to make the call it works fine. When I compare the XML being sent by the two they are very, very different -- the GUI one is pretty clean and easy to read and the SOAP::Lite is a bit more cluttered ( I understand the far side doesn't care, but I just wanted to indicate that they are different. )
use SOAP::Lite; print SOAP::Lite -> service('') -> getQuote('MSFT');
Any ideas? Is there a better library out there to use for this purpose than SOAP::Lite? I see SOAP::WSDL but it doesn't seem to be maintained at this point. Any pointers would be greatly appreciated.

Replies are listed 'Best First'.
Re: SOAP::Lite, WSDL and the example
by Khen1950fx (Canon) on Jan 21, 2007 at 11:25 UTC
    I tried this:

    #!/usr/bin/perl use SOAP::Lite; use SOAP::WSDL; use strict; use warnings; my $service = SOAP::Lite; -> service(''); print "MSFT ", $service->getQuote('MSFT'), "\n";
      You have an extra ; after Lite ... use the following: my $service = SOAP::Lite -> service('');
Re: SOAP::Lite, WSDL and the example
by jhourcle (Prior) on Jan 21, 2007 at 13:10 UTC

    The example worked for me (printed '31.11')

    As understand it, the functionality of SOAP::WSDL has been rolled into SOAP::Lite.

    I am, however, running an older version of SOAP::Lite -- 0.60 on the system I tested from, and I don't think I have any systems running greater than 0.67 (make test fails for me on 0.68 and 0.69, and I haven't had a chance to figure out just what's going on, but I don't need any of the new functionality, so I just used older versions)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://595722]
Approved by gam3
[Discipulus]: also good first day of summer!

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2018-06-21 07:14 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (117 votes). Check out past polls.