Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: RPC::XML::Client question

by Roger (Parson)
on Jan 06, 2004 at 13:32 UTC ( [id://319108]=note: print w/replies, xml ) Need Help??


in reply to RPC::XML::Client question

You could use the Data::Dumper module to inspect the returned $result structure.
use Data::Dumper; ... my $result = $client->send_request...; print Dumper($result);

Replies are listed 'Best First'.
Re: Re: RPC::XML::Client question
by Sinister (Friar) on Jan 06, 2004 at 13:37 UTC
    But that's just the problem. $result = ''; It is defined, but still very much so empty... It's not even a reference :-(


    er formait hyarya.
    -- "Life is a house and the next tornado is never far away"
    -- "lovely by nature"

      Did you check if the $client is built properly? You could add another print Dumper($client);. I just think the line my $client = RPC::XML::Client->new('http://localhost:8000/'); looks doggy, don't you need to specify the name of the service in the URL? Something like 'http://localhost:8000/cgi-bin/rpcserver'.

      And you could also invoke the perl debugger and step into the send_request method, and see step by step what is happenning inside the module. Are you on Linux? If so, you could just invoke the ddd visual debugger by specifying -perl on the commandline, together with the name of your script.

        using DDD is a good one - thanks! I still don't get it though...

        Here's what tcpflow is revealing;
        request
        POST / HTTP/1.1 TE: deflate,gzip;q=0.3 Connection: TE, close Accept-Encoding: deflate Host: localhost User-Agent: RPC::XML::Client/1.19 libwww-perl/5.76 Content-Length: 102 Content-Type: text/xml <?xml version="1.0"?> <methodCall><methodName>sinister.name</methodName><params></params></m +ethodCall>
        response:
        HTTP/1.1 200 OK Date: Tue, 06 Jan 2004 14:44:39 GMT Server: libwww-perl-daemon/1.33 Accept: text/xml Accept-Encoding: deflate Content-Length: 127 Content-Type: text/xml RPC-Encoding: XML-RPC RPC-Server: RPC::XML::Server/1.37 <?xml version="1.0"?> <methodResponse><params><param><value><string>sinister</string></value +></param></params></methodResponse>
        Where does it go wrong? Beats me...


        er formait hyarya.
        -- "Life is a house and the next tornado is never far away"
        -- "lovely by nature"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://319108]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-19 21:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found