示例#1
0
 /**
  * Proxy to WSDL toXml() function
  */
 public function toXml()
 {
     if ($this->_wsdl !== null) {
         return $this->_wsdl->toXml();
     } else {
         throw new Exception('Cannot return autodiscovered contents, WSDL file has not been generated yet.');
     }
 }
示例#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.");
 }