ZF-7523: The WSDL function dont load the Strategy include files
Description
When you set de strategy for complex type detection and handling the Class WSLD use the param $strategy and recive this values True, False or String Value
For True value the function setComplexTypeStrategy does
require_once "Zend/Soap/Wsdl/Strategy/DefaultComplexType.php"; #Include the Strategy File
$strategy = new Zend_Soap_Wsdl_Strategy_DefaultComplexType(); #Set the object with the class defined on the Strategy Include file
For the False value does:
require_once "Zend/Soap/Wsdl/Strategy/AnyType.php"; #Include the Strategy File
$strategy = new Zend_Soap_Wsdl_Strategy_AnyType(); #Set the object with the class defined on the Strategy Include file
But in the String Value case, exists those values :
Zend_Soap_Wsdl_Strategy_ArrayOfTypeSequence or Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex
The function try to check if the $strategy class exists, and if this class its not defined, thow an Expection.. thats Ok...
if(class_exists($strategy)) {
$strategy = new $strategy();
} else {
require_once "Zend/Soap/Wsdl/Exception.php";
throw new Zend_Soap_Wsdl_Exception(
sprintf("Strategy with name '%s does not exist.", $strategy
));
}
but, how its gonna exists the class if you doesn't include the class file like the other boolean cases.
I did a Fix for this including the strategy file class with
//----------- Here -------------- require_once str_replace("_", "/", $strategy) . ".php"; //----------- End Here --------------
if(class_exists($strategy)) {
$strategy = new $strategy();
} else {
require_once "Zend/Soap/Wsdl/Exception.php";
throw new Zend_Soap_Wsdl_Exception(
sprintf("Strategy with name '%s does not exist.", $strategy
));
}
and now with Zend_Soap_Wsdl_Strategy_ArrayOfTypeSequence or Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex cases, the WSLD class load the files "Zend/Soap/Wsdl/Strategy/ArrayOfTypeSequence.php" and "Zend/Soap/Wsdl/Strategy/ArrayOfTypeComplex.php"
Regards
Comments
Posted by Rob Allen (rob) on 2012-11-20T20:53:26.000+0000
Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".
Feel free to re-open and provide a patch if you want to fix this issue.