||WSDL To PHP
Generate classes to send SOAP requests from a WSDL
||[UPDATE] PSR-2 standards for generator files and generated files
[UPDATE] fix issue
Avoid several identical operation with identical parameter to be defined twice
[UPDATE] enhancements for duplicated operations
This now generates distinct methods for operations with distinct
parameter type. The generated method matching the operation is named
either with the parameter type (when there is only one parameter) or
with the md5 hash of the var_export value of the parameters.
[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] several updates based on Github updated files
[UPDATE] debug option and simplification
Add debug option to display each call to audit() method in order to have a trace to each call
Simplify file writing by using file_put_contents and a really simple way to generate the file content
[UPDATE] minor update for local location
[UPDATE] remove useless location to parse
[UPDATE] improve parameter and return types retrievement
use array_push instead of =
fix multiple element declaration with different structure
[UPDATE] global php doc harmonisation and minor improvement
[UPDATES] identical operation parameters type naming fix
As the methods, representing the operations, had their parameters named as their type when the parameter type was an existing known class, it generated errors as we had multiple parameters with the same name (ex: login(StructString $_structString,StructString $_structString), which is conflictual). This was used to generate the sample file easily. This issue was fixed by naming the parameters with their real name (when there is multiple parameters) and by reviewing the sample file generation.
[UPDATE] minor updates
Minor update to avoid PHP warning about empty XML content when calling the method on a DOMDocument property type
Php doc block comment update
[UPDATE] minor updates still for SoapHeader
[UPDATE] SoapHeader improvements
After one case that breaks, we discover one little bug when catching data for SoapHeaders from schemas. Indeed, the namespace was wrong and the name of the parameter too. We made sure data are retrieved from the right WSDL attributes and that each SoapHeader is well defined in the Service class.
Put setSoapHeader method in the *WsdlClass so each Service class can call it which simplifies its definition
[UPDATE] updates initiated by the pull request https://github.com/mikaelcom/WsdlToPhp/pull/11
||2 years ago