Perl Tutorials - Herong's Tutorial Examples - v6.01, by Dr. Herong Yang
XML Messages over Socket Connections
This section describes the XML message communication model - where client and server send and receive XML messages over socket communication connections.
Once we know how to work with XML strings and hashes, we can now look at how XML technology can be used in client and server communication.
The most primitive way of using the XML technology in client and server communication is to write a client program and a server program that send and receive XML messages with TCP socket communication over the Internet. The following diagram illustrates how this model works:
Client System Server System XML | Internet | XML Client Prog.<--->TCP|<-------------->|TCP<--->Server Prog.
To learn more about TCP socket communication, see the "Socket Communication" chapter of this book.
A sample server program and a sample client program are presented in sections below to show you how to use this communication model.
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
►XML Messages over Socket Connections
GameServer.pl - XML Communication Server Example
GameClient.pl - XML Communication Client Example
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
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