1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 """
18 The I{soaparray} module provides XSD extensions for handling
19 soap (section 5) encoded arrays.
20 """
21
22 from suds import *
23 from logging import getLogger
24 from suds.xsd.sxbasic import Factory as SXFactory
25 from suds.xsd.sxbasic import Attribute as SXAttribute
26
27
29 """
30 Represents an XSD <attribute/> that handles special
31 attributes that are extensions for WSDLs.
32 @ivar aty: Array type information.
33 @type aty: The value of wsdl:arrayType.
34 """
35
37 """
38 @param aty: Array type information.
39 @type aty: The value of wsdl:arrayType.
40 """
41 SXAttribute.__init__(self, schema, root)
42 if aty.endswith('[]'):
43 self.aty = aty[:-2]
44 else:
45 self.aty = aty
46
51
53 d = SXAttribute.description(self)
54 d = d+('aty',)
55 return d
56
57
58
59
60
62 ns = (None, "http://schemas.xmlsoap.org/wsdl/")
63 aty = y.get('arrayType', ns=ns)
64 if aty is None:
65 return SXAttribute(x, y)
66 else:
67 return Attribute(x, y, aty)
68
69
70
71
72 SXFactory.maptag('attribute', __fn)
73