arskom/rpclib — Issue #111: Problem with Array
Author: SunWukong
Created: 2011-10-31 17:26:41+00:00
State: open

Here's a ComplexType class :

class User(ComplexModel):
__namespace__ = 'rpclib.examples.user_manager'

user_id = Integer
user_name = String
first_name = String
last_name = String
email = String
permissions = String
another = String
again = String
more = String
littlemore = String

I want to pass in an Array of such a type to a web service method, like this :

class UserManagerService(ServiceBase):
@rpc(Array(User), _returns=Integer)
def get_number(ctx, users):
return len(users)

When I invoke the method, passing one User, the method returns the number of User attributes instead of the number of element in the Array

This bug is probably related to #105