ZF-10147: Strategy ArrayofTypeComplex Definition & Infinit recursion

Description

If I define


class Model_DTO_User
{
   /**
   * @var Model_DTO_Book[]
   */
   $books;
}


class Model_DTO_Book
{
   /**
   * @var Model_DTO_User[]
   */
   $users;
}

When I try to generat WSDL, I have a problem of "Message: Infinite recursion, cannot nest 'Model_DTO_Book[]' into itself." Thrown by Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex.

Also, I have found a custom patch


//Replace
if(in_array($type, $this->_inProcess)) {
    require_once "Zend/Soap/Wsdl/Exception.php";
    throw new Zend_Soap_Wsdl_Exception("Infinite recursion, cannot nest '".$type."' into itself.");
}

//By
if(in_array($type, $this->_inProcess)) {
    //require_once "Zend/Soap/Wsdl/Exception.php";
    //throw new Zend_Soap_Wsdl_Exception("Infinite recursion, cannot nest '".$type."' into itself.");
    return "tns:$type"; 
}

When I do that, It work fine. But, WSDL define many times some types :



[...]

[...]

[...]

So, When I'm trying to import WSDL file. A problem of duplicate definition appears.

Comments

This already was resolved in trunk r21658. Will be applied the next minor release.

Greetings Ramon