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

MONKS! I am trying to go to the page "http://bonds.yahoo.com/rates.html" and get the first 3 coulumns of data only (Maturity, Yield and Yesterday). I am using soaplite. I don't want to use UserAgent. I know I have to use array, but I have very little knowledge about Perl. Here is my code so far. I have the server running in Java. Can anyone tell me how will I proceed?
#!perl -w use SOAP::Lite; # Apache SOAP http://xml.apache.org/soap/ my $soap = SOAP::Lite ->uri('urn:xml-composite-bond') ->proxy('http://localhost:8080/soap/servlet/rpcrouter'); sub SOAP::Transport::HTTP::Client::return ('http://bonds.yahoo.com/ra +tes.html'); print $soap->getCompositeBondRates(?)-> result;

Replies are listed 'Best First'.
Re: reading HTML file
by gellyfish (Monsignor) on Mar 29, 2002 at 16:43 UTC

    Why don't you want to use LWP::UserAgent ? If you are using SOAP::Lite you are already using it anyhow

    Beyond that, it isn't very clear, is the subroutine return() you define supposed to return the content of the HTML page as you describe ? I seem to be typing this all the time but you want to use HTML::Parser and LWP::UserAgent.

    /J\

(jeffa) Re: reading HTML file
by jeffa (Bishop) on Mar 29, 2002 at 16:40 UTC
    This is just a hunch, but your problem may be that you are trying to get an array from the result() method, which really only returns a scalar or a reference

    Try using the paramsout() method instead if you really are receiving an array (list?) - and look into the paramsall() method which combines result() and paramsout().

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)