tel8618217223380 / prado3

Automatically exported from code.google.com/p/prado3
Other
0 stars 0 forks source link

wsdl support for additional attributes of a custom type's property #473

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Prado's wsdl generator lacks the possibility to specify that a custom type's 
property is nillable.
Attached patch is an implementation that allows to define additional attributes 
of a property (nillable, minOccurs, maxOccurs).

The code is taken from Yii's implementation and changed to be compatible with 
Prado.

Here's from Yii's documentation 
(http://www.yiiframework.com/doc/api/1.1/CWsdlGenerator/):

the following is an example declaring a class with remote accessible 
properties: 

class Foo {
    / **
      * @var string name of foo {nillable=1, minOccurs=0, maxOccurs=2}
      * @soap
      * /
    public $name;
    / **
      * @var Member[] members of foo
      * @soap
      * /
    public $members;
}

Optionally, extra attributes (nillable, minOccurs, maxOccurs) can be defined 
for each property by enclosing definitions into curly brackets and separated by 
comma like so:

{[attribute1 = value1][, attribute2 = value2], ...}

where the attribute can be one of following:

    nillable = [0|1|true|false]
    minOccurs = n; where n>=0
    maxOccurs = n; where [n>=0|unbounded]

Original issue reported on code.google.com by piotrows...@gmail.com on 19 Aug 2013 at 4:14

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Prado's usage differs from Yii's, because in Prado the property's name begins 
with "$". So above example should read:

class Foo {
    / **
      * @var string $name {nillable=1, minOccurs=0, maxOccurs=2}
      * @soap
      * /
    public $name;
    / **
      * @var Member[] $members
      * @soap
      * /
    public $members;
}

Original comment by piotrows...@gmail.com on 19 Aug 2013 at 4:24

GoogleCodeExporter commented 9 years ago
Committed as r3314, thank you.

Original comment by ctrlal...@gmail.com on 20 Aug 2013 at 10:01