Build method view for service
(self, service)
| 223 | return self.schema |
| 224 | |
| 225 | def add_methods(self, service): |
| 226 | """ Build method view for service """ |
| 227 | bindings = { |
| 228 | 'document/literal': Document(self), |
| 229 | 'rpc/literal': RPC(self), |
| 230 | 'rpc/encoded': Encoded(self) |
| 231 | } |
| 232 | for p in service.ports: |
| 233 | binding = p.binding |
| 234 | ptype = p.binding.type |
| 235 | operations = p.binding.type.operations.values() |
| 236 | for name in [op.name for op in operations]: |
| 237 | m = Facade('Method') |
| 238 | m.name = name |
| 239 | m.location = p.location |
| 240 | m.binding = Facade('binding') |
| 241 | op = binding.operation(name) |
| 242 | m.soap = op.soap |
| 243 | key = '/'.join((op.soap.style, op.soap.input.body.use)) |
| 244 | m.binding.input = bindings.get(key) |
| 245 | key = '/'.join((op.soap.style, op.soap.output.body.use)) |
| 246 | m.binding.output = bindings.get(key) |
| 247 | op = ptype.operation(name) |
| 248 | p.methods[name] = m |
| 249 | |
| 250 | def set_wrapped(self): |
| 251 | """ set (wrapped|bare) flag on messages """ |