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

jathan. jathan at gmail.com
Fri Apr 16 14:47:13 UTC 2010


I have seen a similar issue before where the WSDL URL http, and the
service URL is https (or vice versa).  By forcing both to the same
(http or https) it rectifies the issue.  I have not dug deep enough to
know definitely whether this is a bug with suds or an implementation
problem in the servers.

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

        <service name="authm">
                <port name="authmSoap" binding="y:authmBinding" >
                        <soap:address location="https://localhost:4646"/>
                </port>
        </service>

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)

Did you sanitize this for the list or is that really what it says?  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.

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.
-


More information about the suds mailing list