genproxy.php 423 B

123456789101112131415161718192021
  1. <?php
  2. error_reporting(E_ALL);
  3. require_once 'SOAP/WSDL.php';
  4. /**
  5. * genproxy
  6. *
  7. * a command line tool for generating SOAP proxies from WSDL files
  8. *
  9. * genproxy.php http://site/foo.wsdl > foo.php
  10. *
  11. */
  12. function do_wsdl($uri) {
  13. $wsdl =& new SOAP_WSDL($uri);
  14. print $wsdl->generateAllProxies();
  15. }
  16. echo "<?php\n\nrequire_once 'SOAP/Client.php';\n\n";
  17. do_wsdl($_SERVER['argv'][1]);
  18. echo "\n?>";
  19. ?>