Example #1
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 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)
Example #2
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 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)
Example #3
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)
Example #4
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)
Example #5
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)
Example #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 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)