[Fedora-suds-list] preserving space?

Brodie Thiesfield brofield+suds at gmail.com
Tue Dec 22 12:02:54 UTC 2009


Hi all,

New to suds and I'm seeing some strange behaviour with whitespace only contents.

I have an element being returned from the soap server that consists of
just a single space.
 <text> </text>

The WSDL defines this as:
     <element name="text" type="xsd:string" minOccurs="0"
maxOccurs="1" nillable="true"/>

In the debug log I can see that the space has been returned by the
server, although I don't understand any of the rest of the log (is
there a way to log only the messages?)

When accessing this element though, it has the value of None. i.e.
this code appends 'None' to the string:
        if part.text == None:
            txn += "<None>";
        else:
            txn += part.text

Surely this is not expected behaviour? Is there some setting that I am
missing to prevent this? Is there a way to make it return the space?

Regards,
Brodie

Note: Using suds 0.3.8 GA on Windows with python 2.6.4




More information about the suds mailing list