You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to host SOAP service using this example part of code:
HelloWorldService(ServiceBase):
@srpc(Unicode, Integer, _returns=Iterable(Unicode))
def say_hello(name, times):
for i in range(times):
yield 'Hello, %s' % name
application = Application([HelloWorldService],
tns='spyne.examples.hello',
in_protocol=Soap11(),
out_protocol=Soap11()
)
if __name__ == '__main__':
# You can use any Wsgi server. Here, we chose
# Python's built-in wsgi server but you're not
# supposed to use it in production.
from wsgiref.simple_server import make_server
wsgi_app = WsgiApplication(application)
server = make_server('0.0.0.0', 8000, wsgi_app)
server.serve_forever()
It's working but it uses only one namespace.
tns='spyne.examples.hello'
I'm trying to host SOAP service using this example part of code:
It's working but it uses only one namespace.
tns='spyne.examples.hello'
I can define multiple services in this line:
application = Application([HelloWorldService, OtherService1, OtherService2]
But is it possible to define diffrent namespace for each service? Something like this doesn't work:
tns=['spyne.examples.hello', 'http://other.service1', 'http://other.service2']
The text was updated successfully, but these errors were encountered: