goetas-webservices / xsd2php

Convert XSD into PHP classes and JMS serializer definitions
MIT License
238 stars 93 forks source link

xsd:sequence produces Uncaught TypeError like xsd:group in #163 #170

Open romanatteamnet opened 8 months ago

romanatteamnet commented 8 months ago
PHP Fatal error:  Uncaught TypeError: GoetasWebservices\Xsd\XsdToPhp\Php\PhpConverter::visitElement(): Argument #3 ($element) must be of type GoetasWebservices\XML\XSDReader\Schema\Element\ElementSingle, GoetasWebservices\XML\XSDReader\Schema\Element\Sequence given, called in <truncated>/lib/vendor/goetas-webservices/xsd2php/src/Php/PhpConverter.php on line 132 and defined in <truncated>/lib/vendor/goetas-webservices/xsd2php/src/Php/PhpConverter.php:428
Stack trace:
#0 <truncated>/lib/vendor/goetas-webservices/xsd2php/src/Php/PhpConverter.php(132): GoetasWebservices\Xsd\XsdToPhp\Php\PhpConverter->visitElement()
#1 <truncated>/lib/vendor/goetas-webservices/xsd2php/src/Php/PhpConverter.php(324): GoetasWebservices\Xsd\XsdToPhp\Php\PhpConverter->visitChoice()
#2 <truncated>/lib/vendor/goetas-webservices/xsd2php/src/Php/PhpConverter.php(118): GoetasWebservices\Xsd\XsdToPhp\Php\PhpConverter->visitComplexType()
#3 <truncated>/lib/vendor/goetas-webservices/xsd2php/src/Php/PhpConverter.php(267): GoetasWebservices\Xsd\XsdToPhp\Php\PhpConverter->visitTypeBase()
#4 <truncated>/lib/vendor/goetas-webservices/xsd2php/src/Php/PhpConverter.php(506): GoetasWebservices\Xsd\XsdToPhp\Php\PhpConverter->visitType()
#5 <truncated>/lib/vendor/goetas-webservices/xsd2php/src/Php/PhpConverter.php(555): GoetasWebservices\Xsd\XsdToPhp\Php\PhpConverter->findPHPClass()
#6 <truncated>/lib/vendor/goetas-webservices/xsd2php/src/Php/PhpConverter.php(482): GoetasWebservices\Xsd\XsdToPhp\Php\PhpConverter->findPHPElementClassName()
#7 <truncated>/lib/vendor/goetas-webservices/xsd2php/src/Php/PhpConverter.php(328): GoetasWebservices\Xsd\XsdToPhp\Php\PhpConverter->visitElement()
#8 <truncated>/lib/vendor/goetas-webservices/xsd2php/src/Php/PhpConverter.php(118): GoetasWebservices\Xsd\XsdToPhp\Php\PhpConverter->visitComplexType()
#9 <truncated>/lib/vendor/goetas-webservices/xsd2php/src/Php/PhpConverter.php(267): GoetasWebservices\Xsd\XsdToPhp\Php\PhpConverter->visitTypeBase()
#10 <truncated>/lib/vendor/goetas-webservices/xsd2php/src/Php/PhpConverter.php(94): GoetasWebservices\Xsd\XsdToPhp\Php\PhpConverter->visitType()
#11 <truncated>/lib/vendor/goetas-webservices/xsd2php/src/Php/PhpConverter.php(62): GoetasWebservices\Xsd\XsdToPhp\Php\PhpConverter->navigate()
#12 <truncated>/lib/vendor/goetas-webservices/xsd2php/src/Command/Convert.php(62): GoetasWebservices\Xsd\XsdToPhp\Php\PhpConverter->convert()
#13 <truncated>/lib/vendor/symfony/console/Command/Command.php(326): GoetasWebservices\Xsd\XsdToPhp\Command\Convert->execute()
#14 <truncated>/lib/vendor/symfony/console/Application.php(1078): Symfony\Component\Console\Command\Command->run()
#15 <truncated>/lib/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()
#16 <truncated>/lib/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()
#17 <truncated>/lib/vendor/goetas-webservices/xsd2php/bin/xsd2php(26): Symfony\Component\Console\Application->run()
#18 <truncated>/lib/vendor/bin/xsd2php(119): include('...')
#19 {main}
  thrown in <truncated>/lib/vendor/goetas-webservices/xsd2php/src/Php/PhpConverter.php on line 428  
romanatteamnet commented 8 months ago

Example http://xsd.dakosy.de/fairatlink/messages20.xsd

miroslav-chandler commented 8 months ago

+1

turbo124 commented 6 months ago

+1

HeathNaylorSI commented 2 months ago

+1

IGORnvk commented 1 month ago

+1