Boolean return values not working correctly

Asked by Thomas S. McCullagh

I create a simple ladon web service that presents a class with a function that returns a bool value. The class and function are below:
=============================
from ladon.ladonizer import ladonize

class Test(object):

    @ladonize(rtype=bool)
    def Test(self):
        return False
=============================
When connecting to the above using suds, the return value is None, rather than the expected False.

When connecting from a C# client, I get an InvalidOperationException when I attempt to call the method. This exception description is "There is an error in XmlDocument (1, 422)". The inner exception is a System.FormatException, and its description is: "The string 'True' is not a valid Boolean value".

I am running on an Ubuntu 10.04 LTS system which runs python 2.6.5, and am using the version of ladon fetched using easy_install (0.6.3)

I have added logging to the above, and confirmed that the web service is actually being called, and I have verified that it interprets inbound parameters such as Boolean values correctly. The problem seems to be in the encoding outbound. What can I do to fix this?

Question information

Language:
English Edit question
Status:
Solved
For:
ladon Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
jsgaarde (jakob-simon-gaarde) said :
#1

Hi Thomas.

It looks like a bug, can I ask you to convert this question to a bug? maybe even add an example of an incorrect and a correct SOAP reponse. Du this and I will have a patch ready in no time :-)

Best Regards
Jakob Simon-Gaarde.

Revision history for this message
jsgaarde (jakob-simon-gaarde) said :
#2

Fix commited in the bug linked to this question.

/ Jakob Simon-Gaarde