Re: Calling axis stock quote example from perl

John Heim <[email protected]>
Newsgroups gmane.text.xml.soap.user
Message-ID <[email protected]>
At 10:47 AM 7/21/2004, Scott Nichol you wrote:
>I believe that the 'XXX' is the only parameter to the call.  The username 
>and password that are supplied on the command line are for HTTP 
>authentication, I think.  I am not sure how SOAP::Lite does HTTP 
>authentication.  In a quick look at the SOAP::Lite docs, I did not find 
>anything.

Good tips. Thanks. I was hearing the -wpass1 and thinking (in perl) that 
that whole thing was a command line parameter called wpass and it's value 
was XXX. Kind of dumb but as I mentioned last week, I'm blind and I have to 
listen to the instructions.

Anyway, I got it working. The code is below. Note the sub at the end that 
overwrites the existing SOAP::Lite sub and returns the
proper credentials...

#!/usr/bin/perl
use SOAP::Lite;

my $lite = SOAP::Lite->new;

$response = $lite->proxy('http://localhost:8080/axis/servlet/AxisServlet')
         -> uri('urn:xmltoday-delayed-quotes')
         -> getQuote('XXX');
print "[" . $response->result . "]\n";
die "Fault: ".$response->faultcode." ".$response->faultdetail." 
".$response->faultstring if $response->faultcode;


sub SOAP::Transport::HTTP::Client::get_basic_credentials
         { return 'user1' => 'pass1'; }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.