Quantcast
Channel: Serbian Tech » davideagle
Viewing all articles
Browse latest Browse all 2

Python Suds module uses wrong namespace

$
0
0

Using Suds 0.38 web service client I encountered a bug in the way it handles namespaces, so I decided to upgrade Suds to version 0.40 but it seemed that the same bug was still persistent in the latest version of Suds and turning on debugging in Suds resulted in the following error

Setting logging to debug mode:

import logging
logging.getLogger('suds.client').setLevel(logging.DEBUG)

 

Suds Error:

org.jibx.runtime.JiBXException:
Expected "{http://.../1/types}ChunkRequest" start tag,
found "{http://.../1/params/query}ChunkRequest"

 

Doing some googleing I found out that this indeed was a bug in the  Suds 0.38 module that hadn’t been fixed in the 0.40 version either and a manual patch had been proposed for the suds/xsd/sxbase.py file.

sxbase.py before:

ns = self.schema.tns
if ns[0] is None:
ns = (prefix, ns[1])
return ns

 

sxbase.py after:

if self.ref is not None:
return (prefix, self.ref[1])
ns = self.schema.tns
if ns[0] is None:
ns = (prefix, ns[1])
return ns


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images