/**
  * @depends testComplexTypeGenerator
  * @depends testSimpleTypeGenerator
  * @depends testSoapClientGenerator
  */
 public function testSoapServiceGenerator()
 {
     $generator = new SoapServiceGenerator(self::$wsdlPath, self::$exportPath, self::$namespace, array('RuntimeException', 'SoapFault', 'SoapClient as BaseSoapClient', 'InvalidArgumentException'), self::$licensePath);
     $generator->execute();
     $reflection = new \ReflectionClass(self::$namespace . '\\SoapService');
     $this->assertClass($reflection);
     $this->assertPublicMethod($reflection, 'Test');
     $this->assertPublicMethod($reflection, 'getSoapClient');
     $soapService = $reflection->newInstanceArgs(array(self::$namespace . '\\SoapClient', self::$wsdlPath));
     $this->assertInstanceOf(self::$namespace . '\\SoapService', $soapService);
 }
 /**
  * {@inheritDoc}
  *
  * @param InputInterface $input
  * @param OutputInterface $output
  * @return int
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     /** @var DialogHelper $dialog */
     $dialog = $this->getHelperSet()->get('dialog');
     $wsdl = Validators::validateWsdl($input->getOption('wsdl'));
     $dir = Validators::validateTargetDir($input->getOption('dir'));
     $namespace = Validators::validateNamespace($input->getOption('namespace'));
     $licensePath = Validators::validateLicensePath($input->getOption('license-path'));
     if ($input->isInteractive()) {
         $this->writeSection($output, array(sprintf('Path to the wsdl file: "%s"', $wsdl), sprintf('The directory where to create proxy classes: "%s"', $dir), sprintf('The namespace of proxy classes to create: "%s"', $namespace)));
         if (!$dialog->askConfirmation($output, $this->getQuestion('Do you confirm generation', 'yes', '?'), true)) {
             $output->writeln('<error>Command aborted</error>');
             return 1;
         }
     }
     $generator = new SimpleTypeAbstractGenerator($wsdl, $dir . 'SimpleType', $namespace . '\\SimpleType', array(), $licensePath);
     $generator->execute();
     $generator = new ComplexTypeAbstractGenerator($wsdl, $dir . 'ComplexType', $namespace . '\\ComplexType', array($namespace . '\\SimpleType'), $licensePath);
     $generator->execute();
     $generator = new SimpleTypeGenerator($wsdl, $dir . 'SimpleType', $namespace . '\\SimpleType', array(), $licensePath);
     $generator->execute();
     $generator = new ComplexTypeGenerator($wsdl, $dir . 'ComplexType', $namespace . '\\ComplexType', array($namespace . '\\SimpleType'), $licensePath);
     $generator->execute();
     $generator = new SoapClientGenerator($wsdl, $dir, $namespace, array('RuntimeException', 'SoapFault', 'SoapClient as BaseSoapClient'), $licensePath);
     $generator->execute();
     $generator = new SoapServiceGenerator($wsdl, $dir, $namespace, array('RuntimeException', 'SoapFault', 'SoapClient as BaseSoapClient', 'InvalidArgumentException'), $licensePath);
     $generator->execute();
     unset($generator);
 }