I'm messing with some XML-RPC servers, and needed a quick client to test them. This one takes command line options to set the server, method and arguments. Useful for quickly checking your xml-rpc server implimentation.
#!/usr/bin/perl -w use strict; use Frontier::Client; use Getopt::Long; my $XMLRPCSERVER = ""; my $METHOD = ""; my $ARGUMENT = ""; my $client = ""; my $response = ""; my $output = ""; GetOptions( "server=s" => \$XMLRPCSERVER, "method=s" => \$METHOD, "arg=s" => \$ARGUMENT); $client = Frontier::Client->new( url => $XMLRPCSERVER, use_objects => 0, debug => 1); $response = $client -> call ($METHOD, $ARGUMENT); print "\n\n $XMLRPCSERVER replied: \n\n $response \n\n"; __END__ =head1 NAME testclient.pl =head1 SYNOPSIS A command line perl tool to test xml-rpc servers =head1 DESCRIPTION weblogscom.pl uses command line options, so invoke it like this... perl weblogscom.pl --server=THE SERVER URL HERE --method=METHOD.NAME.H +ERE --arg=ARGUMENT.HERE =head1 AUTHOR Ben Hammersley, ben@benhammersley.com =head1 BUGS probably =head1 SEE ALSO http://www.xmlrpc.com/ http://www.benhammersley.com/ =head1 COPYRIGHT Copyright 2002, Ben Hammersley, All Rights Reserved. This program is free software. You may copy or redistribute it however + you like. I'd prefer it if you kept my name on it, though.

Replies are listed 'Best First'.
Re: xml-rpc server tester
by rjray (Chaplain) on Feb 15, 2002 at 22:58 UTC

    I also have an XML-RPC API library for Perl that you may want to look at. For your task, it isn't functionally different from Frontier::Client, though. But I can't help at least mentioning it :-). RPC::XML

    --rjray