python suds - Insert raw xml node into factory-created object
In python suds, how do I insert a Raw XML node into an object created via the factory.create method, while still maintaining attributes? Is there some _child field I could use? Basically, how do I use an s:any child with Raw()?
What I need to send:
<web:Script Format="raw">
<raw_xml_node foo="bar">stuff</raw_xml_node>
</web:Script>
I create the Script object with:
>>> scr = client.factory.create('Script')
>>> scr._Format = "raw"
>>> print scr
(Script){
_Format = "raw"
}
Relevant WSDL:
<s:complexT开发者_JAVA百科ype name="Script">
<s:sequence>
<s:any/>
</s:sequence>
<s:attribute name="Format">
<s:simpleType>
<s:restriction base="s:string">
<s:enumeration value="xhtml"/>
<s:enumeration value="raw"/>
</s:restriction>
</s:simpleType>
</s:attribute>
</s:complexType>
精彩评论