spyne - How to create a type that contains multiple namespaces -
i'm trying receive , generate messages can have following schema:
<ns1:data> <ns1:status-change/> <ns2:rpc-call/> </ns1:data> i have:
class ns1complexmodel(complexmodel): __namespace__ = 'ns1' class ns1data(ns1complexmodel): statuschange = ns1statuschange rpccall = ns2rpccall class ns1statuschange(ns1complexmodel): ... but outcome of has namespace of ns1 , not ns2.
i've been looking through resolve_namespace() , friends , think see what's causing can't work out how fix or work around it.
i think same problem i'm having, , solved defining
class ns2rpccall(ns2complexmodel): class attributes(ns2complexmodel.attributes): sub_ns = ns1complexmodel.__namespace__ this looking @ spyne.protocol.xml.xmldocument._get_members_etree , spyne.model.complex._gen_attrs.