-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple namespace for diffrent services #492
Comments
Please follow up with the WSDL output you're after |
Currently in spyne you can't do this. You could solve this problem by defining multiple endpoints, so each application has it's own namespace: from wsgiref.simple_server import make_server
from spyne import Application
from spyne.protocol.soap.soap11 import Soap11
from spyne.util.wsgi_wrapper import WsgiMounter
cow_application = Application(
[CowService],
tns='spyne.namespace.cow',
name='cow',
in_protocol=Soap11(validator='lxml'),
out_protocol=Soap11()
)
chicken_application = Application(
[ChickenService],
tns='spyne.namespace.chicken',
name='chicken',
in_protocol=Soap11(validator='lxml'),
out_protocol=Soap11()
)
wsgi_mounter = WsgiMounter({
'cow': cow_application,
'chicken': chicken_application,
})
server = make_server('0.0.0.0', 8000, wsgi_mounter)
server.serve_forever() |
How do I remove the namespace of parameters in an application? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: