ZF-9180: Zend Soap Autodiscovery doesn't generate enumerations and minOccurs or maxOccurs

Issue Type: Improvement Created: 2010-02-15T04:17:09.000+0000 Last Updated: 2011-11-10T14:57:05.000+0000 Status: In Progress Fix version(s): Reporter: Polaert Alain (apolaert) Assignee: Jeannie BOFFEL (jboffel) Tags: - Zend_Soap_Wsdl

  • Zend_Soap

Related issues: - ZF-10755



Original request : {quote} This lib utilizes the PHP docblocks provided by the developer to determine the parameter and return types. We could also add enumerations or minOccurs and maxOccurs. It could be like this :

<pre class="highlight">
* @var string maxOccurs=1 minOccurs=1 enumerate={'toto','titi','tutu'}


New possible design:

<pre class="highlight">
 * @xsd simpleType
 * @xsd restriction array('base' => 'xsd:string')
class allowedWordsType
     * @xsd enumeration array('value' => 'toto')
     * @xsd enumeration array('value' => 'titi')
     * @xsd enumeration array('value' => 'tutu')
    public $enumeration;


* @var allowedWordsType array('maxOccurs'=>1, 'minOccurs'=>1)


Posted by Benjamin Eberlei (beberlei) on 2010-02-18T10:45:14.000+0000

For this we would need a real parser for docblocks, i don't think this is a good idea or a viable task anytime soon.

The generated WSDL files are not meant to be perfect, in many cases you can use them as a first template and then optimize it for your needs.

Posted by Levi Stanley (niterain) on 2010-03-11T11:32:55.000+0000

If the generated WSDL isn't meant to be perfect, why have it at all. It becomes a half ass solution that doesn't help you when you need it; tools that don't help you aren't tools at all.

Posted by Jeannie BOFFEL (jboffel) on 2010-11-17T05:23:44.000+0000

Hi, I agree that, with the given example, parsing with docblocks could be a pain with current support. But I thought about another design with more simple docblocks and using model of support of complexType to adapt also to simpleType.

I sent my proposal here : Zend_Soap_Wsdl_Strategy_DefaultComplexType - Improvement for the AutoDiscover

It's not breaking existing code and use tag @xsd for any XSD details to generate them in style part of the WSDL document.

I think, this feature is really needed for any professional webservice, it is often requested to describe with details the return format and give a XSD to validate soap request and response.

It could replace the current component Zend_Soap_Wsdl_Strategy_DefaultComplexType.

For test it is also possible to use it with setComplexTypeStrategy of Zend_Soap_AutoDiscover.

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.