<div>Hello,<br></div><div><br></div><div>I'm trying to write a client for the Virtuozzo Containers 4 SOAP API. The xml API is working for me, but I'm considering a rewirte. The SOAP API or at least the WSDL files are quiet heavy.</div>
<div><br></div><div>The main file is:</div><div><br></div><div><a href="http://www.swsoft.com/webservices/vzl/4.0.0/VZL.wsdl">http://www.swsoft.com/webservices/vzl/4.0.0/VZL.wsdl</a></div><div><br></div><div>You cannot use this file however. I'm parsing it to get the 'sublevel' WSDL files, like </div>
<div><br></div><div><a href="http://www.swsoft.com/webservices/vzl/4.0.0/VZLauthm.wsdl">http://www.swsoft.com/webservices/vzl/4.0.0/VZLauthm.wsdl</a></div><div><br></div><div>After creating the client object I use set_options(location=""), because a wild guess led me to believe that this way I can set the URL:port to query. Usually the URL to send requests to would be listed in the WSDL file. But here it's not.</div>
<div>After using set_options however print client look's just the same, but running client.service reports a different error. First it's:</div><div><br></div><div>Traceback (most recent call last):<br> File "<stdin>", line 1, in <module><br>
File "build/bdist.linux-x86_64/egg/suds/client.py", line 539, in __call__<br> File "build/bdist.linux-x86_64/egg/suds/client.py", line 598, in invoke<br> File "build/bdist.linux-x86_64/egg/suds/client.py", line 623, in send<br>
File "build/bdist.linux-x86_64/egg/suds/transport/https.py", line 64, in send<br> File "build/bdist.linux-x86_64/egg/suds/transport/http.py", line 77, in send<br> File "build/bdist.linux-x86_64/egg/suds/transport/http.py", line 118, in u2open<br>
File "/usr/lib/python2.6/urllib2.py", line 389, in open<br> response = self._open(req, data)<br> File "/usr/lib/python2.6/urllib2.py", line 407, in _open<br> '_open', req)<br> File "/usr/lib/python2.6/urllib2.py", line 367, in _call_chain<br>
result = func(*args)<br> File "/usr/lib/python2.6/urllib2.py", line 1154, in https_open<br> return self.do_open(httplib.HTTPSConnection, req)<br> File "/usr/lib/python2.6/urllib2.py", line 1121, in do_open<br>
raise URLError(err)<br>urllib2.URLError: <urlopen error [Errno 111] Connection refused><br></div><div><br></div><div>The second is:</div><div><br></div><div>Traceback (most recent call last):<br> File "<stdin>", line 1, in <module><br>
File "build/bdist.linux-x86_64/egg/suds/client.py", line 539, in __call__<br> File "build/bdist.linux-x86_64/egg/suds/client.py", line 598, in invoke<br> File "build/bdist.linux-x86_64/egg/suds/client.py", line 633, in send<br>
File "build/bdist.linux-x86_64/egg/suds/client.py", line 684, in failed<br> File "build/bdist.linux-x86_64/egg/suds/bindings/binding.py", line 238, in get_fault<br>suds.WebFault: Server raised fault: 'Version mismatch'<br>
</div><div><br></div><div>Following the second traceback upward it looks to me that I didn't even send a call. Looking through the source code it look's as though the target namespace's differ.</div><div><br></div>
<div>Does anybody know under which conditions the error:</div><div><br></div><div>suds.WebFault: Server raised fault: 'Version mismatch'</div><div><br></div><div>is raised? I'm clueless were to go from here. At the moment I'm still on python's interactive shell, Version 2.6. Suds was installed from the tarball (version 0.3.9) with</div>
<div><br></div><div>python setup.py install</div><div><br></div><div>(though the traceback look's that I should rather have used build copied it ;-) )</div><div><br></div><div>Any help is much appreciated. If details are missing, please accept my apologies. Let me know and I'll send them in.</div>
<div><br></div><div>Regards,</div><div>Phil</div><div><br></div><div>P.S.:</div><div><br></div><div>The steps I do on interactive:</div><div><br></div><div>from suds.client import Client as sudsClient</div><div>client = sudsClient("<a href="http://www.swsoft.com/webservices/vzl/4.0.0/VZLauthm.wsdl">http://www.swsoft.com/webservices/vzl/4.0.0/VZLauthm.wsdl</a>")</div>
<div>client.set_options(location="https://$vz_node_ip:$vzsoap_api_port")</div><div>client.service.get_realm()</div><div><br></div><div>P.S.S.: I thought of setting faults to false, but then I get another error that seems to be related to some suds bug:</div>
<div><br></div><div>client.set_options(location="https://$vz_node_ip:$vzsoap_api_port",faults=False)</div><div><br></div><div>Traceback (most recent call last):<br> File "<stdin>", line 1, in <module><br>
File "build/bdist.linux-x86_64/egg/suds/client.py", line 535, in __call__<br> File "build/bdist.linux-x86_64/egg/suds/client.py", line 598, in invoke<br> File "build/bdist.linux-x86_64/egg/suds/client.py", line 633, in send<br>
File "build/bdist.linux-x86_64/egg/suds/client.py", line 684, in failed<br> File "build/bdist.linux-x86_64/egg/suds/bindings/binding.py", line 239, in get_fault<br>AttributeError: Fault instance has no attribute 'detail'<br>
</div>