Пример #1
0
 /**
  * Set the strategy that handles functions and classes that are added AFTER this call.
  *
  * @param  boolean|string|\Zend\Soap\WSDL\Strategy\StrategyInterface $strategy
  * @return \Zend\Soap\AutoDiscover\AutoDiscover
  */
 public function setComplexTypeStrategy($strategy)
 {
     $this->_strategy = $strategy;
     if ($this->_wsdl instanceof WSDL\WSDL) {
         $this->_wsdl->setComplexTypeStrategy($strategy);
     }
     return $this;
 }
Пример #2
0
 /**
  * @group ZF-5430
  */
 public function testMultipleSequenceDefinitionsOfSameTypeWillBeRecognizedOnceBySequenceStrategy()
 {
     $wsdl = new WSDL\WSDL("MyService", "http://localhost/MyService.php");
     $wsdl->setComplexTypeStrategy(new Strategy\ArrayOfTypeSequence());
     $wsdl->addComplexType("string[]");
     $wsdl->addComplexType("int[]");
     $wsdl->addComplexType("string[]");
     $xml = $wsdl->toXml();
     $this->assertEquals(1, substr_count($xml, "ArrayOfString"), "ArrayOfString should appear only once.");
     $this->assertEquals(1, substr_count($xml, "ArrayOfInt"), "ArrayOfInt should appear only once.");
 }