Error running spyne example on Windows

I tried running a spyne example. This same example works on Linux but on Windows gives following error- File "helloWorld.py", line 14, in <module> class HelloWorldService(ServiceBase): File "helloWorld.py", line 15, in HelloWorldService @srpc(Unicode, Integer, _returns=Iterable(Unicode))NameError: name 'srpc' is not definedDoes anyone have a solution??...Read more

Spyne. Set Array fixed number items

I create the model in spyne with array attribute and I need to fix number items in array.i.e. my model looks like:class MyModel(ComplexModel):__namespace__ = 'myns'string_field = String(**{'min_occurs': 1, 'max_occurs': 1, 'nillable': False})array_field = Array(Integer(**{'max_occurs': 16, 'min_occurs': 16, 'nillable': False}), **{'min_occurs': 1, 'max_occurs': 1, 'nillable': False})So, it mean I need to objects with string attribute and array with 16 integer items, but this code direct to xml like:<myns:MyModel> <!...Read more

spyne many-to-many version of server_sqlalchemy

I modified the server_sqlalchemy example to enable multi table as follows permissions = Array(Permission).store_as(table(multi=True)) and added methods get_permission, put_permission and get_all_permission similar to get_user, put_user and get_all_user.On the client side I am using suds client as follows:from suds.client import Clientc = Client('http://localhost:8000/?wsdl')#create two permissionsp = c.factory.create('Permission')p.application = 'usermgr'p.operation = 'modify'p.id = c.service.put_permission(p)q = c.factory.create('Permission')q...Read more

spyne - How to create a type that contains multiple namespaces

I'm trying to receive and generate messages that can have the following schema:<ns1:data> <ns1:status-change/> <ns2:rpc-call/></ns1:data>I then have:class NS1ComplexModel(ComplexModel): __namespace__ = 'ns1'class NS1Data(NS1ComplexModel): statusChange = NS1StatusChange rpcCall = NS2RPCCallclass NS1StatusChange(NS1ComplexModel): ...But the outcome of this is that has the namespace of ns1 and not ns2.I've been looking through resolve_namespace() and friends and I think I see what's causing it but I can't wor...Read more