protected function appendTypes(DOMElement $element, Resource $resource) { $types = $element->ownerDocument->createElement('wsdl:types'); $schema = $element->ownerDocument->createElementNS('http://www.w3.org/2001/XMLSchema', 'xs:schema'); $schema->setAttribute('targetNamespace', $this->targetNamespace); $schema->setAttribute('elementFormDefault', 'qualified'); $schema->setAttribute('xmlns:tns', $this->targetNamespace); $xsdGenerator = new Xsd($this->targetNamespace); $xsdGenerator->appendSchema($schema, $resource); $types->appendChild($schema); $element->appendChild($types); }