Use spyne for create soap server. Create models and services. The request message of the sendDocument method is formed as follows. How to remove "efat" ns prefix from
variables in documentRequest.
<soap:Envelope xmlns:soap=";
xmlns:efat=";>
<soap:Header/>
<soap:Body>
<efat:documentRequest>
<!--Optional:-->
<efat:fileName>?</efat:fileName>
<!--Optional:-->
<efat:binaryData contentType="?">cid:973156330962</efat:binaryData>
<!--Optional:-->
<efat:hash>?</efat:hash>
</efat:documentRequest>
</soap:Body>
</soap:Envelope>
My model class is here:
from spyne import Unicode, ByteArray, ComplexModel, XmlAttribute, XmlData
class Base64Binary(ComplexModel):
__namespace__ = ''
__type_name__ = "base64Binary"
_type_info = [
('_value', XmlData(ByteArray)),
('contentType', XmlAttribute(
Unicode.
customize(__namespace__='')))]
class DocumentType(ComplexModel):
__namespace__ = ""
fileName= Unicode.customize(__namespace__=None)
binaryData = Base64Binary.customize(__namespace__=None)
hash = Unicode.customize(__namespace__=None)
class DocumentReturnType(ComplexModel):
__namespace__ = ""
_type_info = [
('msg', Unicode),
('hash', Unicode)
]