I am new to Python and currently am doing some translations from 2.7 to 3.2 after running 2to3 tool. One of the things that it couldn't fix is importing .xsd or .wsdl files. In 2.7
stuff like import content
, where content is .xsd file in our directory seemed to work fine, but 3.2 cannot resolve this import. Does anybody know how can I do it?
Thanks!
It sounds like you're using a code generator on your
.xsd
and.wsdl
files, correct?Otherwise, I am confused what you mean when you say you cannot import a
.xsd
file; I don't think the Python import toolchain lets you do this without a new importer written specific for SOAP clients.I recently had to communicate with a SOAP service and settled on suds.
The
Client
object in suds takes in a url to a wsdl file (I had to modify the url to usefile://
in order to specify a local .wsdl file)Hope this helps! I'm not sure if suds is Python 3 compliant, and a quick search didn't yield any useful information.