soap (document-literal) Interface fails with complexType or lists arguments

Bug #1306028 reported by MichaelRazoum on 2014-04-10
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description


I have used the soap11 Interface and it worked fine. Unfortunately it is not compatible with C# (Bug #1096004).

I have tried using the soap (document-literal) interface, but it fails with arrays or LadonTypes. Example:

class webservice(object):
  @ladonize([str], rtype=price)
    def getIndexKeys(self, input):
        return ["a", "b", "c"]

I get the error in SoaupUI:
Source: http://localhost:8999/webservice/soap/description Error: Could not find type 'ArrayOfstr@'. Do you mean to refer to the element named ArrayOfstr@ (in description)?

Changing the input from list of strings to string works.

class webservice(object):
  @ladonize(str, rtype=price)
    def getIndexKeys(self, input):
        return ["a", "b", "c"]

Based on the error message I have replaced "" with "". (Attachment: modified file ladon\interfaces\
It seems to work.

Could someone look over it and perhaps patch the bug? Thanks!

Best regards

André (andre-miras) wrote :

Well the suds client was also failing with the following trace:
Traceback (most recent call last):
  File "./", line 12, in <module>
    client = Client('http://localhost:8000/Calculator/soap/description')
  File "/tmp/trash/ladon_venv/lib/python2.7/site-packages/suds/", line 119, in __init__
    sd = ServiceDefinition(self.wsdl, s)
  File "/tmp/trash/ladon_venv/lib/python2.7/site-packages/suds/", line 58, in __init__
  File "/tmp/trash/ladon_venv/lib/python2.7/site-packages/suds/", line 137, in paramtypes
    item = (pd[1], pd[1].resolve())
  File "/tmp/trash/ladon_venv/lib/python2.7/site-packages/suds/xsd/", line 63, in resolve
    raise TypeNotFound(qref)
suds.TypeNotFound: Type not found: '(ArrayOfstr,, )'

I've created a "ticket1306028-soap-fix-lists-args" branch with the fix you suggested (which also fixes on suds).
Like I said, I'm not a Ladon maintainer, but I hope jsgaarde will have time to merge.




the patch works fine with list of complex types. I have recently found out that if the complex type is not a list, the WSDL functionResponse is wrong. Example :

class example(LadonType):
    strings = [str]
    floats = [float]

class webservice(object):

    @ladonize([str], rtype=example)
    def function(self, input):
        return input

WSDL : Arrayofstr not right

<element name="functionResponse">
       <element xmlns:q1="" minOccurs="0" name="strings" nillable="true" type="tns:ArrayOfstr"/>

If we define the Class Example

class strfloat(LadonType):
    string = str
    float = float

class example(LadonType):
    list = [strfloat]

It works fine and the WDSL document is correct.

Could you look over it again? Thanks!

Best regards

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments