set (wrapped|bare) flag on messages
(self)
| 248 | p.methods[name] = m |
| 249 | |
| 250 | def set_wrapped(self): |
| 251 | """ set (wrapped|bare) flag on messages """ |
| 252 | for b in self.bindings.values(): |
| 253 | for op in b.operations.values(): |
| 254 | for body in (op.soap.input.body, op.soap.output.body): |
| 255 | body.wrapped = False |
| 256 | if len(body.parts) != 1: |
| 257 | continue |
| 258 | for p in body.parts: |
| 259 | if p.element is None: |
| 260 | continue |
| 261 | query = ElementQuery(p.element) |
| 262 | pt = query.execute(self.schema) |
| 263 | if pt is None: |
| 264 | raise TypeNotFound(query.ref) |
| 265 | resolved = pt.resolve() |
| 266 | if resolved.builtin(): |
| 267 | continue |
| 268 | body.wrapped = True |
| 269 | |
| 270 | def __getstate__(self): |
| 271 | nopickle = ('options',) |
no test coverage detected