Hi,
I am trying to call the service GetRecordings(...) defined in the
attached wsdl, like so:
---
#!/bin/python
from suds.client import Client
from suds import *
logger('suds.serviceproxy').setLevel(logging.DEBUG)
client = Client('http://localhost:2048/services/Recording.asmx?WSDL',
faults=False, proxy={'http':'localhost:8888'})
print client.service.GetRecordings('FilterBySong', 'None', 1, 10,
'2')
---
The call works, and the following xml is returned:
---
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetRecordingsResponse
xmlns="http://tempuri.org/">
<GetRecordingsResult>
<status>Success</status>
<result>
<recordings count="4" total="4"
xmlns="">
<recording id="317879" Votes="0"
comments="0"
soundId="2">
<p1name><![CDATA[rob1]]></p1name>
<p2name><![CDATA[rob2]]></p2name>
<voice1Url>v1url</voice1Url>
<voice2Url>v2url</voice2Url>
</recording>
<recording id="317878" Votes="0"
comments="0"
soundId="2">
<p1name><![CDATA[cam1]]></p1name>
<p2name><![CDATA[cam2]]></p2name>
<voice1Url>v1url</voice1Url>
<voice2Url>v2url</voice2Url>
</recording>
<recording id="317877" Votes="0"
comments="0"
soundId="2">
<p1name><![CDATA[rob1]]></p1name>
<p2name><![CDATA[cam1]]></p2name>
<voice1Url>v1url</voice1Url>
<voice2Url>v2url</voice2Url>
</recording>
<recording id="317876" Votes="0"
comments="0"
soundId="2">
<p1name><![CDATA[Cam]]></p1name>
<p2name><![CDATA[Rob]]></p2name>
<voice1Url>Cams voice</voice1Url>
<voice2Url>Robs voice</voice2Url>
</recording>
</recordings>
</result>
</GetRecordingsResult>
</GetRecordingsResponse>
</soap:Body>
</soap:Envelope>
---
... but the unmarshaller is throwing an exception when trying to
process the recordings element of the returned document:
---
2008-06-11 09:41:58,250 {2796} (resolver.py, 167) [ERROR] (recordings) not-found
Traceback (most recent call last):
File "./test_driver.py", line 15, in <module>
print client.service.GetRecordings('FilterBySong', 'None', 1, 10,
'2')
File "build/bdist.cygwin-1.5.25-i686/egg/suds/client.py", line 145,
in __call__
File "build/bdist.cygwin-1.5.25-i686/egg/suds/client.py", line 258, in send
File "build/bdist.cygwin-1.5.25-i686/egg/suds/client.py", line 305,
in succeeded
File "build/bdist.cygwin-1.5.25-i686/egg/suds/bindings/binding.py",
line 86, in get_reply
File "build/bdist.cygwin-1.5.25-i686/egg/suds/bindings/binding.py",
line 111, in unmarshal
File "build/bdist.cygwin-1.5.25-i686/egg/suds/bindings/unmarshaller.py",
line 73, in process
File "build/bdist.cygwin-1.5.25-i686/egg/suds/bindings/unmarshaller.py",
line 91, in __process
File "build/bdist.cygwin-1.5.25-i686/egg/suds/bindings/unmarshaller.py",
line 122, in import_children
File "build/bdist.cygwin-1.5.25-i686/egg/suds/bindings/unmarshaller.py",
line 91, in __process
File "build/bdist.cygwin-1.5.25-i686/egg/suds/bindings/unmarshaller.py",
line 122, in import_children
File "build/bdist.cygwin-1.5.25-i686/egg/suds/bindings/unmarshaller.py",
line 89, in __process
File "build/bdist.cygwin-1.5.25-i686/egg/suds/bindings/unmarshaller.py",
line 275, in start
suds.TypeNotFound: WSDL type: recordings not-found
---
The "recordings" element is not specified in the WSDL - the Result
field of a ServiceResponse is intended to be arbitrarly formatted xml
- is there any way that Suds can handle this?
Cheers,
Cameron
ps. the service is internal, so I am unable to provide a test url, sorry!