Introduction to Web Services with Perl


<  >  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21 

#!/usr/bin/perl 
# Testing sum() and diff()
 
use strict;
use warnings;
use Frontier::Client;
  
my $url  = "http://localhost:1080/RPC2";
my @args = (5,3);
  
my $client = Frontier::Client->new( 	url => $url,
					debug => 0,
            				);

  
print "$args[0] + $args[1] = ", $client->call('sum', @args), "\n\n";

print "$args[0] - $args[1] = ", $client->call('diff', @args), "\n";