subdee / yii2-soap-server

A SOAP server for Yii 2 based on the implementation of Yii 1 framework.
20 stars 28 forks source link

maxOccurs generates wrong wsdl when set on array's #16

Closed zbrag closed 7 years ago

zbrag commented 8 years ago

At least, that is what I found when I tried to load the wsdl into SoapUI,

Example:

class Test{
 /**
     * @var Example[] {nillable = 0, minOccurs=1, maxOccurs = unbounded}
     * @soap
     */
    public $examples= [];
}

It renders:

<xsd:complexType name="Test">
        <xsd:all>
          <xsd:element minOccurs="1" maxOccurs="unbounded" nillable="false" name="examples" type="tns:ExampleArray"/>
        </xsd:all>
      </xsd:complexType>
      <xsd:complexType name="ExampleArray">
        <xsd:complexContent>
          <xsd:restriction base="soap-enc:Array">
            <xsd:attribute ref="soap-enc:arrayType" wsdl:arrayType="tns:Example[]"/>
          </xsd:restriction>
        </xsd:complexContent>
      </xsd:complexType>
      <xsd:complexType name="Example">
        <xsd:all>

I think the correct xml should contain the minOccurs, MaxOccurs line on the generated ExampleArray?