views:

107

answers:

1

I have to write soaplib method, that has many arguments. The idea is that the user should able able to choose, which arguments he wants to provide. Is that even possible?

I know it is possible in python generally, but there is an error, when i try to set it up like normal python method with default arguments.

A: 

Create complex type

class Parameters(ClassSerializer):
    class types:
        param1 = primitive.String
        param2 = primitive.String
        param3 = primitive.String

...

@soapmethod(Parameters, _returns=primitive.String, _outVariableName='return')
def soSomething(self, parameters):
    if parameters.param1 and parameters.param1 != "": # or something like this
       # ...
    elif ...
zdmytriv