Fix dumper in order to generate a valid WSDL
This commit is contained in:
parent
b8bf76aeb9
commit
729a2bc8df
|
@ -235,17 +235,9 @@ class Dumper
|
||||||
|
|
||||||
protected function addComplexType(ComplexType $type)
|
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');
|
$complexType = $this->document->createElement(static::XSD_NS.':complexType');
|
||||||
if ($type instanceof ArrayOfType) {
|
$complexType->setAttribute('name', $type->getXmlType());
|
||||||
$complexType->setAttribute('name', $type->getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
$rootElement->appendChild($complexType);
|
|
||||||
|
|
||||||
//$all = $this->document->createElement(static::XSD_NS.':'.($type instanceof ArrayOfType ? 'sequence' : 'all'));
|
|
||||||
$all = $this->document->createElement(static::XSD_NS.':'.'sequence');
|
$all = $this->document->createElement(static::XSD_NS.':'.'sequence');
|
||||||
$complexType->appendChild($all);
|
$complexType->appendChild($all);
|
||||||
|
|
||||||
|
@ -266,11 +258,6 @@ class Dumper
|
||||||
$name = $childType->getName();
|
$name = $childType->getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (0 === strpos($name, 'ArrayOf')) {
|
|
||||||
// $isArray = true;
|
|
||||||
// $name = lcfirst(substr($name, 7));
|
|
||||||
// }
|
|
||||||
|
|
||||||
$element->setAttribute('type', static::TYPES_NS.':'.$name);
|
$element->setAttribute('type', static::TYPES_NS.':'.$name);
|
||||||
} else {
|
} else {
|
||||||
$element->setAttribute('type', $childType);
|
$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()
|
protected function addPortType()
|
||||||
|
|
Loading…
Reference in New Issue