2008年8月5日星期二

[fw-webservices] Zend_Soap_Autodiscover: how to generate minOccurs and maxOccurs in WSDL

Hi,

 

I’m trying to generate a WSDL with Zend_Soap_Autodiscover.

 

Does anyone know if it’s possible to make it generate minOccurs and maxOccurs attributes in a self-defined complex type?

 

I have a class that defines a complex type:

/**

 * Authentication object: username and password

 *

 */

class FilterScript_Authentication {

      /**

       * Username

       *

       * @var string

       */

      public $username;

      /**

       * Password

       *

       * @var string

       */

      public $password;

}

 

This is what Zend_Soap_Autodiscover generates:

<xsd:complexType name="FilterScript_Authentication">

<xsd:all>

<xsd:element name="username" type="xsd:string"/>

<xsd:element name="password" type="xsd:string"/>

</xsd:all>

</xsd:complexType>

 

And I would like it to generate this:

<xsd:complexType name="FilterScript_Authentication">

<xsd:all>

<xsd:element minOccurs="1" maxOccurs="1" name="username" type="xsd:string"/>

<xsd:element minOccurs="1" maxOccurs="1" name="password" type="xsd:string"/>

</xsd:all>

</xsd:complexType>

 

 

Greets,

Dieter Devlieghere

没有评论: