Hi,
I'm having an issue creating a client from a WSDL file.
The wsdl I'm trying to use is at
http://api5.silverpop.com/SoapApi?wsdl
I'm using suds0.4 and python2.5.2 (though I've also tried it in 2.6
and encountered the same issue).
Here's some code that generates the issue in the python repl:
from suds.client import Client
client =
Client("http://api5.silverpop.com/SoapApi?wsdl")
This generates the following exception information:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/paddy/imp/lib/python2.5/site-packages/suds/client.py",
line 112, in __init__
self.wsdl = reader.open(url)
File "/home/paddy/imp/lib/python2.5/site-packages/suds/reader.py",
line 152, in open
d = self.fn(url, self.options)
File "/home/paddy/imp/lib/python2.5/site-packages/suds/wsdl.py",
line 158, in __init__
self.resolve()
File "/home/paddy/imp/lib/python2.5/site-packages/suds/wsdl.py",
line 207, in resolve
c.resolve(self)
File "/home/paddy/imp/lib/python2.5/site-packages/suds/wsdl.py",
line 491, in resolve
qref = qualify(op.input, self.root, definitions.tns)
File "/home/paddy/imp/lib/python2.5/site-packages/suds/xsd/__init__.py",
line 56, in qualify
raise Exception('prefix (%s) not resolved' % p)
Exception: prefix (sil) not resolved
I've tried debugging it a bit using the information on the website,
but I'm not familiar enough with the WSDL spec to understand what
should be happening.
I can see that the part of the wsdl that brings about the exception is:
<wsdl:operation name="ForwardToFriend">
<wsdl:input message="sil:ForwardToFriendRequest"
xmlns:sil="SilverpopApi:Engageservice"/>
<wsdl:output message="sil:ForwardToFriendResponse"
xmlns:sil="SilverpopApi:Engageservice"/>
</wsdl:operation>
It's unable to resolve the prefix "sil". But isn't it specified right
in the attribute of the same tag?
(xmlns:sil="SilverpopApi:Engageservice")
Is there anything I ought to be doing to fix this issue?
Regards,
Paddy