Perl Tutorials - Herong's Tutorial Examples
Dr. Herong Yang, Version 5.10

Receiving Returning Values as a HTTP Response

This section describes how to receive the returning value XML message from the remote machine.

The last item of the XML-RPC specification is about how to returning values of remote method call can be received as a HTTP response.

XML-RPC defines that the returning values must be delivered as a HTTP response back to the local host with the following rules:

  • Header line, "Content-Type", is required and must have "text/xml" as the value.
  • Header line, "Content-length", is required and must give accurate value.
  • The response body must be an XML file with a single "mechodResponse" element.

Here is an example of an XML-RPC response:

HTTP/1.1 200 OK
Connection: close
Content-Length: 200
Content-Type: text/xml

<?xml version="1.0"?>
<methodResponse>
 <params>
  ......
 </params>
</methodResponse>

Table of Contents

 About This Book

 Perl on Linux Systems

 ActivePerl on Windows Systems

 Data Types: Values and Variables

 Expressions, Operations and Simple Statements

 User Defined Subroutines

 Perl Built-in Debugger

 Name Spaces and Perl Module Files

 Symbolic (or Soft) References

 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 Files in Binary Mode

 Open Directories and Read File Names

 File System Functions and Operations

 Converting Perl Script to Executable Binary

 Using DBM Database Files

 Using MySQL Database Server

 Socket Communication Over the Internet

 XML::Simple Module - XML Parser and Generator

 XML Communication Model

 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

 What Is XML-RPC?

 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

 References

 Printable Copy - PDF Version

Dr. Herong Yang, updated in 2009
Receiving Returning Values as a HTTP Response