コード例 #1
0
ファイル: WsdlTest.php プロジェクト: jorgenils/zend-framework
 function testToDomDocument()
 {
     $wsdl = new Zend_Soap_Wsdl('MyService', 'http://localhost/MyService.php');
     $dom = $wsdl->toDomDocument();
     
     $this->assertTrue($dom instanceOf DOMDocument);
     
     $this->assertEquals($dom->saveXML(), 
                         '<?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"/>' . PHP_EOL);
 }