[Fedora-suds-list] Error: suds.TypeNotFound: Type not found: '(schema, http://www.w3.org/2001/XMLSchema, )'

Jeff Ortel jortel at redhat.com
Fri Sep 10 14:00:52 UTC 2010


Hey Rob,

You're on the right track.  The problem is that the schema references a type defined in 
the schema namespace="http://www.w3.org/2001/XMLSchema" but does not import it.  This is a 
fairly common mistake made by the wsdl writer.

This will fix it:

from suds.xsd.doctor import ImportDoctor, Import

url = 'http://ws.tramtracker.com.au/pidsservice/pids.asmx?WSDL'
imp = Import('http://www.w3.org/2001/XMLSchema')    # the schema to import.
imp.filter.add('http://microsoft.com/wsdl/types/')  # the schema to import into.
d = ImportDoctor(imp)
client = Client(url, doctor=d)

If using suds <= 0.3.9
You may need to clear the suds cache.  On linux: 'rm -f /tmp/suds/*'

Or,

client = Client(url, doctor=d, cache=None)

Hope this helps,

Jeff


On 09/09/2010 11:24 PM, Rob D wrote:
> Hey guys, I've been trying to get suds working but am currently getting
> this error:
>
>     from suds.client import Client
>     url='http://ws.tramtracker.com.au/pidsservice/pids.asmx?WSDL'
>     client = Client(url)
>
>     robzy at cookiemonster:/mnt/storage/YarraTrams$ python test.py
>     Traceback (most recent call last):
>     File "test.py", line 22, in <module>
>     client = Client(url)
>     File "build/bdist.linux-i686/egg/suds/client.py", line 112, in __init__
>     File "build/bdist.linux-i686/egg/suds/reader.py", line 152, in open
>     File "build/bdist.linux-i686/egg/suds/wsdl.py", line 159, in __init__
>     File "build/bdist.linux-i686/egg/suds/wsdl.py", line 220, in
>     build_schema
>     File "build/bdist.linux-i686/egg/suds/xsd/schema.py", line 95, in load
>     File "build/bdist.linux-i686/egg/suds/xsd/schema.py", line 323, in
>     dereference
>     File "build/bdist.linux-i686/egg/suds/xsd/sxbasic.py", line 422, in
>     dependencies
>     suds.TypeNotFound: Type not found: '(schema,
>     http://www.w3.org/2001/XMLSchema, )'
>     robzy at cookiemonster:/mnt/storage/YarraTrams$
>
> Unfortunately I don't really know enough about XML to properly diagnose
> the problem, but my Googling suggests that the Doctor(?) object would be
> the way to fix it. Unfortunately, I have failed in finding documentation
> that is sufficient given my small amount of understanding. Would anyone
> have any suggestions?
>
> For reference, the WSDL can be seen at http://pastebin.com/K0PVD0DK
>
> Thanks,
> Rob.
>
>
>
> _______________________________________________
> suds mailing list
> suds at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/suds

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5126 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.fedoraproject.org/pipermail/suds/attachments/20100910/5d77cb4f/attachment.bin 


More information about the suds mailing list