Complex types and arrays in response

Asked by azurit on 2011-09-24

I'm unable to get complex types working with SUDS SOAP client. I'm even unable to return an array (python list), always getting this error:
suds.TypeNotFound: Type not found: 'item'

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENC="" xmlns:SOAP-ENV="" xmlns:ns="urn:test" xmlns:xsd="" xmlns:xsi=""><SOAP-ENV:Body SOAP-ENV:encodingStyle=""><ns:testResponse><result><item>aa</item><item>ff</item></result></ns:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

Is it really supposed to work ? I failed to find any client which is working with Ladon :(

Question information

English Edit question
ladon Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
jsgaarde (jakob-simon-gaarde) said : #1

Hi Azurit.

Yes it works with suds. I would like to help, but you need to post an example. Use to post it.

Best Regards Jakob Simon-Gaarde

azurit (azurit) said : #2

I solved problem with arrays by patching Ladon (see ) but complex types are still not working - but i think it's the SUDS false, i have the same problem with rpclib + SUDS.

jsgaarde (jakob-simon-gaarde) said : #3

Hi Azurit.

I just checked to be sure I hadn't broken anything when I released version 0.6.3 - everything seems to work as it should. I'd like to draw your attention to the official examples at Ladon's homepage:

1. Unpack it on your local system.

2. run the examples server: $ python

Now you can test it with suds:
>>> from suds.client import Client
>>> cli = Client("http://localhost:8080/AlbumService/soap/description")
>>> cli.service.listAlbums('Best')

This method method returns an Array of complex type. Even nested arrays. Please see if you can get this working.

azurit (azurit) said : #5

The same problem was with arrays but i fixed it (as i stated before).

azurit (azurit) said : #6

Maybe i have some modules for processing XML installed and suds is preffering them before python build-in modules ? And everything is not working ok with Ladon's XML generation.

azurit (azurit) said : #7

or maybe my system is using broken versions of some XML libraries ? Jakob, do you have any ideas what colud be wrong ? Thank you.

jsgaarde (jakob-simon-gaarde) said : #8

Hi Azurit.

I just installed suds from trunk ( svn co ) and tested with AlbumService - it worked exactly the same way as 0.4.1-2 installed from Ubuntu's repositories. I would focus on this message:

  No handlers could be found for logger "suds.umx.typed"

Seems like some type checker is not working correctly.

Best Regards
Jakob Simon-Gaarde

azurit (azurit) said : #9

I think that message is only for python logging module. Btw, are you testing it on Windows or Linux ? Error message is talking about type 'band' (lowercase 'b') but type is called 'Band' (uppercase 'B'). Where SUDS got that 'band' type ? Maybe you cannot see this problem cos your system is case-insensitive ?

jsgaarde (jakob-simon-gaarde) said : #10

Windows is only something I use as a last resort - I'm running Ubuntu ;-)
Besides filesystem insensitivity should have nothing to do with this matter. The Type Band is based on a Python class:

class Band(LadonType):

and therefore the type name doesn't reflect on the filesystem at all.

/ Jakob

azurit (azurit) said : #11

Windows is NOT case-insensitive only on filesystem (yes, it's totally broken). Anyway, i don't have more ideas for now. rpclib, which was generating the same error combined with SUDS, was fixed after i installed newer version of it (2.4.0-beta).

jsgaarde (jakob-simon-gaarde) said : #12

ok, that's interesting. Can you maybe help me and identify what the difference is between the WSDL/SOAP generated by Ladon and rpclib respectively so I can fix the problem?


azurit (azurit) said : #13

Ok, i prepared it all :) so:
Ladon test app:
rpclib test app:
client app: (just change URL parameter at the top)

WSDL Ladon:
WSDL rpclib:

Ladon XML response:
rpclib XML response:

Ladon result:
rpclib result:

hope i didn't mess up the links :))

jsgaarde (jakob-simon-gaarde) said : #14

Thanks Azurit.

I am looking in to it now :-)

Best regards
Jakob Simon-Gaarde

azurit (azurit) said : #15

cool, i just opened a beer :D

jsgaarde (jakob-simon-gaarde) said : #16

Hi Azurit

Good news - I found the problem, it is in the WSDL generation. Thanks a bunch for all your effort.
Could you do one last thing? convert this question to a bug.
I will deliver a patch tonight when I have made proper changes - and attach it to the bug.

Best Regards
Jakob Simon-Gaarde

azurit (azurit) said : #17