既存の SOAP クライアント用の SOAP サーバーを構築しようとしています。文字列を返すだけの単純な関数が正常に機能しています。現在、より複雑な関数を作成していますが、Wireshark でトラフィックを監視すると、SOAP 応答が送信されません。
これが私の機能です:
def getMetadata(id, index, count):
print "id =", id
response = {'index': 0,
'count': 1,
'total': 1}
return response
そして私の機能登録:
dispatcher.register_function('getMetadata', getMetadata,
returns={'getMetadataResult': {'index': int, 'count': int, 'total': int}},
args={'id': str, 'index': int, 'count': int})
register_function の「戻り値」と getMetadata で作成した応答を一致させるのに問題があると思います。
参考までに、私が構築しようとしている予想される SOAP 応答を次に示します。
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<getMetadataResponse xmlns="<removed>">
<getMetadataResult>
<index>0</index>
<count>3</count>
<total>3</total>
</getMetadataResult>
</getMetadataResponse>
</soap:Body>
</soap:Envelope>