Open FelixSchwarz opened 11 years ago
Hi,
In Spyne, interface document generation is done in two steps:
Interface
object on instantiation.The Wsdl 1.1 document is generated by spyne.interface.wsdl.Wsdl11
class. The ServerBase
class stores interface documents in self.doc
and the Wsdl 1.1 document in self.doc.wsdl11
.
It's not possible to pass options to InterfaceDocument
children but it's possible to override options once instantiated. E.g.:
wsgi_app = WsgiApplication(...)
wsgi_app.doc.wsdl11.element_form_default = 'unqualified`
This is currently the canonical way of doing it. It'd work because Wsdl11 documents are generated on first request, when there's a URL at hand to put inside the document. See: http://stackoverflow.com/questions/16658888/override-wsdl-port-i-e-bound-url-in-spyne
So if you could send a patch that makes the above work (with tests), i'd be happy to merge it.
I couldn't decide on a way of passing parameters to interface documents on transport instantiation. Any ideas? The best I have in mind right now is:
wsgi_app = WsgiApplication(app, wsdl11=Wsdl11(element_form_default='unqualified'))
Hello guys! I just found this RPC-framework and really like it, because I can write one service and easily provide many protocols to it. But I can't change number of provided methods for particular IP, right?
please use http://lists.spyne.io/listinfo/people for questions
Hello, how can I add elementFormDefault = "unqualified" attribute to wsdl schema?
I found that I'm unable to reimplement a given WSDL using spyne because even after building the required classes by hand spyne has some defaults hard-coded which don't match my WSDL. I think ultimately we need a way to hook into the WSDL/schema generation from the outside.
A simple example is
elementFormDefault
inXmlSchema.get_schema_node()
(spyne.interface.xml_schema._base
). My WSDL must set this tounqualified
.The main problem seems to be how you are using the event manager. I found it highly confusing that there are multiple EventManager instances and I think as a first step the API should be changed so that there is only a single event manager instance.
I could provide patches but I need some hints about architectural style of such a callback/extension/plugin system.