ZF-4262: WSDL Autodiscover: DocBlock Params and Return Types are Case-Sensitive

Description

When using Zend_Soap_Wsdl Autodiscover it uses Reflection to inspect the parameter types. These user given types via doc-block are case-sensitive. So having a type "@param inT", "@param Int", or "@param Integer" is causing the function Zend_Soap_Wsdl::getType() to not match the specific SOAP type and try to "class_exists" on the type, which leads to a Warning in conjunction with Zend_Loader:

Warning: Zend_Loader::include_once(Integer.php) [function.Zend-Loader-include-once]: failed to open stream: No such file or directory in /var/www/development/zend/ZendFramework-1.6.0-minimal/library/Zend/Loader.php on line 83

Time Memory Function Location

1 0.0000 51288 {main}( ) ../dump.php:0 2 0.0114 629360 Zend_Soap_AutoDiscover->setClass( ) ../dump.php:38 3 0.0166 781516 Zend_Soap_Wsdl->getType( ) ../AutoDiscover.php:100 4 0.0166 781516 class_exists ( ) ../Wsdl.php:431 5 0.0166 781516 Zend_Loader::autoload( ) ../Loader.php:0 6 0.0166 781516 Zend_Loader::loadClass( ) ../Loader.php:181

This breaks the WSDL XML File. You could argue set error reporting off, but in development you want to see if anything else might cause an XML break due to thrown warning or whatever.

To solve this issue the soap base type specific type checking should be case-insensitive and the custom object type checking should be moved outside the switch-default statement into a case-sensitive check.

Comments

I have attached a patch to revision 9996 of the Wsdl.php, which changes the getType() function of the class to allow for case-insensitive parameter checking.

i just realized i overshoot the patch. its really just the strtolower($type) that is needed. all the other stuff is still working correctly.

Changing issues in preparation for the 1.7.0 release.