-
Hey there, this is a great package! Thanks for maintaining. The WSDL definds the following complex type:
This type is referenced in another complex-Type (PurchaseRequestItemManually): When running the type-generation from CLI the type-class-files are created but the "unitCode"-Attribute is missing in the Type "PurchaseRequestItemManually" for the Quantity-element. It just sets it as a simple float-Value. I think it's a configuration issues but I don't get the hack. Any ideas? From a SOAP-UI-Project I extracted the "target XML" we need, the relevant part is: I can set the parameter to 10 (float) but I need to change the unitCode. Thanks guys! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Hello, Thanks for reporting Is it possible to share the WSDL or create a WSDL that resembles the issue? It might also help if you share the signature of the type from |
Beta Was this translation helpful? Give feedback.
-
Hey there, thanks a lot for the reply! The SOAP-Client Config looks like this: <?php
use Phpro\SoapClient\CodeGenerator\Assembler;
use Phpro\SoapClient\CodeGenerator\Config\Config;
use Phpro\SoapClient\CodeGenerator\Rules;
use Phpro\SoapClient\Soap\Driver\ExtSoap\ExtSoapEngineFactory;
use Phpro\SoapClient\Soap\Driver\ExtSoap\ExtSoapOptions;
return Config::create()
->setEngine($engine = ExtSoapEngineFactory::fromOptions(
ExtSoapOptions::defaults('src/Lib/ApiClients/SAPByD/Wsdl/ManagePurchaseRequestIn.wsdl', [])
->disableWsdlCache()
))
->setTypeDestination('src/Lib/ApiClients/SAPByD/ManagePurchaseRequestIn/Type')
->setTypeNamespace('App\Lib\ApiClients\SAPByD\ManagePurchaseRequestIn\Type')
->setClientDestination('src/Lib/ApiClients/SAPByD/ManagePurchaseRequestIn')
->setClientName('SAPByDManagePurchaseRequestInClient')
->setClientNamespace('App\Lib\ApiClients\SAPByD\ManagePurchaseRequestIn')
->setClassMapDestination('src/Lib/ApiClients/SAPByD/ManagePurchaseRequestIn')
->setClassMapName('SAPByDManagePurchaseRequestInClassmap')
->setClassMapNamespace('App\Lib\ApiClients\SAPByD\ManagePurchaseRequestIn')
->addRule(new Rules\AssembleRule(new Assembler\GetterAssembler(new Assembler\GetterAssemblerOptions())))
->addRule(new Rules\AssembleRule(new Assembler\ImmutableSetterAssembler(
new Assembler\ImmutableSetterAssemblerOptions()
)))
->addRule(
new Rules\IsRequestRule(
$engine->getMetadata(),
new Rules\MultiRule([
new Rules\AssembleRule(new Assembler\RequestAssembler()),
new Rules\AssembleRule(new Assembler\ConstructorAssembler(new Assembler\ConstructorAssemblerOptions())),
])
)
)
->addRule(
new Rules\IsResultRule(
$engine->getMetadata(),
new Rules\MultiRule([
new Rules\AssembleRule(new Assembler\ResultAssembler()),
])
)
)
; |
Beta Was this translation helpful? Give feedback.
-
It does create this class: class Quantity
{
/**
* @var \App\Lib\ApiClients\SAPByD\ManagePurchaseRequestIn\Type\QuantityContent
*/
private $_;
/**
* @var string
*/
private $unitCode;
} The |
Beta Was this translation helpful? Give feedback.
It does create this class:
The
_
here is the (float) value of the xml element and theunitCode
is the attribute.You normally can set this to PurchaseRequestItemManually->quantity (but strict types won't work)