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

Issue Type: Bug Created: 2008-09-12T03:57:26.000+0000 Last Updated: 2008-11-13T14:10:10.000+0000 Status: Resolved Fix version(s): - 1.7.0 (17/Nov/08)

Reporter: Benjamin Eberlei (beberlei) Assignee: Benjamin Eberlei (beberlei) Tags: - Zend_Soap_Wsdl

Related issues: - ZF-3910

Attachments: - Wsdl.php.patch


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.


Posted by Benjamin Eberlei (beberlei) on 2008-09-23T11:47:43.000+0000

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.

Posted by Benjamin Eberlei (beberlei) on 2008-09-23T14:41:07.000+0000

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

Posted by Wil Sinclair (wil) on 2008-11-13T14:10:10.000+0000

Changing issues in preparation for the 1.7.0 release.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.