Fix dumper in order to generate a valid WSDL

This commit is contained in:
Tim Timmermans 2019-07-11 15:26:23 +02:00 committed by BohwaZ
parent b8bf76aeb9
commit 729a2bc8df
1 changed files with 2 additions and 15 deletions

View File

@ -235,17 +235,9 @@ class Dumper
protected function addComplexType(ComplexType $type)
{
$rootElement = $this->document->createElement(static::XSD_NS.':element');
$rootElement->setAttribute('name', $type->getName());
$complexType = $this->document->createElement(static::XSD_NS.':complexType');
if ($type instanceof ArrayOfType) {
$complexType->setAttribute('name', $type->getName());
}
$complexType->setAttribute('name', $type->getXmlType());
$rootElement->appendChild($complexType);
//$all = $this->document->createElement(static::XSD_NS.':'.($type instanceof ArrayOfType ? 'sequence' : 'all'));
$all = $this->document->createElement(static::XSD_NS.':'.'sequence');
$complexType->appendChild($all);
@ -266,11 +258,6 @@ class Dumper
$name = $childType->getName();
}
// if (0 === strpos($name, 'ArrayOf')) {
// $isArray = true;
// $name = lcfirst(substr($name, 7));
// }
$element->setAttribute('type', static::TYPES_NS.':'.$name);
} else {
$element->setAttribute('type', $childType);
@ -296,7 +283,7 @@ class Dumper
}
}
$this->domSchema->appendChild($type instanceof ArrayOfType ? $complexType : $rootElement);
$this->domSchema->appendChild($complexType);
}
protected function addPortType()