Exemple #1
0
 def add_methods(self, service):
     """ Build method view for service """
     bindings = {
         'document/literal': Document(self),
         'rpc/literal': RPC(self),
         'rpc/encoded': Encoded(self)
     }
     for p in service.ports:
         binding = p.binding
         ptype = p.binding.type
         operations = p.binding.type.operations.values()
         for name in [op.name for op in operations]:
             m = Facade('Method')
             m.name = name
             m.location = p.location
             m.binding = Facade('binding')
             op = binding.operation(name)
             op.soap.input.policy = self.build_policy(
                 binding, op.soap.input, True)
             op.soap.output.policy = self.build_policy(
                 binding, op.soap.output, False)
             m.soap = op.soap
             key = '/'.join((op.soap.style, op.soap.input.body.use))
             m.binding.input = bindings.get(key)
             key = '/'.join((op.soap.style, op.soap.output.body.use))
             m.binding.output = bindings.get(key)
             op = ptype.operation(name)
             p.methods[name] = m
Exemple #2
0
    def add_methods(self, service):
        """ Build method view for service """
        bindings = {
            'document/literal': Document(self),
            'rpc/literal': RPC(self),
            'rpc/encoded': Encoded(self)
        }
        for p in service.ports:
            binding = p.binding
            ptype = p.binding.type
            operations = p.binding.type.operations
            for name in operations.keys():
                for operation in operations[name]:
                    m = Facade('Method')
                    m.name = name
                    m.location = p.location
                    m.binding = Facade('binding')
                    op = binding.operation(name, operation.input.name,
                                           operation.output.name)
                    m.soap = op.soap
                    key = '/'.join((op.soap.style, op.soap.input.body.use))
                    m.binding.input = bindings.get(key)
                    key = '/'.join((op.soap.style, op.soap.output.body.use))
                    m.binding.output = bindings.get(key)

                    p.methods.add(name, m)
Exemple #3
0
 def add_methods(self, service):
     """Build method view for service."""
     bindings = {
         "document/literal": Document(self),
         "rpc/literal": RPC(self),
         "rpc/encoded": Encoded(self)}
     for p in service.ports:
         binding = p.binding
         ptype = p.binding.type
         operations = p.binding.type.operations.values()
         for name in (op.name for op in operations):
             m = Facade("Method")
             m.name = name
             m.location = p.location
             m.binding = Facade("binding")
             op = binding.operation(name)
             m.soap = op.soap
             key = "/".join((op.soap.style, op.soap.input.body.use))
             m.binding.input = bindings.get(key)
             key = "/".join((op.soap.style, op.soap.output.body.use))
             m.binding.output = bindings.get(key)
             p.methods[name] = m
Exemple #4
0
 def add_methods(self, service):
     """ Build method view for service """
     bindings = {
         'document/literal' : Document(self),
         'rpc/literal' : RPC(self),
         'rpc/encoded' : Encoded(self)
     }
     for p in service.ports:
         binding = p.binding
         ptype = p.binding.type
         operations = list(p.binding.type.operations.values())
         for name in [op.name for op in operations]:
             m = Facade('Method')
             m.name = name
             m.location = p.location
             m.binding = Facade('binding')
             op = binding.operation(name)
             m.soap = op.soap
             key = '/'.join((op.soap.style, op.soap.input.body.use))
             m.binding.input = bindings.get(key)
             key = '/'.join((op.soap.style, op.soap.output.body.use))
             m.binding.output = bindings.get(key)
             op = ptype.operation(name)
             p.methods[name] = m