onvif-rs icon indicating copy to clipboard operation
onvif-rs copied to clipboard

SubscriptionPolicyType has no fields

Open nrbnlulu opened this issue 1 year ago • 4 comments
trafficstars

Hi thanks for the lib. is there a reason this is an empty struct? https://github.com/lumeohq/onvif-rs/blob/aeedff9d4b96aa88213a7e62da89dfce01e77602/wsdl_rs/event/src/lib.rs#L98

Is it because of the ##any here? https://github.com/lumeohq/onvif-rs/blob/aeedff9d4b96aa88213a7e62da89dfce01e77602/wsdl/event.wsdl.xml#L95

nrbnlulu avatar Mar 18 '24 16:03 nrbnlulu

Would it be possible to use some dynamic type for any fields by default?

nrbnlulu avatar Mar 18 '24 21:03 nrbnlulu

So you'd be looking for a HashMap type of thing that contains all that data?

SamuelYvon avatar Mar 19 '24 14:03 SamuelYvon

Actually I would use something like raw xml elements since we might want to serialze any field(s). With hashmap that would be hard to implement.

nrbnlulu avatar Mar 19 '24 21:03 nrbnlulu

Is it because of the ##any here?

As I remember, xs:any is not supported at all in code generator: https://github.com/lumeohq/xsd-parser-rs?tab=readme-ov-file#any-elements-handling

And not very clear, which type would the Rust field be so that yaserde could set it when parsing XML.

DmitrySamoylov avatar Mar 21 '24 17:03 DmitrySamoylov