2

I'm using a web service but the following error prevents me from getting it to work:

Traceback (most recent call last):
File "C:\Users\Marnik\Documents\GitHub\prjct\CompareSiteCrawler\src\Crawlers\Belboon.py", line 9, in <module>
client = suds.client.Client(url,plugins=[ImportDoctor(imp)])
File "C:\Python27\Lib\site-packages\python-suds-0.4\suds\client.py", line 119, in __init__
sd = ServiceDefinition(self.wsdl, s)
File "C:\Python27\Lib\site-packages\python-suds-0.4\suds\servicedefinition.py", line 57, in __init__
self.addports()
File "C:\Python27\Lib\site-packages\python-suds-0.4\suds\servicedefinition.py", line 85, in    addports
method = (m.name, binding.param_defs(m))
File "C:\Python27\Lib\site-packages\python-suds-0.4\suds\bindings\rpc.py", line 39, in param_defs
return self.bodypart_types(method)
File "C:\Python27\Lib\site-packages\python-suds-0.4\suds\bindings\binding.py", line 441, in   bodypart_types
raise TypeNotFound(query.ref)
suds.TypeNotFound: Type not found: '(, http://www.w3.org/2001/XMLSchema, )'

Now I've searched for solutions and almost all of the found solutions is the following, or one very similar:

imp = Import('http://schemas.xmlsoap.org/soap/encoding/', location='http://schemas.xmlsoap.org/soap/encoding/')
imp.filter.add('http://ws.client.com/Members.asmx')
client = Client(url,plugins=[ImportDoctor(imp)]

This doesn't work for me though, even after replacing the part after the imp.filter.add with the targetNameSpace of the WSDL file. I'm not very familiar with WSDL but I spitted trough the xml file and encountered the following:

<definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:SmartFeedServices" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns="http://schemas.xmlsoap.org/wsdl/" name="SmartFeedServices" targetNamespace="urn:SmartFeedServices">
    <types xmlns="http://schemas.xmlsoap.org/wsdl/"/>
    <!--  Messages  -->
    <!--  Input parameters for method login  -->

Looking at other WSDL files I noticed two things: The targetNameSpace at this particular XML file is not an url, where all other WSDL files I looked at had an url as targetNameSpace.

Second, The type element is empty. Other WSDL files have other elements here instead, like the targetNameSpace.

Could one of the two (or both) be the problem?

NorthCat
  • 9,643
  • 16
  • 47
  • 50
SergioP
  • 241
  • 2
  • 4
  • 14

0 Answers0