Additional PropertyAssembler
not working - any ideas why?
#541
Answered
by
trailsnail
trailsnail
asked this question in
Q&A
-
Hi there, after successful upgrade weeks ago where we discussed some details in #529 we are upgrading the next project. Here I want to create a specific class with soap-client.php...
Config::create()
->setEngine($engine = DefaultEngineFactory::create(
ExtSoapOptions::defaults('C:\dvl\DefaultWorkspace\kunzmann\soap\dhl\config\geschaeftskundenversand-api-3.2.0.wsdl', [])
->disableWsdlCache()
))
->setTypeDestination('soap/dhl\Type')
->setTypeNamespace('DhlApi\Type')
->setClientDestination('soap/dhl')
->setClientName('DhlClient')
->setClientNamespace('DhlApi')
->setClassMapDestination('soap/dhl')
->setClassMapName('DhlClassmap')
->setClassMapNamespace('DhlApi')
->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()),
])
)
)
->addRule(new Rules\TypenameMatchesRule(
new Rules\AssembleRule(new Assembler\PropertyAssembler(PropertyGenerator::VISIBILITY_PROTECTED)),
'/^ShipmentDetailsType$/'
))
->addRule(new Rules\TypenameMatchesRule(
new Rules\AssembleRule(new Assembler\ExtendAssembler('DhlApi\Type\ShipmentDetailsType')),
'/^ShipmentDetailsTypeType$/'
))
; attached Rules in config
.. and now the questionThe |
Beta Was this translation helpful? Give feedback.
Answered by
trailsnail
Sep 3, 2024
Replies: 1 comment 2 replies
-
Hello, Most likely a typo since the types are not equal on both rules? ->addRule(new Rules\TypenameMatchesRule(
new Rules\AssembleRule(new Assembler\PropertyAssembler(PropertyGenerator::VISIBILITY_PROTECTED)),
- '/^ShipmentDetailsType$/'
+ '/^ShipmentDetailsTypeType$/'
))
->addRule(new Rules\TypenameMatchesRule(
new Rules\AssembleRule(new Assembler\ExtendAssembler('DhlApi\Type\ShipmentDetailsType')),
'/^ShipmentDetailsTypeType$/'
)) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🤦🏻 Forget it - if using SOAP Client in version
3.3.0
instead of2.x
while migrating, all works fine. Class is generated as expected. Sorry for the disturbance 😄