python - Spyne回归肥皂
问题描述
我在 python 和 django 中使用 spyne ......
我试图达到这样的响应:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header />
<SOAP-ENV:Body>
<ns5:xxx
xmlns:ns3="http://entsal.bean.domain.common.proveedorcentro.meyss.spee.es" xmlns:ns4="http://salida.bean.domain.common.proveedorcentro.meyss.spee.es" xmlns:ns5="http://impl.ws.application.proveedorcentro.meyss.spee.es">
<ns4:a>
<d>0</d>
<ns3:f>
<e>
<r>20</r>
<y>8000000855</y>
</e>
</ns3:f>
</ns4:a>
</ns5:xxx>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
但我得到:
<soap11env:Envelope xmlns:soap11env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://impl.ws.application.proveedorcentro.meyss.spee.es" xmlns:s0="backend.soap_sepe.spyne" xmlns:s3="http://entsal.bean.domain.common.proveedorcentro.meyss.spee.es">
<soap11env:Body>
<tns:xxx>
<s3:a>
<s3:f>
<s0:r>0</s0:r>
<s0:y>0</s0:y>
</s3:f>
</s3:a>
</tns:xxx>
</soap11env:Body>
</soap11env:Envelope>
我正在使用soap11,我不知道是否可以将soap11env 更改为SOAP-ENV,并去掉子元素上的前缀?
class f(ComplexModel):
__type_name__ = 'f'
__mixin__ = True
r = Integer
y = Integer
class a(ComplexModel):
__type_name__ = 'a'
__namespace__ = "http://entsal.bean.domain.common.proveedorcentro.meyss.spee.es"
f = f
class xxx(a):
__type_name__ = 'xxx'
__mixin__ = True
a = a
application = Application([IProveedorCentroTFWS],
tns='http://impl.ws.application.proveedorcentro.meyss.spee.es',
in_protocol=Soap11(),
out_protocol=Soap11(
validator='lxml', cleanup_namespaces=True),
)
@ rpc(ComplexModel.MyRequest, _returns=ComplexModel.xxx, _body_style='bare')
def actionname(ctx, req):
我已经尝试了所有,我不知道如何达到最高响应,有人可以帮助我吗?
提前致谢
解决方案
推荐阅读
- php - 如何根据她的 slug 获得模型名称?
- python - 如何访问数组?
- arrays - 由于 json 转换导致的数组比较问题
- reactjs - 打字稿RefForwardingComponent不起作用
- django - 我想创建一个 url,将链接指向我在 django 中的视图中的登录功能 我尝试了一切,但没有成功
- php - 使用 memcache 和 php 7 进行会话故障转移
- javascript - 为什么 asm.js 比普通 js 慢(生成素数)?如何加快速度?
- javascript - Vis js - 避免边缘重叠
- python - 如何在十六进制 Linux 终端中发送参数
- c++ - 从不同线程推送到队列时出现分段错误