Remote Procedure Calls with PEAR::XML-RPC - An XML_RPC Exchange
(Page 3 of 12 )
Now assume the script can be been divided into two segments. The first segment could be the getNameLength function which will reside at a distant RPC host. The second segment could reside in our XML-RPC client which sets the variables, calls the function and displays the results.
During the remote procedure, the XML-RPC client would send the RPC host the following XML:
<?xml version="1.0"?> <meathodCall> <methodName>getLength</methodName> <params> <param> <value><string>George</string></value> </param> <param> <value><string>Washington</string></value> </param> </params> </meathodCall> |
The RPC host would respond to the XML-RPC client with the following XML:
<?xml version="1.0"?> <methodResponse> <params> <param> <value><int>16</int></value> </param> </params> </methodResponse> |
Next: Client Rewritten Example >>
More Miscellaneous Articles
More By bluephoenix