Пример #1
0
 public function renderWSDL()
 {
     header("Content-Type: text/xml");
     $xml = new XMLGenerator($this->_class, $this->_namespace, $this->_location);
     $xml->setWSDLMethods($this->_classParser->getMethods())->setBindingStyle($this->_bindingStyle)->generate();
     $xml->render();
 }
Пример #2
0
 /**
  * @test
  */
 public function shouldCorrectCreateWsdlWithMultipleWrappersForDocumentLiteralWrapped()
 {
     //given
     XMLGenerator::$alreadyGeneratedComplexTypes = array();
     $classParser = new ClassParser('\\Mocks\\MockMultipleWrappers');
     $classParser->parse();
     $xml = new XMLGenerator('\\Mocks\\MockMultipleWrappers', $this->_namespace, $this->_location);
     $xml->setWSDLMethods($classParser->getMethods())->setBindingStyle(new DocumentLiteralWrapped())->generate();
     //when
     $wsdl = $xml->getGeneratedXML();
     //then
     $file = Path::join(__DIR__, 'xml_file_asserts', 'multiple_wrappers.wsdl');
     $this->assertXmlStringEqualsXmlFile($file, $wsdl);
 }