From 729a2bc8df835b4dbb5d8ac857c933dfe275cf39 Mon Sep 17 00:00:00 2001 From: Tim Timmermans Date: Thu, 11 Jul 2019 15:26:23 +0200 Subject: [PATCH] Fix dumper in order to generate a valid WSDL --- src/BeSimple/SoapWsdl/Dumper/Dumper.php | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/BeSimple/SoapWsdl/Dumper/Dumper.php b/src/BeSimple/SoapWsdl/Dumper/Dumper.php index b527605..736b608 100644 --- a/src/BeSimple/SoapWsdl/Dumper/Dumper.php +++ b/src/BeSimple/SoapWsdl/Dumper/Dumper.php @@ -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()