[Major Edit based on experience since 1st post two days ago.]
I am building a Python SOAP/XML script using Suds, but am struggling to get the code to generate SOAP/X
The Suds factory method generates a regular Python object with regular python attributes that map to the WSDL type definition.
You can use the 'del' builtin function to remove attributes.
>>> order_details = c.factory.create('ns2:OrderDetails')
>>> order_details
(OrderDetails){
Amount = None
CurrencyCode = None
OrderChannelType =
(OrderChannelType){
value = None
}
OrderDeliveryType =
(OrderDeliveryType){
value = None
}
OrderLines =
(ArrayOfOrderLine){
OrderLine[] =
}
OrderNo = None
TotalOrderValue = None
}
>>> del order_details.OrderLines
>>> del order_details.OrderDeliveryType
>>> del order_details.OrderChannelType
>>> order_details
(OrderDetails){
Amount = None
CurrencyCode = None
OrderNo = None
TotalOrderValue = None
}