Perl Tutorials - Herong's Tutorial Examples - v6.01, by Dr. Herong Yang
RPC::XML::Server - XML-RPC Server Interface Class
This section describe the RPC::XML::Server class - the RPC-XML server and programming interface for remote method call handlers.
RPC::XML::Server - A XML-RPC server and programming interface for remote method handlers. It supports the following methods:
new(host=>'hostName', port=>'port', queue=>'queueSize') - Constructs and returns a XML-RPC server object that listens on the specified host name at the specified port with the specified queue size. The following statement shows you an example of how to use this constructor:
$server = RPC::XML::Server->new(host => 'localhost', port => '8001', queue='5');
add_method({name=>'methodName', signature=>\@sigList, code=>\&function}) - Adds a method to the server with a hash to specify the method name, the signature list, and the actual function that handles the method. The following statement adds a method called "com.herong.getCelsius" to the server. This method has one signature of returning 'double' and taking one 'double'. The method handler is a function called "getCelsius".
$server->add_method({ name => 'com.herong.getCelsius', signature => [ 'double double' ], code => \&getCelsius });
Rules on adding methods and dispatching method calls:
server_loop() - Starts the server in listen mode.
Table of Contents
Data Types: Values and Variables
Expressions, Operations and Simple Statements
Name Spaces and Perl Module Files
Hard References - Addresses of Memory Objects
Objects (or References) and Classes (or Packages)
Typeglob and Importing Identifiers from Other Packages
String Built-in Functions and Performance
File Handles and Data Input/Output
Open Directories and Read File Names
File System Functions and Operations
Socket Communication Over the Internet
XML::Simple Module - XML Parser and Generator
SOAP::Lite - SOAP Server-Client Communication Module
Perl Programs as IIS Server CGI Scripts
CGI (Common Gateway Interface)
XML-RPC - Remote Procedure Call with XML and HTTP
►RPC::XML - Perl Implementation of XML-RPC
►RPC::XML::Server - XML-RPC Server Interface Class
RPC::XML Client and Data Classes
RpcXmlServer.pl - RPC::XML Server Sample Program
RpcXmlClient.pl - RPC::XML Client Sample Program
Sending Arrays with Remote Method Calls
Integrating Perl with Apache Web Server
CGI.pm Module for Building Web Pages
LWP::UserAgent and Web Site Testing
Converting Perl Script to Executable Binary