我收到一个错误,该元素不是预期的。在
Expected is {http://com.blablabla.fbs.webservice.receiver/webservice}Sms_1 ).
我不明白这是什么,又是另一天我在努力解决它。在
请给我一些提示或建议,可以引导我解决这个问题。在
发送的XML
^{pr2}$错误信息
senv:Client.SchemaValidationError<string>:3:0:ERROR:SCHEMASV:SCHEMAV_ELEMENT_CONTENT: Element 'Sms_1': This element is not expected. Expected is ( {http://com.blablabla.fbs.webservice.receiver/webservice}Sms_1 ).
代码:
class sms(ComplexModel):
_type_info = {
"text": Unicode,
'from': Unicode,
"id": Long,
"operator": Unicode,
"to": Unicode,
"numberOfParts": Integer,
}
class ReceiverService(ServiceBase):
@srpc(Array(sms), _returns=Unicode)
def ReceiveSms(Sms_1):
for data in Sms_1:
test = data.get_deserialization_instance()
print test.operator
return Sms_1
application = Application([ReceiverService],
tns='http://com.blablabla.fbs.webservice.receiver/webservice',
name="ReceiverService",
in_protocol=Soap11(validator="lxml"),
out_protocol=Soap11()
)
hello_app = csrf_exempt(DjangoApplication(application))
您的请求文件错误。你失踪了
Sms_1
标记中的命名空间前缀。以下是正确的对象声明:
这里有一个固定的请求文档:
^{pr2}$相关问题 更多 >
编程相关推荐