Soap 属性_的名称自定义
我正在玩的Soap 属性_的名称自定义,soap,python-2.7,spyne,Soap,Python 2.7,Spyne,我正在玩的属性_和Spyne2.10(很高兴它出局了)。让我们考虑以下模型: class Product(ComplexModel): id = complex.XmlAttribute(primitive.Uuid) edition = primitive.Unicode edition_id = complex.XmlAttribute(primitive.Uuid, attribute_of='edition') 结果如下: <product id="000
属性_和Spyne2.10(很高兴它出局了)。让我们考虑以下模型:
class Product(ComplexModel):
id = complex.XmlAttribute(primitive.Uuid)
edition = primitive.Unicode
edition_id = complex.XmlAttribute(primitive.Uuid, attribute_of='edition')
结果如下:
<product id="00000000-0000-0000-0000-000000000000">
<edition edition_id="00000000-0000-0000-0000-000000000000">My edition</edition>
</product>
我的版本
如何自定义edition\u id
等结果的名称?从2.10开始,Spyne不支持此功能
我想不出一个简单的解决方法,因为它需要编写方法调用和方法返回文档事件以及wsdl事件来手动修补wsdl
但是,如果你能为它编写测试,我会看看我能为2.11做些什么。嗨,请看一下,并告诉我你的想法。