[Soap-Python] return String
Alessandro Ronchi
alessandro.ronchi at soasi.com
Thu Sep 9 13:02:13 CEST 2010
I have a very simple soapmethod:
http://dpaste.com/240921/
where I render a simple template.
The html result is a SafeString Unicode (I'm using pydev to check)
SafeUnicode: <li><a class='current category_tree'
id='category_tree_3'
href='/it/products/riduttori-motoriduttori-velocita-fissa/?oid=3'>Riduttori
Motoriduttori a velocità fissa </a></li>
when I return it escapes "<":
resp = ElementTree.tostring(envelope, encoding=string_encoding)
returns:
str: <SOAP-ENV:Envelope
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="http://ws.studiopleiadi.com/bonfiglioli/prodotti"><SOAP-ENV:Body><get_product_category_menuResponse><get_product_category_menuResult
xsi:type="xs:string"> <li><a class='current category_tree'
id='category_tree_3'
href='/it/products/riduttori-motoriduttori-velocita-fissa/?oid=3'>Riduttori
Motoriduttori a velocità fissa
</a></li></get_product_category_menuResult></get_product_category_menuResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
I've tried all sort of things in all combinations:
- html.decode()
- mark_safe
- smart_str()
- autoescape on, off
- safe filter
but nothing works.
I simply need to output an html string, can you help me figure out it?
thanks in advance,
--
Alessandro Ronchi
http://www.soasi.com
Hobby & Giochi
http://hobbygiochi.com
http://www.facebook.com/hobbygiochi
More information about the Soap
mailing list