[freeside-devel] Freeside XML-RPC Interfacing. (sample client
included)
Kristian Hoffmann
khoff at fire2wire.com
Wed Jun 29 11:11:35 PDT 2005
The general form for freeside XMLRPC calls is...
#$result = $server->call('class.subroutine', @args);
For example...
#!/usr/bin/perl
use warnings;
use Frontier::Client;
use Data::Dumper;
# Make an object to represent the XML-RPC server.
$server_url = 'http://wavetail.420.am:81/freeside/misc/xmlrpc.cgi';
$server = Frontier::Client->new(url => $server_url);
$server -> {'ua'} -> credentials("wavetail.420.am:81", "Freeside", "guest", "guest");
$server -> {'debug'} = 1;
$result = $server->call('Record.qsearchs', 'cust_main', { custnum => 2 });
print Dumper ( \$result );
You can also look at freeside/rt/lib/RT/URI/freeside/XMLRPC.pm in the
freeside source tree for more examples.
Kristian Hoffmann
Fire2Wire System Administrator
khoff at fire2wire.com
---
On Wed, 29 Jun 2005, Scott Edwards wrote:
> my xml-rpc client at
> http://armada.daxal.com/~supaplex/fs/fs-xmlrpc.txt (or below). I've
> read the FS/XMLRPC.html perldoc and the souces for xmlrpc.cgi. Can
> someone provide me with a few sample command line invocations to
> illistrate tapping into FS via xmlrpc with this?
>
> Thanks,
>
>
>
> Scott Edwards
> --
>
> #!/usr/bin/perl
>
> use warnings;
> use Frontier::Client;
> use Data::Dumper;
>
> # Make an object to represent the XML-RPC server.
> $server_url = 'http://wavetail.420.am:81/freeside/misc/xmlrpc.cgi';
> $server = Frontier::Client->new(url => $server_url);
> $server -> {'ua'} -> credentials("wavetail.420.am:81", "Freeside",
> "guest", "guest");
> $server -> {'debug'} = 1;
>
> # Call the remote server and get our result.
> $result = $server->call(@ARGV);
> print Dumper ( \$result );
> _______________________________________________
> freeside-devel mailing list
> freeside-devel at sisd.com
> http://420.am/cgi-bin/mailman/listinfo/freeside-devel
>
More information about the freeside-devel
mailing list