I am trying to pass a list (or array, collection) of strings from python to a WCF service endpoint
The WCF interface:
[OperationContract]
string[] TestList(IEnumerable<string> vals);
Binding in Web.config:
<endpoint address="http://localhost:13952/Service/Endpoint.svc" binding="basicHttpBinding" contract="Service.IEndpoint">
Python code calling the service:
from suds.client import Client
url = 'http://localhost:13952/Service/Endpoint.svc?wsdl'
client = Client(url)
result = client.service.TestList(('a', 'b', 'c'))
Resulting error:
suds.WebFault: Server raised fault: 'The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:vals. The InnerException message was 'Error in line 1 position 310. Expecting state 'Element'.. Encountered 'Text' with name '', namespace ''. '. Please see InnerException for more details.'
I will try to catch the packets using WireShark and try to debug from there. Hoping someone knows a simple solution for this.
Thanks.