5 # A lot has changed with the other files in this directory, and regrettably
6 # I don't know to what extent this script works anymore.
17 my $host = 'http://localhost';
22 'verbose' => \$verbose,
26 $host =~ /^\S+:\/\// or $host = 'http://' . $host;
27 $host =~ /:\d+$/ or $host .= ':10080';
30 print "Trying host: $host\n";
32 my $client = new RPC::XML::Client($host);
34 my $insertblock = <<END_OF_CHUNK ;
35 Channel: zap1/614260xxxx
43 Set: titlestring=Akira, Huckleberry Finn
50 $_ eq 'inject' and push @commands, $insertblock;
53 push @commands, 'retrieve'; # default
56 print "Sending request: \n ", join("\n ", @commands), "\n\n";
57 my $resp = $client->send_request(@commands);
60 print "Return is " . ref($resp), "\n";
61 # print "Code: ", ($resp->{code}->as_string || 'UNKNOWN'), "\n";
62 foreach (qw(code faultcode)) {
63 my $code = $resp->{$_};
65 print " ", ucfirst($_), ": ";
66 print $code ? $code->value : 'UNKNOWN';
71 print "ERROR: unrecognized response:\n\n", Dumper($resp), "\n";
73 $verbose and print Dumper($resp);
74 $verbose and print "\nKEYS (level 1):\n",
75 map {sprintf "%12s: %s\n", $_, scalar $resp->{$_}->value} sort keys %$resp;
77 # print "spooled_filename: ", $resp->{spooled_filename}->value, "\n";