This ext. is completely new ground-up reimplementation of XML-RPC
specifically for PHP 5. It uses libxml2 and object overloading closely
resembling the same thing you'd find for ext/soap:

$rpc = new XMLRPC("http://pear.php.net/xmlrpc.php";);
$rpc->callfunction(10, "string", 3.14, false, array(1,2,3), array('foo'
=> 'bar'), new XMLRPCVal(XMLRPC_DateTime, mktime()), new
XMLRPCVal(XMLRPC_BASE64, "foobar"));

Would call the 'callfunction' RPC call with the proper data type mapping
(<int>, <string>, <double>, <boolean>, <array>, <struct>,
<datetime.iso8601>, and <base64).

Also note that since many XMLRPC interfaces use namespacing (i.e.
'package.info' which doesn't really map directly I plan on implementing
a second parameter to the XMLRPC() constructor which allows you to
specify a "prefix string":

$packgerpc = XMLRPC("http://pear.php.net/xmlrpc.php";, "package.");
$result = $packagerpc->info("APC");

I still have to implement proper fault handling but will do that soon.

Since it's a complete re-write i didn't really make an effort to have
any corresponding APIs to the old ext/xmlrpc ext. If there is interest
however I do think the new ext is a good offering for the standard PHP
5.1 distro (once I clean it up) -- if implementing BC procedures would
be needed for that I'm not opposed to implementing them.

Cheers,

John

On Mon, 2005-02-14 at 18:18, l0t3k wrote:
> i've only looked at it briefly, but seems to use PHP5 method overloading to 
> support cleaner remote calls
> 
>     $client = new xmlrpc($remote_ip);
>     $result = $client->remoteMethodName($args);
> 
> 
> 
> "Andi Gutmans" <[EMAIL PROTECTED]> wrote in message 
> news:[EMAIL PROTECTED]
> > Hey John,
> >
> > Didn't compare this API to ext/xmlrpc. Is it the same? If so, wouldn't it 
> > make sense to migrate ext/xmlrpc to the new libxml2 implementation? Does 
> > it require a complete rewrite? I'm not quite sure what we should do we 
> > this. Should we just look for another maintainer for ext/xmlrpc?
> >

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to