0
SUDSで印刷すると、私のSOAPクライアントに関する情報は得られません。SUDSとPythonを使用してクライアントを印刷するときのサービスの空リスト
コード:
url = 'https://website.com/API/AuthenticationService.asmx'
headers = {'Content-Type': 'text/xml; charset=utf-8'}
client = Client(url, headers = headers)
print client
印刷結果:
Suds (https://fedorahosted.org/suds/) version: 0.6
私はXMLでユーザー名とパスワードを渡すことができる必要があります:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<Login xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://Iris.net">
<username>Username</username>
<password>Password</password>
</Login>
</s:Body>
</s:Envelope>
サービスまたは工場の名前空間を使用しようとすると、エラーが発生します。サービスを利用しようとして
:
response = client.service.Login(username)
エラー:
Exception: No services defined
、工場で:
login = client.factory.create('Login')
エラー:
Exception: (Login, None,), must be qref