ZF-4713: Use Strategy pattern to switch between different AutoDiscover Handling Mechanisms


WSDL Generation has many twists between different frameworks and languages. Allowing a strategy pattern to handle the programmers preferences in which way a WSDL file should be auto-generated would be a great addition to flexibility of this component. It would allow to handle complex types based on the currently set strategy.

Refactoring could be done in a non BC way with implementing the current AutoDiscover mechanism as default mechanism and add additional strategies that can overwrite the default behaviour via a setter method, setDiscoverStrategy().

Then specific strategies that support complex types in Java Frameworks and .NET out of the box could be added.


Fixing the issues with additional Array and ComplexType support should be handled within this refactoring of Zend_Soap that adds different autodiscoviering strategies.

Refactoring of Zend_Soap_Wsdl completed.

  • It now has a setComplexTypeStrategy() function that takes any class that implements Zend_Soap_Wsdl_Strategy_Interface.
  • The Constructor of Zend_Soap_Wsdl changed its meaning in parameter 3. Before it was boolean $extractComplexTypes. Boolean support is still supported, but you can additionaly give a string class name or an instance of a Zend_Soap_Wsdl_Strategy_Interface class.

Further strategies that implement ArrayOf functionality will be added to close the depandend issues.

Changing issues in preparation for the 1.7.0 release.