[Fedora-suds-list] WebFault 'Version Mismatch'

Philipp Kalder pkalder at googlemail.com
Fri Apr 16 19:32:40 UTC 2010


Hey,

thanks so far for your reply.

>> Based on the WSDL for
>> http://www.swsoft.com/webservices/vzl/4.0.0/VZLauthm.wsdl<http://www.swsoft.com/webservices/vzl/4.0.0/VZLauthm.wsdl>,
the default
 >> service URL is https://localhost:4646:

The service itself is a soap server that runs on the machines that run
Parallels Virtuozzo Containers 4. The WSDL files naturally don't know about
the servers hosting the Software or their ip addresses. So I have to specify
a custom location to poont the client to the machine where the soap server
runs I want to query.

>> Here is a hint that someting is amiss.  Since you've specified a
>> custom location:

>>> DEBUG:suds.client:sending to (https://remote_host_name:4646)

So I have to set the custom location with

>> client.set_options(location="https://remote_host_name:4646")

> Did you sanitize this for the list or is that really what it says?

Yes, I did. As the list is public to don't want to post the hostnames of the
machines in combination with a name of a software and a service that runs on
these machines. Please take no offense in this.

I ask because that is an indicator, because a little lower down you see:

> DEBUG:suds.transport.http:sending:
> URL:https://remote_host_name:4646

and then...

> DEBUG:suds.client:http failed:

Which tells me although you have specified an https URL, it is still
using the http transport. This confirms the issue I have seen in the
past.

Are you able to specify the service location using an http URL? If so,
test that and see if it changes your results.

I am. I did it with both being http, with the same results. The error
remains the same:

DEBUG:suds.client:sending to (http://remote_host_name:8080)
message:
<SOAP-ENV:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/authm" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<ns0:Body>
<ns1:get_realm/>
</ns0:Body>
</SOAP-ENV:Envelope>
DEBUG:suds.client:headers = {'SOAPAction': '""', 'Content-Type': 'text/xml'}
DEBUG:suds.transport.http:sending:
URL:http://remote_host_name:8080
HEADERS: {'SOAPAction': '""', 'Content-Type': 'text/xml', 'Content-type':
'text/xml', 'Soapaction': '""'}
MESSAGE:
<SOAP-ENV:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/authm" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<ns0:Body>
<ns1:get_realm/>
</ns0:Body>
</SOAP-ENV:Envelope>
ERROR:suds.client:<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/authm" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<ns0:Body>
<ns1:get_realm/>
</ns0:Body>
</SOAP-ENV:Envelope>
DEBUG:suds.client:http failed:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<soap:Fault>
<faultcode>soap:VersionMismatch</faultcode>
<faultstring>Version mismatch</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.linux-x86_64/egg/suds/client.py", line 539, in __call__
File "build/bdist.linux-x86_64/egg/suds/client.py", line 598, in invoke
File "build/bdist.linux-x86_64/egg/suds/client.py", line 633, in send
File "build/bdist.linux-x86_64/egg/suds/client.py", line 684, in failed
File "build/bdist.linux-x86_64/egg/suds/bindings/binding.py", line 238, in
get_fault
suds.WebFault: Server raised fault: 'Version mismatch'

Funny thing though, I specified the Client object with cache = None.
BTW, I found this once in a sample, just remembered it and tried it. I
cannot remember where I found this, and help('suds.clientClient') shows onlu
**kwatgs for this part in the init, but not what the args could be. Do you
know where I can find the possible args?

Anyways, with the non-ssl port I get the same error, with the ssl port I get
a different one. But that seems to be an error that's related to the server
behavior and it's answer. It's html, not xml. It seems to return a website
it would show in the broswer. That's why I get an xml error
(xml.sax._exceptions.SAXParseException: <unknown>:11:2: mismatched tag).
I'll check with the vendor. I'll get back to this after I get my replies
from them.

Thanks again.

Philipp

jathan.

On Fri, Apr 16, 2010 at 12:54 AM, Philipp Kalder <pkalder at googlemail.com>
wrote:
> Hello,
>
> anybody received this on the list? It's nigh over a month and though I see
> plenty activity on the list, nobdoy replied to this. Thing is, I never
> recevied the message myself over the list. Thought the sender might be
> excluded . . . Nevertheless I just had time to get back to suds and the
> project, so here is some additional debugging output. I hope someone can
> point me to the right direction on how to fix this.
>
> Regards,
> Philipp
>
> DEBUG:suds.client:sending to (https://remote_host_name:4646)
> message:
> <SOAP-ENV:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/authm"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
>    <SOAP-ENV:Header/>
>    <ns0:Body>
>       <ns1:get_realm/>
>    </ns0:Body>
> </SOAP-ENV:Envelope>
> DEBUG:suds.client:headers = {'SOAPAction': '""', 'Content-Type':
'text/xml'}
> DEBUG:suds.transport.http:sending:
> URL:https://remote_host_name:4646
> HEADERS: {'SOAPAction': '""', 'Content-Type': 'text/xml', 'Content-type':
> 'text/xml', 'Soapaction': '""'}
> MESSAGE:
> <SOAP-ENV:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/authm"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
>    <SOAP-ENV:Header/>
>    <ns0:Body>
>       <ns1:get_realm/>
>    </ns0:Body>
> </SOAP-ENV:Envelope>
> ERROR:suds.client:<?xml version="1.0" encoding="UTF-8"?>
> <SOAP-ENV:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/authm"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
>    <SOAP-ENV:Header/>
>    <ns0:Body>
>       <ns1:get_realm/>
>    </ns0:Body>
> </SOAP-ENV:Envelope>
> DEBUG:suds.client:http failed:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soap:Body>
> <soap:Fault>
> <faultcode>soap:VersionMismatch</faultcode>
> <faultstring>Version mismatch</faultstring>
> </soap:Fault>
> </soap:Body>
> </soap:Envelope>
> Traceback (most recent call last):
>   File "test_suds.py", line 12, in <module>
>     vzl_auth.service.get_realm()
>   File "build/bdist.linux-x86_64/egg/suds/client.py", line 539, in
__call__
>   File "build/bdist.linux-x86_64/egg/suds/client.py", line 598, in invoke
>   File "build/bdist.linux-x86_64/egg/suds/client.py", line 633, in send
>   File "build/bdist.linux-x86_64/egg/suds/client.py", line 684, in failed
>   File "build/bdist.linux-x86_64/egg/suds/bindings/binding.py", line 238,
in
> get_fault
> suds.WebFault: Server raised fault: 'Version mismatch'
>
> On Thu, Mar 18, 2010 at 6:43 PM, Philipp Kalder <pkalder at googlemail.com>
> wrote:
>>
>> Hello,
>>
>> 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.
>> The main file is:
>> http://www.swsoft.com/webservices/vzl/4.0.0/VZL.wsdl
>> You cannot use this file however. I'm parsing it to get the 'sublevel'
>> WSDL files, like
>> http://www.swsoft.com/webservices/vzl/4.0.0/VZLauthm.wsdl
>> 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.
>> After using set_options however print client look's just the same, but
>> running client.service reports a different error. First it's:
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in <module>
>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 539, in __call__
>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 598, in invoke
>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 623, in send
>> File "build/bdist.linux-x86_64/egg/suds/transport/https.py", line 64, in
>> send
>> File "build/bdist.linux-x86_64/egg/suds/transport/http.py", line 77, in
>> send
>> File "build/bdist.linux-x86_64/egg/suds/transport/http.py", line 118, in
>> u2open
>> File "/usr/lib/python2.6/urllib2.py", line 389, in open
>> response = self._open(req, data)
>> File "/usr/lib/python2.6/urllib2.py", line 407, in _open
>> '_open', req)
>> File "/usr/lib/python2.6/urllib2.py", line 367, in _call_chain
>> result = func(*args)
>> File "/usr/lib/python2.6/urllib2.py", line 1154, in https_open
>> return self.do_open(httplib.HTTPSConnection, req)
>> File "/usr/lib/python2.6/urllib2.py", line 1121, in do_open
>> raise URLError(err)
>> urllib2.URLError: <urlopen error [Errno 111] Connection refused>
>>
>> The second is:
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in <module>
>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 539, in __call__
>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 598, in invoke
>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 633, in send
>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 684, in failed
>> File "build/bdist.linux-x86_64/egg/suds/bindings/binding.py", line 238,
in
>> get_fault
>> suds.WebFault: Server raised fault: 'Version mismatch'
>>
>> 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.
>> Does anybody know under which conditions the error:
>> suds.WebFault: Server raised fault: 'Version mismatch'
>> 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
>> python setup.py install
>> (though the traceback look's that I should rather have used build copied
>> it ;-) )
>> Any help is much appreciated. If details are missing, please accept my
>> apologies. Let me know and I'll send them in.
>> Regards,
>> Phil
>> P.S.:
>> The steps I do on interactive:
>> from suds.client import Client as sudsClient
>> client =
>> sudsClient("http://www.swsoft.com/webservices/vzl/4.0.0/VZLauthm.wsdl")
>> client.set_options(location="https://$vz_node_ip:$vzsoap_api_port")
>> client.service.get_realm()
>> 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:
>>
>> client.set_options(location="https://
$vz_node_ip:$vzsoap_api_port",faults=False)
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in <module>
>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 535, in __call__
>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 598, in invoke
>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 633, in send
>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 684, in failed
>> File "build/bdist.linux-x86_64/egg/suds/bindings/binding.py", line 239,
in
>> get_fault
>> AttributeError: Fault instance has no attribute 'detail'
>
>
> _______________________________________________
> suds mailing list
> suds at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/suds
>



--
Jathan.
-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/suds/attachments/20100416/0d95fe4e/attachment-0001.html 


More information about the suds mailing list