You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The mapping for xzufi:struktur should map to LeistungsstrukturObjektMitVerrichtung but it throws an exception:
Phpro\SoapClient\Exception\SoapException: Failed decoding type Soap\Encoding\Xml\Node\Element as {http://xoev.de/schemata/xzufi/2_2_0:leistungen.antwort.leistung.040104}. Failed at path "parameters.antwort.ergebnis.leistung.struktur". in Phpro\SoapClient\Exception\SoapException::fromThrowable() (line 19 of projectpath/vendor/phpro/soap-client/src/Phpro/SoapClient/Exception/SoapException.php).
Snipped SOAP responce code for struktur (full code is below):
The generated type Leistung has a property $struktur with a type of Leistungsstruktur. The generated type for Leistungsstruktur is an abstract class. The generated type for LeistungsstrukturObjektMitVerrichtung extends the abstract class Leistungsstruktur and should be mapped by the attribute in the SOAP-response xsi:type="xzufi:LeistungsstrukturObjektMitVerrichtung".
abstractclass Leistungsstruktur
{
}
class LeistungsstrukturObjekt extends Leistungsstruktur
{
/** * Zuordnung der Leistungsgruppierung, z.B. "Baurecht". * * @var null | namespace\Type\LeistungsgruppierungAuswahl */private ?namespace\Type\LeistungsgruppierungAuswahl$leistungsgruppierung = null;
// more code
class LeistungsstrukturObjektMitVerrichtung extends LeistungsstrukturObjekt
{
/** * ID des zugeordneten Leistungsobjekts (Basis). * * @var namespace\Type\Identifikator */privatenamespace\Type\Identifikator$leistungsobjektID;
// more code
}
class Leistung
{
/** * Angabe der Struktur der Leistung gemäß LeiKa. Eine Leistung ist entweder Leistungsobjekt (LO), Leistungsobjekt mit Verrichtung (LOV) oder Leistungsobjekt mit Verrichtung und Detail (LOVD). * * * Folgt die Leistung nicht dieser Struktur bzw. ist eine reine Auskunftsleistung, wird dieses Attribut nicht gesetzt. * * @var null | namespace\Type\Leistungsstruktur */private ?namespace\Type\Leistungsstruktur$struktur = null;
// more code
Run ./vendor/bin/soap-client generate:types --config config/soap-client.php for https://xzufi-v2-2-0-nw-schul.infodienste.de/?wsdl (warning: it will generate 1400 files...)
Run ./vendor/bin/soap-client generate:classmap --config config/soap-client.php for https://xzufi-v2-2-0-nw-schul.infodienste.de/?wsdl
Use this snipped Response to start the mapping process:
The xzufi:struktur element should be mapped to LeistungsstrukturObjektMitVerrichtung because of the parameter xsi:type="xzufi:LeistungsstrukturObjektMitVerrichtung".
Bug Report
Summary
The mapping for
xzufi:strukturshould map toLeistungsstrukturObjektMitVerrichtungbut it throws an exception:Snipped SOAP responce code for
struktur(full code is below):Current behavior
The generated type
Leistunghas a property$strukturwith a type ofLeistungsstruktur. The generated type forLeistungsstrukturis an abstract class. The generated type forLeistungsstrukturObjektMitVerrichtungextends the abstract classLeistungsstrukturand should be mapped by the attribute in the SOAP-responsexsi:type="xzufi:LeistungsstrukturObjektMitVerrichtung".The generated classmap contains these types:
How to reproduce
soap-client.phpwithsetTypeReplacementStrategyfrom Generated types that use enums have wrong parameters #594../vendor/bin/soap-client generate:types --config config/soap-client.phpforhttps://xzufi-v2-2-0-nw-schul.infodienste.de/?wsdl(warning: it will generate 1400 files...)./vendor/bin/soap-client generate:classmap --config config/soap-client.phpforhttps://xzufi-v2-2-0-nw-schul.infodienste.de/?wsdlExpected behavior
The
xzufi:strukturelement should be mapped toLeistungsstrukturObjektMitVerrichtungbecause of the parameterxsi:type="xzufi:LeistungsstrukturObjektMitVerrichtung".