All about XML

Temp stuff


This is an easier alternative to SOAP to build web services, ie. writing routines accessible from a remote host through the HTTP protocol to carry XML-formated data. Obviously, you should take into consideration the latency of calling routines over a network link, especially over a WAN link like the Internet, and also the fact that the code that make up the routines must be interpreted each time the routine is called; take a look at JIT compilers and cache managers to lower the cost.

Here's a sample XML-RPC call looks like (as copied from here):

POST xmlrpcexample.php HTTP/1.0
User-Agent: xmlrpc-epi-php/0.2 (PHP)
Host: localhost:80
Content-Type: text/xml
Content-length: 191
<?xml version='1.0' encoding="iso-8859-1" ?>

Some solutions to access a web service through XML-RPC from VB and PHP code:



Here's a sample that worked using (web server) and vbXMLRPC (VB5 client):

//Server : /xmlrpc/timsrv.php
function getTime($args) {
        return "Yes! Ain't XML-RPC cool && dandy?";
$server = new IXR_Server(array('test.getTime' => 'getTime'));
Dim linsRequest As New XMLRPCRequest
Dim linsResponse As XMLRPCResponse
Dim linsUtility As New XMLRPCUtility
linsRequest.HostName = "localhost"
linsRequest.HostPort = 80
linsRequest.HostURI = "/xmlrpc/timesrv.php"
linsRequest.MethodName = "test.getTime"
Set linsResponse = linsRequest.Submit
Label1.Caption = linsResponse.Params(1).StringValue