MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / Definitions

Class Definitions

suds/wsdl.py:96–279  ·  view source on GitHub ↗

Represents the I{root} container of the WSDL objects as defined by @ivar id: The object id. @type id: str @ivar options: An options dictionary. @type options: L{options.Options} @ivar url: The URL used to load the object. @type url: str @ivar

Source from the content-addressed store, hash-verified

94
95
96class Definitions(WObject):
97 """
98 Represents the I{root} container of the WSDL objects as defined
99 by <wsdl:definitions/>
100 @ivar id: The object id.
101 @type id: str
102 @ivar options: An options dictionary.
103 @type options: L{options.Options}
104 @ivar url: The URL used to load the object.
105 @type url: str
106 @ivar tns: The target namespace for the WSDL.
107 @type tns: str
108 @ivar schema: The collective WSDL schema object.
109 @type schema: L{SchemaCollection}
110 @ivar children: The raw list of child objects.
111 @type children: [L{WObject},...]
112 @ivar imports: The list of L{Import} children.
113 @type imports: [L{Import},...]
114 @ivar messages: The dictionary of L{Message} children key&#x27;d by I{qname}
115 @type messages: [L{Message},...]
116 @ivar port_types: The dictionary of L{PortType} children key&#x27;d by I{qname}
117 @type port_types: [L{PortType},...]
118 @ivar bindings: The dictionary of L{Binding} children key&#x27;d by I{qname}
119 @type bindings: [L{Binding},...]
120 @ivar service: The service object.
121 @type service: L{Service}
122 """
123
124 Tag = 'definitions'
125
126 def __init__(self, url, options):
127 """
128 @param url: A URL to the WSDL.
129 @type url: str
130 @param options: An options dictionary.
131 @type options: L{options.Options}
132 """
133 log.debug('reading wsdl at: %s ...', url)
134 reader = DocumentReader(options)
135 d = reader.open(url)
136 root = d.root()
137 WObject.__init__(self, root)
138 self.id = objid(self)
139 self.options = options
140 self.url = url
141 self.tns = self.mktns(root)
142 self.types = []
143 self.schema = None
144 self.children = []
145 self.imports = []
146 self.messages = {}
147 self.port_types = {}
148 self.bindings = {}
149 self.services = []
150 self.add_children(self.root)
151 self.children.sort()
152 pmd = self.__metadata__.__print__
153 pmd.excludes.append('children')

Callers 1

loadMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected