Open kaedwen opened 2 years ago
I have solved it by manually flattening the structs. In your case, You may have to change the Body to be something like this (untested):
#[derive(Debug, Default, YaSerialize, YaDeserialize)]
#[yaserde(
namespace = "ns1: http://schemas.xmlsoap.org/soap/envelope/",
prefix = "ns1"
)]
struct Body {
#[yaserde(prefix = "ns2", namespace = "ns2: http://www.test.de/model/"))]
pub offset: u32,
#[yaserde(prefix = "ns2", namespace = "ns2: http://www.test.de/model/"))]
pub size: u32,
pub parameter1: String,
pub parameter2: String,
}
I have small example with namespaces and the
flatten
feature. As soon as I use aflatten
property inside a namespaced element the deserialization ends with anbad namespace
error.My struct layout follows the soap wsdl model generated with zeep-rs. The superfluous struct types are generated this way for some reason. Nevertheless the deserialize should work.
If a comment out the flattened Paging element in the
Body
struct the deserialization succeeds.