Hi, I know that you are sick of answering this question but really I couldn't figure out how can I import the location I followed the TipsAndTricks page
*from suds.client import Client*
from suds.xsd.sxbasic import Import ns = 'http://schemas.xmlsoap.org/soap/encoding/' location = 'http://schemas.xmlsoap.org/soap/encoding/' Import.bind(ns, location)
ns = 'http://www.w3.org/2001/XMLSchema'
location='http://www.w3.org/2001/XMLSchema.xsd'
Import.bind(ns, location)
client = Client(url)
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/suds-0.4.1-py2.7.egg/suds/client.py", line 119, in __init__ sd = ServiceDefinition(self.wsdl, s) File "/usr/local/lib/python2.7/dist-packages/suds-0.4.1-py2.7.egg/suds/servicedefinition.py", line 57, in __init__ self.addports() File "/usr/local/lib/python2.7/dist-packages/suds-0.4.1-py2.7.egg/suds/servicedefinition.py", line 85, in addports method = (m.name, binding.param_defs(m)) File "/usr/local/lib/python2.7/dist-packages/suds-0.4.1-py2.7.egg/suds/bindings/rpc.py", line 39, in param_defs return self.bodypart_types(method) File "/usr/local/lib/python2.7/dist-packages/suds-0.4.1-py2.7.egg/suds/bindings/binding.py", line 441, in bodypart_types raise TypeNotFound(query.ref) suds.TypeNotFound: Type not found: '(array, http://www.w3.org/2001/XMLSchema, )'
you can find the wsdl here https://gist.github.com/1552902
thanks,
Hi, there's no such type as "array" in the XMLSchema.xsd, nor anywhere near any standard -- IMHO no ImportDoctors will fix this in a standards-compliant way. Have you seen a working client implementation? The RPC/Encoded style is not even supported by all client libraries, an example is Apache CXF:
$ apache-cxf-2.5.0/bin/wsdl2java -frontend jaxws21 gistfile1.xml WSDLToJava Error: Rpc/encoded wsdls are not supported with CXF
I found the source of the service you're trying to access at http://www.asterisk2billing.org/cgi-bin/trac.cgi/browser/trunk and the actual service seems to be implemented at /common/lib/Class.SOAP-function.php which doesn't specify the actual types used as elements of the arrays -- this causes the WSDL generated to be almost useless. The actual arrays returned are filled with rows retrieved from the database, which could lead to non-deterministic structures, such as the one seen at Get_Log_Refill using SELECT *, so adding a new column the table would cause the structure of the SOAP response to change.
Regards, András Veres-Szentkirályi
2012. január 3. kedd 01:59:44 dátummal Milad Rastian ezt írta:
Hi, I know that you are sick of answering this question but really I couldn't figure out how can I import the location I followed the TipsAndTricks page
*from suds.client import Client*
from suds.xsd.sxbasic import Import ns = 'http://schemas.xmlsoap.org/soap/encoding/' location = 'http://schemas.xmlsoap.org/soap/encoding/' Import.bind(ns, location)
ns = 'http://www.w3.org/2001/XMLSchema'
location='http://www.w3.org/2001/XMLSchema.xsd'
Import.bind(ns, location)
client = Client(url)
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/suds-0.4.1-py2.7.egg/suds/client.p y", line 119, in __init__ sd = ServiceDefinition(self.wsdl, s) File "/usr/local/lib/python2.7/dist-packages/suds-0.4.1-py2.7.egg/suds/serviced efinition.py", line 57, in __init__ self.addports() File "/usr/local/lib/python2.7/dist-packages/suds-0.4.1-py2.7.egg/suds/serviced efinition.py", line 85, in addports method = (m.name, binding.param_defs(m)) File "/usr/local/lib/python2.7/dist-packages/suds-0.4.1-py2.7.egg/suds/bindings /rpc.py", line 39, in param_defs return self.bodypart_types(method) File "/usr/local/lib/python2.7/dist-packages/suds-0.4.1-py2.7.egg/suds/bindings /binding.py", line 441, in bodypart_types raise TypeNotFound(query.ref) suds.TypeNotFound: Type not found: '(array, http://www.w3.org/2001/XMLSchema, )'
you can find the wsdl here https://gist.github.com/1552902
thanks,