Boolean return values not working correctly

Bug #884431 reported by Thomas S. McCullagh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ladon
Fix Committed
High
jsgaarde

Bug Description

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?

Revision history for this message
jsgaarde (jakob-simon-gaarde) wrote :

Hi Thomas.

Problem fixed by lower-casing False/True values in SOAP responses.

Best Regards
Jakob Simon-Gaarde

Changed in ladon:
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → jsgaarde (jakob-simon-gaarde)
Revision history for this message
Thomas S. McCullagh (tsmac2003) wrote :

I applied your patch to the 0.6.3 version I am running, and it fixed the problem. Thank you!

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.