<div>Hello,<br></div><div><br></div><div>I&#39;m trying to write a client for the Virtuozzo Containers 4 SOAP API. The xml API is working for me, but I&#39;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&#39;m parsing it to get the &#39;sublevel&#39; 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=&quot;&quot;), 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&#39;s not.</div>
<div>After using set_options however print client look&#39;s just the same, but running client.service reports a different error. First it&#39;s:</div><div><br></div><div>Traceback (most recent call last):<br>  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>
  File &quot;build/bdist.linux-x86_64/egg/suds/client.py&quot;, line 539, in __call__<br>  File &quot;build/bdist.linux-x86_64/egg/suds/client.py&quot;, line 598, in invoke<br>  File &quot;build/bdist.linux-x86_64/egg/suds/client.py&quot;, line 623, in send<br>
  File &quot;build/bdist.linux-x86_64/egg/suds/transport/https.py&quot;, line 64, in send<br>  File &quot;build/bdist.linux-x86_64/egg/suds/transport/http.py&quot;, line 77, in send<br>  File &quot;build/bdist.linux-x86_64/egg/suds/transport/http.py&quot;, line 118, in u2open<br>
  File &quot;/usr/lib/python2.6/urllib2.py&quot;, line 389, in open<br>    response = self._open(req, data)<br>  File &quot;/usr/lib/python2.6/urllib2.py&quot;, line 407, in _open<br>    &#39;_open&#39;, req)<br>  File &quot;/usr/lib/python2.6/urllib2.py&quot;, line 367, in _call_chain<br>
    result = func(*args)<br>  File &quot;/usr/lib/python2.6/urllib2.py&quot;, line 1154, in https_open<br>    return self.do_open(httplib.HTTPSConnection, req)<br>  File &quot;/usr/lib/python2.6/urllib2.py&quot;, line 1121, in do_open<br>
    raise URLError(err)<br>urllib2.URLError: &lt;urlopen error [Errno 111] Connection refused&gt;<br></div><div><br></div><div>The second is:</div><div><br></div><div>Traceback (most recent call last):<br>  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>
  File &quot;build/bdist.linux-x86_64/egg/suds/client.py&quot;, line 539, in __call__<br>  File &quot;build/bdist.linux-x86_64/egg/suds/client.py&quot;, line 598, in invoke<br>  File &quot;build/bdist.linux-x86_64/egg/suds/client.py&quot;, line 633, in send<br>
  File &quot;build/bdist.linux-x86_64/egg/suds/client.py&quot;, line 684, in failed<br>  File &quot;build/bdist.linux-x86_64/egg/suds/bindings/binding.py&quot;, line 238, in get_fault<br>suds.WebFault: Server raised fault: &#39;Version mismatch&#39;<br>
</div><div><br></div><div>Following the second traceback upward it looks to me that I didn&#39;t even send a call. Looking through the source code it look&#39;s as though the target namespace&#39;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: &#39;Version mismatch&#39;</div><div><br></div><div>is raised? I&#39;m clueless were to go from here. At the moment I&#39;m still on python&#39;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&#39;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&#39;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(&quot;<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>&quot;)</div>
<div>client.set_options(location=&quot;https://$vz_node_ip:$vzsoap_api_port&quot;)</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=&quot;https://$vz_node_ip:$vzsoap_api_port&quot;,faults=False)</div><div><br></div><div>Traceback (most recent call last):<br>  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>
  File &quot;build/bdist.linux-x86_64/egg/suds/client.py&quot;, line 535, in __call__<br>  File &quot;build/bdist.linux-x86_64/egg/suds/client.py&quot;, line 598, in invoke<br>  File &quot;build/bdist.linux-x86_64/egg/suds/client.py&quot;, line 633, in send<br>
  File &quot;build/bdist.linux-x86_64/egg/suds/client.py&quot;, line 684, in failed<br>  File &quot;build/bdist.linux-x86_64/egg/suds/bindings/binding.py&quot;, line 239, in get_fault<br>AttributeError: Fault instance has no attribute &#39;detail&#39;<br>
</div>