Question

I'm trying to construct a SOAP service with Spyne that has method addUsers, which takes a single argument (users - exactly one instance) provided in such structure:

<users>
  <user>
    <name>Jake</name>
    <age>123</age>
  </user>
  <user>
    ...
  </user>
  ...
</users>

I have the user specified like so:

class user(ComplexModel):
  name = String()
  age = Integer()

But how would I go about adding the users-wrapper? And what would the arguments to @rpc() decorator look like?

Was it helpful?

Solution

Did you try Array(User) ? It didn't work?

@rpc(Array(User))
def get_users(ctx, users):
    # (...)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top