[spyne] Controlling namespace declaration

Joseph L. Casale jcasale at activenetwerx.com
Tue Jun 3 15:55:35 UTC 2014


> Yes but I also tried a couple of things and couldn't find a way to trick
> lxml to add a redundant xmlns declaration. I can't think of any other
> way to make this work.
>
> For the record, it's possible to set the bogus attribute on
> ctx.out_document in a method_return_document event and performing the
> replace operation on ctx.out_string in a method_return_string event.
>
> http://spyne.io/docs/2.10/reference/service.html#spyne.service.ServiceBase
> http://spyne.io/docs/2.10/reference/application.html#spyne.application.Application

I ended up utilizing this for the time being and it appears to work. I set a pseudo attr
in the model then renamed it after. However for the sake of clarity, how does one for
example set a global namespace in the Application instance and expose services whose
request and response objects begin a new ns?

This would facilitate lxml's non duplicating behavior...

Thanks,
jlc


More information about the people mailing list