class MyTestMethodRequest(ComplexModel):
__namespace__ = MY_NAMESPACE
MyString = Unicode
class HelloWorldService(ServiceBase):
@rpc(Unicode, _returns=MyTestMethodRequest)
def say_hello(ctx, name):
for i in range(times):
return MyMethodResponse(name=name)
app = Application([HelloWorldService], tns='spyne.examples.hello',
in_protocol=HttpRpc(validator='soft'),
out_protocol=JsonDocument()
)
application = WsgiApplication(app)
<VirtualHost *:80>
ServerName get
WSGIDaemonProcess pybsk processes=1 threads=5
WSGIScriptAlias /Get /var/www/python/pymain.py
WSGICallableObject 'application'
LogLevel info
DocumentRoot /var/www/python
<Directory /var/www/python>
WSGIProcessGroup get
WSGIApplicationGroup %{GLOBAL}
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
</Directory>
<IfDefine MOD_WSGI_LOAD_PYTHON_DYLIB>
LoadFile ''
</IfDefine>
WSGIMapHEADToGET Auto
</VirtualHost>