Perl Tutorials - Herong's Tutorial Examples - v6.02, by Herong Yang
Sending a Remote Method Call as a HTTP Request
This section describes how a remote method call XML message can be delivered to the remote machine as a HTTP request. Extra request head lines are used.
The second item of the XML-RPC specification is about how to send a remote method call as a HTTP request.
XML-RPC defines that a method call must be delivered to the remote host as a HTTP request with the following rules:
Here is an example of an XML-RPC request:
POST /pathName/progName HTTP/1.0 User-Agent: MyAgent/1.0.0 (Linux) Host: kermit.dot.com Content-Type: text/xml Content-length: 300 <methodCall> <methodName>somePackage.someSort</methodName> <params> ...... </params> </methodCall>
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
Defining a Remote Method Call in XML
►Sending a Remote Method Call as a HTTP Request
Defining Returning Values of a Remote Method Call
Receiving Returning Values as a HTTP Response
RPC::XML - Perl Implementation of XML-RPC
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