in reply to Re: IPv6 support for XML-RPC modules
in thread IPv6 support for XML-RPC modules

I've installed Net::INET6Glue, but still fail:
use warnings; use Net::INET6Glue::INET_is_INET6; require RPC::XML; require McClient; my $port = 8011; my @arr = @ARGV; my $host = "::1"; my $cli = RPC::XML::Client->new("http://[$host]:$port/RPC2"); my $cli_client = RPC::XML::request->new('AnaXmlRpcHandler.execute', ,R +PC::XML::array->new(map {RPC::XML::string->new($_)} @arr));

Now the error is different:

Can't locate object method "value" via package "RPC::XML::Client::request: HTTP server error: Can't connect to ::1:localhost:80 (sock_info: Bad service '80')" (perhaps you forgot to load "RPC::XML::Client::request: HTTP server error: Can't connect to ::1:localhost:80 (sock_info: Bad service '80')"?)

It seems the localhost is concateneated to ::1 and the port is cut (8011 -> 80). am I mis-using it ?

Replies are listed 'Best First'.
Re^3: IPv6 support for XML-RPC modules
by Khen1950fx (Canon) on Mar 27, 2011 at 17:51 UTC
    It may be that localhost is either misconfigured, or the url is wrong. Now you'll need to do some error checking. I put a test script together to get you started.
    #!/usr/bin/perl use strict; use warnings; use Net::INET6Glue; require RPC::XML; require RPC::XML::Client; my $server_url = 'http://test.xmlrpc.wordtracker.com'; my $cli = RPC::XML::Client->new($server_url); my $res = $cli->send_request( 'ping', 'guest' ); if ( ${$res} == 1 ) { print "Successfully pinged guest account", "\n"; exit 0; } else { print "There were problems...\n"; exit 0; }
    Experiment with it. If you continue to have problems, post again.
      I'm not sure how the code above is relevant, as its doesnt use an IPv6 address/host. I'm able to send XML-RPC requests when connecting to an IPv4 address, as following :
      my $host = "localhost"; my $port = 8011; my $cli = RPC::XML::Client->new("http://$host:$port/RPC2"); my $cli_client = RPC::XML::request->new('AnaXmlRpcHandler.execute', ,R +PC::XML::array->new(map {RPC::XML::string->new($_)} @arr));
      Have you been able to send XML-RPC requests to an ipv6 addresss?