--- library/Zend/Soap/Wsdl/Strategy/ArrayOfTypeSequence.php (revision 15642) +++ library/Zend/Soap/Wsdl/Strategy/ArrayOfTypeSequence.php (working copy) @@ -19,9 +19,9 @@ * @version $Id$ */ -require_once "Abstract.php"; +require_once "Zend/Soap/Wsdl/Strategy/DefaultComplexType.php"; -class Zend_Soap_Wsdl_Strategy_ArrayOfTypeSequence extends Zend_Soap_Wsdl_Strategy_Abstract +class Zend_Soap_Wsdl_Strategy_ArrayOfTypeSequence extends Zend_Soap_Wsdl_Strategy_DefaultComplexType { /** * Add an unbounded ArrayOfType based on the xsd:sequence syntax if type[] is detected in return value doc comment. @@ -46,11 +46,12 @@ $this->getContext()->addType($complexTypeName); return "tns:$complexTypeName"; + } else if (!in_array($type, $this->getContext()->getTypes())) { + // New singular complex type + return parent::addComplexType($type); } else { - require_once "Zend/Soap/Wsdl/Exception.php"; - throw new Zend_Soap_Wsdl_Exception(sprintf( - 'ArrayOfTypeSequence Strategy does not allow for complex types that are not in @return type[] syntax. "%s" type was specified.', $type - )); + // Existing complex type + return $this->getContext()->getType($type); } } @@ -95,14 +96,6 @@ protected function _getSingularType($type) { $singulartype = $this->getContext()->getType(str_replace("[]", "", $type)); - - if(substr($singulartype, 0, 4) != "xsd:") { - require_once "Zend/Soap/Wsdl/Exception.php"; - throw new Zend_Soap_Wsdl_Exception(sprintf( - 'ArrayOfTypeSequence Strategy works only with arrays of simple types like int, string, boolean, not with "%s".'. - 'You may use Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex for more complex types.', $type - )); - } return $singulartype; }