On 26.04.2012 19:37, [email protected] wrote:
Now, what_I_  want to do is create a server-side method (lets call it 
"make_user"), that will create an instance of User with a random data, and 
return it to the caller. (I know how to generate the random data, that's not the issue.)

So far, I think I need to add a method to UserManagerService that would look 
something like this:
     @rpc(_returns=User)
     def make_user(ctx):
         return User(user_id=5, user_name="hey", permissions=["one", "two"])

Hi Ken,

If I did not misunderstand your question, that's what you're looking for:

    @rpc(_returns=User)
    def make_user(ctx):
        return User(first_name="a", last_name="B", id=5,
permissions=[Permission(application="app", operation="op")])

ComplexModel children are just like regular python objects. You can e.g. instantiate them.

Does it help?

Best,
Burak

_______________________________________________
Soap mailing list
[email protected]
http://mail.python.org/mailman/listinfo/soap

Reply via email to