I'm trying to build a SOAP server for an existing SOAP client. I have a simple function working fine that just returns a string. Now I'm building a more complex function and I get no SOAP response sent, when I watch traffic with Wireshark.
Here is my function:
def getMetadata(id, index, count):
print "id =", id
response = {'index': 0,
'count': 1,
'total': 1}
return response
And my function registration:
dispatcher.register_function('getMetadata', getMetadata,
returns={'getMetadataResult': {'index': int, 'count': int, 'total': int}},
args={'id': str, 'index': int, 'count': int})
I think I have a problem matching up my "returns" in register_function with the response I've built in getMetadata.
For reference, here's the expected SOAP response I'm trying to build:
<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>