Ejemplo n.º 1
0
 public function main()
 {
     $wsdl = $path = $plugin = null;
     while (!$wsdl) {
         $wsdl = $this->in('Enter the url of the wsdl');
     }
     while (!$path) {
         $path = $this->in('Save to App or a plugin?', array('app', 'plugin'));
     }
     if ($path == 'plugin') {
         $loaded = CakePlugin::loaded();
         while (!$plugin) {
             $plugin = $this->in('Select plugin', $loaded);
             if (!in_array($plugin, $loaded)) {
                 $plugin = null;
             }
         }
         $path = CakePlugin::path($plugin) . 'Lib';
         $plugin .= '.';
     } else {
         $path = APP . 'Lib';
     }
     $wsdlInterpreter = new WSDLInterpreter($wsdl);
     $return = $wsdlInterpreter->savePHP($path);
     $path .= DS;
     $file = str_replace($path, '', $return[0]);
     $class = substr($file, 0, -4);
     $this->hr();
     $this->out('Lib saved to:' . $path . $file);
     $text = "'lib' => '" . $plugin . $class . "'";
     $this->out("Add 'lib' key to the config in database.php: " . $text);
     $this->hr();
 }
 /**
  * The main entry point method for the task.
  */
 public function main()
 {
     $this->log(sprintf("Starting: %s to %s", $this->url, $this->outputDir), Project::MSG_INFO);
     $wsdlInterpreter = new WSDLInterpreter($this->url, $this->soapClientClassName, $this->classmap, $this->conflictClassmap, $this->serviceName, $this->version, $this->package, $this->soapClientClassPath, $this->proxy, $this->enableNamespaces, $this->skipClassNameCheckTypes);
     $wsdlInterpreter->savePHP($this->outputDir);
     $loadedClasses = $wsdlInterpreter->getLoadedClassesCount();
     $loadedServices = $wsdlInterpreter->getLoadedServicesCount();
     $this->log(sprintf("[objects created: %d][url: %s]", $loadedClasses + $loadedServices, $this->url), Project::MSG_INFO);
     $this->log(sprintf("Created: [classes: %d][services: %d][functions: %d]", $loadedClasses, $loadedServices, $wsdlInterpreter->getLoadedFunctionsCount()), Project::MSG_VERBOSE);
 }
Ejemplo n.º 3
0
 * 
 * LICENSE: This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 * @category    WebServices 
 * @package     WSDLI  
 * @author      Garry Welding gkwelding@gmail.com
 * @copyright   2013 Garry Welding
 * @license     http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
 * 
 */
require_once 'WSDLInterpreter.class.php';
$wsdlInterpreter = new WSDLInterpreter($argv[1]);
try {
    $results = $wsdlInterpreter->savePHP(dirname(__FILE__) . '/output/');
    echo "Written: \n";
    foreach ($results as $result) {
        echo "{$result} \n";
    }
} catch (WSDLInterpreterException $e) {
    echo $e->getMessage();
}
Ejemplo n.º 4
0
<?php

require_once 'WSDLInterpreter.php';
$myWSDLlocation = 'readWrite/output.wsdl';
$wsdlInterpreter = new WSDLInterpreter($myWSDLlocation);
$wsdlInterpreter->savePHP('.');
Ejemplo n.º 5
0
 /**
  * The main entry point method for the task.
  */
 public function main()
 {
     print 'Starting: ' . $this->url . ' to ' . $this->outputDir . "\n";
     $wsdlInterpreter = new WSDLInterpreter($this->url, $this->soapClientClassName, $this->classmap, $this->conflictClassmap, $this->serviceName, $this->version, $this->author, $this->package, $this->soapClientClassPath, $this->proxy, $this->enablePseudoNamespaces, $this->skipClassNameCheckTypes);
     $wsdlInterpreter->savePHP($this->outputDir);
     print 'Done: ' . $this->url . "\n";
 }