On Nov 25, 2007, at 3:23 PM, Gary Mort wrote:
I've been looking around and I see a number of frameworks and
standalone apps where you can give it the WSDL(sp?) definition file
for an XML/RPC type application and it will generate a bunch of stub
classes for you to send/receive requests and automatically parse the
xml responses into objects or arrays.
Anyone used any of them, and if so what's your favorite time saver?
I recently used php's built-in SoapClient class. You need to
configure with --enable-soap. It was great. I couldn't believe how
easy it was:
$client = new SoapClient("http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl
");
var_dump($client->__getFunctions());
var_dump($client->__getTypes());
SimpleXML can be used to parse XML responses from the Soap service.
You asked for XML/RPC though... so then use Zend Framework's
Zend_XmlRpc_Client class. You can use the getProxy() method to get an
object that lets you make the XML/RPC calls like their methods of that
object. It seems that if the server support introspection, you can
use the getIntrospector() method as well.
PHP5 is the bomb for working with these remote services. All the
heavy lifting is already done.
-Rob
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php