コード例 #1
0
 public function dump(ServiceProvider $serviceProvider)
 {
     ini_set("soap.wsdl_cache", "0");
     ini_set("soap.wsdl_cache_enabled", "0");
     ini_set('soap.wsdl_cache_ttl', 0);
     $filePath = $serviceProvider->getWsdlPath();
     $autodiscover = new AutoDiscover();
     $autodiscover->setClass($serviceProvider->getServiceClassName())->setComplexTypeStrategy(new \Zend\Soap\Wsdl\ComplexTypeStrategy\DefaultComplexType())->setUri($serviceProvider->getUrlLocation())->setServiceName('MySoapService');
     $autodiscover->dump($filePath);
 }
コード例 #2
0
 /**
  * @group ZF-5330
  */
 public function testDumpOnlyAfterGeneratedAutoDiscoverWsdl()
 {
     $server = new AutoDiscover();
     
     $this->setExpectedException('Zend\Soap\Exception\RuntimeException', 'Cannot dump autodiscovered contents');
     $server->dump(false);
 }
コード例 #3
0
ファイル: AutoDiscoverTest.php プロジェクト: heiglandreas/zf2
 /**
  * @group ZF-5330
  */
 public function testDumpOrXmlOnlyAfterGeneratedAutoDiscoverWsdl()
 {
     $server = new AutoDiscover();
     try {
         $server->dump(false);
         $this->fail();
     } catch (\Exception $e) {
         $this->assertTrue($e instanceof AutoDiscoverException);
     }
     try {
         $server->toXml();
         $this->fail();
     } catch (\Exception $e) {
         $this->assertTrue($e instanceof AutoDiscoverException);
     }
 }