||WSDL To PHP
Generate classes to send SOAP requests from a WSDL
||[UPDATE] minor PHP doc block updates
[UPDATE] PSR-2 standards for generator files and generated files
[UPDATE] enhancement and compliance
In order to let the PHP native SoapClient class handle correctly the
object to send based on the request created with the generated classes,
we no longer define the array to send. Indeed, it's better to let the
SoapClient convert the object passed to the generate method mathcing the
operation to call instead of defining an array based on the object. It
actually creates conflicts or defines values that should be sent.
By this update, the option sendArrayAsParameter should be not useful
By this update we lose the faculty to define a specific behaviour on the
values sent because we previously called the getter associated to the
value to send. In this case, the generate method PHP doc block has been
Update of the sample file to be more explicit on the optional parameter
when instantiating a Service class.
Finally, the sample case for PayPal in samples-generator.php has been
updated to give a functional example based on this update.
[UPDATE] enhancements and refactoring
Simplification of the instantiation of Service objects in the
generated sample file by removing the SoapClient options parameter. By
default, the cache_wsdl is disabled, the wsdl_url is set with the WSDL
url used to generate the package and trace is set with true. The
VALUE_WSDL_URL constant has been added to the generated WsdlClass
defined with the WSDL url used to generate the package.
Remove trailing ?> in generator files/classes.
Add WsdlToPhpGenerator::getWsdl($_index) method to get any WSDL at any
Enhance generated sample file with explanation about the optional
parameter allowing to override the SoapClient Options. Remove the $wsdl
parareter previously used to instantiate each Service object.
Avoid Struct object to reset SoapClient when it is instantiated when
calling the parent constructor.
[UPDATE] updates initiated by the pull request https://github.com/mikaelcom/WsdlToPhp/pull/11
||5 years ago