soap (document-literal) Interface fails with complexType or lists arguments
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| ladon |
Undecided
|
Unassigned |
Bug Description
Hi,
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://
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 "http://
It seems to work.
Could someone look over it and perhaps patch the bug? Thanks!
Best regards
Michael
Related branches
André (andre-miras) wrote : | #2 |
Hi,
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(
def function(self, input):
return input
WSDL : Arrayofstr not right
<element name="functionR
<complexType>
<sequence>
<element xmlns:q1="http://
</sequence>
</complexType>
</element>
If we define the Class Example
class strfloat(
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
Michael
Well the suds client was also failing with the following trace: localhost: 8000/Calculator /soap/descripti on') ladon_venv/ lib/python2. 7/site- packages/ suds/client. py", line 119, in __init__ on(self. wsdl, s) ladon_venv/ lib/python2. 7/site- packages/ suds/servicedef inition. py", line 58, in __init__ paramtypes( ) ladon_venv/ lib/python2. 7/site- packages/ suds/servicedef inition. py", line 137, in paramtypes ladon_venv/ lib/python2. 7/site- packages/ suds/xsd/ sxbasic. py", line 63, in resolve tempuri. org/, )'
Traceback (most recent call last):
File "./client1.py", line 12, in <module>
client = Client('http://
File "/tmp/trash/
sd = ServiceDefiniti
File "/tmp/trash/
self.
File "/tmp/trash/
item = (pd[1], pd[1].resolve())
File "/tmp/trash/
raise TypeNotFound(qref)
suds.TypeNotFound: Type not found: '(ArrayOfstr, http://
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.
Thanks,
Andre