【发布时间】:2013-05-07 13:14:18
【问题描述】:
有没有办法在 Spyne 服务器上使用 elementFormDefault="unqualified" 服务器模式类型? 现在我的所有试验都以方法响应结果结束:
<senv:Envelope xmlns:tns="http://test.com/remoteService/"
xmlns:senv="http://schemas.xmlsoap.org/soap/envelope/">
<senv:Body>
<tns:testResponse>
<tns:status>ok</tns:status>
</tns:testResponse>
</senv:Body>
并生成带有“合格” elementFormDefault 的 wsdl 片段:
<xs:schema targetNamespace="http://test.com/remoteService/" elementFormDefault="qualified"></xs:schema>
如何配置方法或参数模型以获得这样的结果:
<senv:Envelope xmlns:tns="http://test.com/remoteService/"
xmlns:senv="http://schemas.xmlsoap.org/soap/envelope/">
<senv:Body>
<tns:testResponse>
<status>ok<status>
</tns:testResponse>
</senv:Body>
我的目标是生成子元素的结果:
<tns:status>ok</tns:status>
将出现没有命名空间前缀 - 像这样:
<status>ok<status>
【问题讨论】:
标签: soap python-2.7 spyne