[Soap-Python] Suds: XML encoding issue?

Michael Wood esiotrot at gmail.com
Mon May 21 18:57:15 CEST 2012


Hi

Am I doing something wrong or is there a bug in suds wrt. XML encoding?

If I do something like this (against a service implemented with soaplib):

from suds.client import Client
client = Client("http://localhost/blah/?wsdl")
client.service.Method("x & y")

I seem to get "x & y" on the server side, instead of "x & y".

If I call client.service.Method("x & y") I also get "x & y" on the server.

If I double encode the string before giving it to suds like this:

client.service.Method("x & y") then I get "x & y" on the server.

So it seems that suds is encoding raw ampersands, but leaving "&"
unencoded in the SOAP message body.  The server then decodes them
unconditionally as it should.

I've tried with 0.4.1 Beta (from SVN) and 0.4 GA.

Wireshark shows the same body whether I send "x & y" or "x & y".

Is the above expected?  Is it a bug?

Thanks.

-- 
Michael Wood <esiotrot at gmail.com>


More information about the Soap mailing list