2008年8月6日星期三

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

Hi Dieter,

 

No, it doesn’t have such possibility now.

 

Type info is retrieved from a docblock now. There is no appropriate tag to specify if class property is required.

Still think about API for such possibility…

 

With best regards,

   Alexander Veremyev.

 


From: Dieter Devlieghere [mailto:dieter.devlieghere@extendit.be]
Sent: Tuesday, August 05, 2008 4:18 PM
To: fw-webservices@lists.zend.com
Subject: [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

没有评论: