コード例 #1
0
ファイル: AutoDiscover.php プロジェクト: kobmaki/icingaweb2
 /**
  * Proxy to WSDL toXml() function
  *
  * @return string
  * @throws Zend_Soap_AutoDiscover_Exception
  */
 public function toXml()
 {
     if ($this->_wsdl !== null) {
         return $this->_wsdl->toXml();
     } else {
         /**
          * @see Zend_Soap_AutoDiscover_Exception
          */
         throw new Zend_Soap_AutoDiscover_Exception("Cannot return autodiscovered contents, WSDL file has not been generated yet.");
     }
 }
コード例 #2
0
ファイル: AutoDiscover.php プロジェクト: kxopa/WebSite-PHP
 /**
  * Proxy to WSDL toXml() function
  */
 public function toXml()
 {
     if ($this->_wsdl !== null) {
         return $this->_wsdl->toXml();
     } else {
         /**
          * @see Zend_Soap_AutoDiscover_Exception
          */
         require_once "wsp/class/webservice/Soap/wsp/class/webservice/Exception.php";
         throw new Zend_Soap_AutoDiscover_Exception("Cannot return autodiscovered contents, WSDL file has not been generated yet.");
     }
 }
コード例 #3
0
ファイル: WsdlTest.php プロジェクト: jorgenils/zend-framework
 function testAddComplexType()
 {
     $wsdl = new Zend_Soap_Wsdl('MyService', 'http://localhost/MyService.php');
     
     $wsdl->addComplexType('Zend_Soap_Wsdl_Test');
     
     $this->assertEquals($wsdl->toXml(), 
                         '<?xml version="1.0"?>' . PHP_EOL .
                         '<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" '
                            . 'xmlns:tns="http://localhost/MyService.php" '
                            . 'xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" '
                            . 'xmlns:xsd="http://www.w3.org/2001/XMLSchema" '
                            . 'xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" '
                            . 'name="MyService" targetNamespace="http://localhost/MyService.php">'
                            . '<types>'
                            .   '<xsd:schema targetNamespace="">'
                            .     '<xsd:complexType name="Zend_Soap_Wsdl_Test">'
                            .       '<xsd:all>'
                            .         '<xsd:element name="var1" type="xsd:int"/>'
                            .         '<xsd:element name="var2" type="xsd:string"/>'
                            .       '</xsd:all>'
                            .     '</xsd:complexType>'
                            .   '</xsd:schema>'
                            . '</types>'
                       . '</definitions>' . PHP_EOL);
 }
コード例 #4
0
ファイル: WsdlTest.php プロジェクト: jsnshrmn/Suma
 /**
  * @group ZF-5430
  */
 public function testMultipleSequenceDefinitionsOfSameTypeWillBeRecognizedOnceBySequenceStrategy()
 {
     $wsdl = new Zend_Soap_Wsdl("MyService", "http://localhost/MyService.php");
     $wsdl->setComplexTypeStrategy(new Zend_Soap_Wsdl_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.");
 }