Public bug reported:

trying to create python wrapper for 
https://secure.eloqua.com/API/1.2/service.svc?wsdl
it can retrieve that URL, but the schema includes imports for other https 
locations e.g.
<xsd:import 
schemaLocation="https://secure.eloqua.com/API/1.2/service.svc?xsd=xsd0"; 
namespace="https://secure.eloqua.com/API/1.2"/>

this falls over with 
Error loading https://secure.eloqua.com/API/1.2/service.svc?wsdl: 
        sendall
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/ZSI/generate/commands.py", line 135, in 
wsdl2py
    wsdl = load(location)
  File "/usr/lib/pymodules/python2.7/ZSI/wstools/WSDLTools.py", line 39, in 
loadFromURL
    document = DOM.loadFromURL(url)
  File "/usr/lib/pymodules/python2.7/ZSI/wstools/Utility.py", line 642, in 
loadFromURL
    file = urlopen(url)
  File "/usr/lib/pymodules/python2.7/ZSI/wstools/Utility.py", line 180, in 
urlopen
    conn.endheaders()
  File "/usr/lib/python2.7/httplib.py", line 954, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 814, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 790, in send
    self.sock.sendall(data)
AttributeError: sendall

and if I download that wsdl and try from a file I get:

Error loading eloqua.wsdl: 
        sendall
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/ZSI/generate/commands.py", line 135, in 
wsdl2py
    wsdl = load(location)
  File "/usr/lib/pymodules/python2.7/ZSI/wstools/WSDLTools.py", line 53, in 
loadFromFile
    wsdl = self.loadFromStream(file)
  File "/usr/lib/pymodules/python2.7/ZSI/wstools/WSDLTools.py", line 34, in 
loadFromStream
    wsdl.load(document)
  File "/usr/lib/pymodules/python2.7/ZSI/wstools/WSDLTools.py", line 286, in 
load
    schema = reader.loadFromNode(WSDLToolsAdapter(self), item)
  File "/usr/lib/pymodules/python2.7/ZSI/wstools/XMLSchema.py", line 102, in 
loadFromNode
    schema.load(reader)
  File "/usr/lib/pymodules/python2.7/ZSI/wstools/XMLSchema.py", line 1213, in 
load
    tp.loadSchema(schema)
  File "/usr/lib/pymodules/python2.7/ZSI/wstools/XMLSchema.py", line 1363, in 
loadSchema
    reader.loadFromURL(self.attributes.get('schemaLocation'), schema)
  File "/usr/lib/pymodules/python2.7/ZSI/wstools/XMLSchema.py", line 135, in 
loadFromURL
    reader.loadFromURL(url)
  File "/usr/lib/pymodules/python2.7/ZSI/wstools/XMLSchema.py", line 297, in 
loadFromURL
    self.__node = DOM.loadFromURL(url)
  File "/usr/lib/pymodules/python2.7/ZSI/wstools/Utility.py", line 643, in 
loadFromURL
    file = urlopen(url)
  File "/usr/lib/pymodules/python2.7/ZSI/wstools/Utility.py", line 181, in 
urlopen
    conn.endheaders()
  File "/usr/lib/python2.7/httplib.py", line 955, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 815, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 791, in send
    self.sock.sendall(data)

I managed to fix it by changing line 641 of 
/usr/lib/pymodules/python2.7/ZSI/wstools/Utility.py to
            file = urllib.urlopen(url)
which means it uses the standard urllib function rather than the one it wraps 
to add timeouts.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: python-zsi 2.1~a1-3 [modified: 
usr/share/pyshared/ZSI/wstools/Utility.py]
ProcVersionSignature: Ubuntu 3.2.0-17.27-generic 3.2.6
Uname: Linux 3.2.0-17-generic x86_64
ApportVersion: 1.93-0ubuntu2
Architecture: amd64
Date: Tue Feb 28 09:21:12 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120217)
PackageArchitecture: all
SourcePackage: zsi
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: zsi (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug precise

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/942478

Title:
  fails when connecting to https wsdl files

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zsi/+bug/942478/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to