コード例 #1
0
ファイル: rpc.py プロジェクト: abierbaum/twisted-suds
 def envelope(self, header, body):
     env = Binding.envelope(self, header, body)
     env.addPrefix(encns[0], encns[1])
     env_ns = self.wsdl.options.envns
     env.set('%s:encodingStyle' % env_ns[0],
             'http://schemas.xmlsoap.org/soap/encoding/')
     return env
コード例 #2
0
ファイル: rpc.py プロジェクト: tefra/txsuds
 def envelope(self, header, body):
     env = Binding.envelope(self, header, body)
     env.addPrefix(encns[0], encns[1])
     env_ns = self.wsdl.options.envns
     env.set('%s:encodingStyle' % env_ns[0],
             'http://schemas.xmlsoap.org/soap/encoding/')
     return env
コード例 #3
0
ファイル: document.py プロジェクト: BhallaLab/moose-package
    def mkparam(self, method, pdef, object):
        """
        Expand list parameters into individual parameters each with the type
        information. This is because in document arrays are simply
        multi-occurrence elements.

        """
        if isinstance(object, (list, tuple)):
            tags = []
            for item in object:
                tags.append(self.mkparam(method, pdef, item))
            return tags
        return Binding.mkparam(self, method, pdef, object)
コード例 #4
0
ファイル: document.py プロジェクト: BhallaLab/moose-gui
    def mkparam(self, method, pdef, object):
        """
        Expand list parameters into individual parameters each with the type
        information. This is because in document arrays are simply
        multi-occurrence elements.

        """
        if isinstance(object, (list, tuple)):
            tags = []
            for item in object:
                tags.append(self.mkparam(method, pdef, item))
            return tags
        return Binding.mkparam(self, method, pdef, object)
コード例 #5
0
ファイル: document.py プロジェクト: abierbaum/twisted-suds
 def mkparam(self, method, pdef, object):
     #
     # Expand list parameters into individual parameters
     # each with the type information.  This is because in document
     # arrays are simply unbounded elements.
     #
     if isinstance(object, (list, tuple)):
         tags = []
         for item in object:
             tags.append(self.mkparam(method, pdef, item))
         return tags
     else:
         return Binding.mkparam(self, method, pdef, object)
コード例 #6
0
 def mkparam(self, method, pdef, object):
     #
     # Expand list parameters into individual parameters
     # each with the type information.  This is because in document
     # arrays are simply unbounded elements.
     #
     if isinstance(object, (list, tuple)):
         tags = []
         for item in object:
             tags.append(self.mkparam(method, pdef, item))
         return tags
     else:
         return Binding.mkparam(self, method, pdef, object)
コード例 #7
0
 def envelope(self, header, body):
     """
     Build the B{<Envelope/>} for an soap outbound message.
     @param header: The soap message B{header}.
     @type header: L{Element}
     @param body: The soap message B{body}.
     @type body: L{Element}
     @return: The soap envelope containing the body and header.
     @rtype: L{Element}
     """
     env = Binding.envelope(self, header, body)
     env.addPrefix(encns[0], encns[1])
     env.set('%s:encodingStyle' % envns[0], 
             'http://schemas.xmlsoap.org/soap/encoding/')
     return env
コード例 #8
0
    def mkparam(self, method, pdef, object):
        #
        # Expand list parameters into individual parameters
        # each with the type information.  This is because in document
        # arrays are simply multi-occurrence elements.
        #
        if object == None:
            # No value has been set for this parameter. If it is optional we
            # can ignore it. Otherwise we raise an exception.
            if not pdef[1].optional():
                raise Exception('Error calling %s: '
                                'required parameter "%s" not set.' %
                                (method[0], pdef[0]))
            return

        if isinstance(object, (list, tuple)):
            tags = []
            for item in object:
                tags.append(self.mkparam(method, pdef, item))
            return tags
        else:
            return Binding.mkparam(self, method, pdef, object)
コード例 #9
0
ファイル: document.py プロジェクト: emergence/suds-philpem
    def mkparam(self, method, pdef, object):
        #
        # Expand list parameters into individual parameters
        # each with the type information.  This is because in document
        # arrays are simply multi-occurrence elements.
        #
        if object == None:
            # No value has been set for this parameter. If it is optional we
            # can ignore it. Otherwise we raise an exception.
            if not pdef[1].optional():
                raise Exception('Error calling %s: '
                        'required parameter "%s" not set.' % (method[0], pdef[0])
                        )
            return

        if isinstance(object, (list, tuple)):
            tags = []
            for item in object:
                tags.append(self.mkparam(method, pdef, item))
            return tags
        else:
            return Binding.mkparam(self, method, pdef, object)