From 2b8f75b4aed5e3b8d942ea344b3238bf413493a5 Mon Sep 17 00:00:00 2001 From: Gianluigi 'cocciagialla' Mammarella Date: Thu, 11 Apr 2019 10:33:17 +0200 Subject: [PATCH] Fix wsdl for array complex type --- src/BeSimple/SoapWsdl/Dumper/Dumper.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/BeSimple/SoapWsdl/Dumper/Dumper.php b/src/BeSimple/SoapWsdl/Dumper/Dumper.php index ce919ce..9121ff9 100644 --- a/src/BeSimple/SoapWsdl/Dumper/Dumper.php +++ b/src/BeSimple/SoapWsdl/Dumper/Dumper.php @@ -239,6 +239,10 @@ class Dumper $rootElement->setAttribute('name', $type->getName()); $complexType = $this->document->createElement(static::XSD_NS.':complexType'); + if ($type instanceof ArrayOfType) { + $complexType->setAttribute('name', $type->getName()); + } + $rootElement->appendChild($complexType); //$all = $this->document->createElement(static::XSD_NS.':'.($type instanceof ArrayOfType ? 'sequence' : 'all')); @@ -288,7 +292,7 @@ class Dumper } } - $this->domSchema->appendChild($rootElement); + $this->domSchema->appendChild($type instanceof ArrayOfType ? $complexType : $rootElement); } protected function addPortType()