92
XIV.
Remote Procedure Calls
Remote procedure calls (RPCs) are used to control a WACI using another WACI, or using a client
computer. You can turn on and off the relays, send e-mail, add Events and Actions, etc. Anything the
WACI can do can be configured or controlled through the RPC interface.
The WACI supports RPCs for most web interfaces, including HTML, Flash (
.fla
), and Active Server
Pages (
.asp
). Methods are typically called using the HTTP Post syntax for HTML and Flash, and
Visual Basic scripting for Active Server Pages.
Calls to the RPC server using HTTP post are done through the
/rpc
virtual directory, e.g.
http://waci/rpc
. Use this directory as part of the URL when creating the address for the HTTP post
transaction.
This RPC reference covers:
•
RPC Server Logs
•
Syntax for HTTP Post
•
Fault Codes
•
Flash Example
•
Visual Basic Scripting
•
Note on Error Checking
•
RPC Quick Reference to Methods
•
Detailed List of All Methods
RPC Server Logs
As noted in Diagnostics web pages section, key information regarding the RPC server can be retrieved
from the Log Files web page. This information includes the RPC server version and a list of available
methods. The Log Files web page also allows you to enable logging for the RPC commands.
Syntax for HTTP Post
Call Tokens
Call Tokens
Call Tokens
Call Tokens
Methods may be called using HTTP Post using the following call tokens:
•
version - The RPC server version may be obtained through the Log pages in the Admin Web
Pages. This token is entirely optional and may be safely omitted from the call.
•
encoding - Number of times that the parameters (param1..paramN values) have been URL
encoded. Some web applications URL encode the parameters more than one time. Use this
optional parameter to define the number of times that the RPC server should decode the
parameters. By default, this value is set to 1.
•
method - Name of the method to call.
•
param[i] - Value for parameter #i, where i is an integer.