Hello Krytie,

the ArrayOfTypeComplex strategy is not ignored. Its used for the first level 
and then replaced by the DefaultComplexType for the second level. I havent 
thought about deeper levels. This is a bug.

I have added an issue to Jira and will look into it for the next release. 
Maybe you should think about writing your own complex strategy that handles
this issue for you in the meantime.

best regards,
Benjamin

On Wednesday 03 December 2008 06:04:50 krytie wrote:
> Hi,
>
> How would I go about defining an array of complex types as a property of
> another complex type? The code below gives me the error.
>
> "Cannot add a complex type MyComplexTypeB[] that is not an object or where
> class could not be found in 'DefaultComplexType' strategy."
>
>
> function wsdlAction(){
>           $autodiscover = new
> Zend_Soap_AutoDiscover('Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex');
>         $autodiscover->setClass('MyClass');
>         $autodiscover->handle();
> }
>
>
>
> class MyComplexTypeB{
>     /**
>      * @var string
>      */
>     public $FirstName;
>     /**
>      * @var string
>      */
>     public $LastName;
> }
>
>
> class MyComplexTypeA{
>     /**
>      * @var MyComplexTypeB[]
>      */
>     public $Answers=array();
> }
>
>
> class MyClass{
>     /**
>     * @param MyComplexTypeA
>     * @return MyComplexTypeB[]
>     */
>     function testRequest($request){}
> }
>
> It appears to be ignoring the Strategy that I set, when dealing with
> properties of complex types.
>
> Thanks

-- 
Benjamin Eberlei
http://www.beberlei.de

Reply via email to