我不熟悉Python和suds。使用SOAP UI,对我的服务的调用如下所示:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="<URL to service>"
xmlns:ns1="<URL to second namespace>">
<soapenv:Header/>
<soapenv:Body>
<ns:AuthenticateCaller>
<!--Optional:-->
<ns:request>
<ns1:LoanAccountNumber>292206816</ns1:LoanAccountNumber>
</ns:request>
</ns:AuthenticateCaller>
</soapenv:Body>
</soapenv:Envelope>
我用肥皂水尝试了以下几种方法:
^{pr2}$生成的XML如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:ns0="<URL to service>"
xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/
envelope/">
<SOAP-ENV:Header/>
<ns1:Body>
<ns0:AuthenticateCaller/>
</ns1:Body>
</SOAP-ENV:Envelope>
调用中缺少LoanAccountNumber参数,该参数是API的键。它还缺少第二个命名空间,我认为ImportDoctor应该修复它。在
我的问题是,我遗漏了什么,LoanAccountNumber没有包含在对API的调用中。在
以下说明似乎对您有帮助:
首先,您必须在代码中打印
Client
瞬间,即client
,因此您可以看到如下内容:然后找到合适的参数类型,并按以下方式创建参数:
^{pr2}$(复杂类型遵循复杂方式!)在
现在,可以按如下方式调用方法:
好好享受吧!在
相关问题 更多 >
编程相关推荐