lumeohq / xsd-parser-rs

A xsd/wsdl => rust code generator written in rust
Apache License 2.0
96 stars 34 forks source link

Possible version mismatch between onvif and xsd_types. #136

Closed Hondough closed 2 years ago

Hondough commented 2 years ago

HI all,

This is my first Rust project so it may not be your issue at all. I have attached my cargo.toml Cargo.toml.txt and cargo.lock Cargo.lock.txt files. I'm unable to create a Duration as required for the timeout when requesting a continuous move:

Creating a Duration:

    let timeout: xsd_types::types::duration::Duration = xsd_types::types::duration::Duration::from_str("PT30S").unwrap();

Using it in a continuous_move:

        schema::ptz::continuous_move(
            ptz,
            &schema::ptz::ContinuousMove {
                profile_token,
                velocity,
                timeout: Some(timeout),
            }
        )
        .await
        .unwrap();

This is the error I received:

mismatched types

expected struct xsd_types::types::duration::Duration, found struct xsd_types::types::Duration

note: perhaps two different versions of crate xsd_types are being used?rustc(E0308) ptz_actor.rs(389, 35): expected struct xsd_types::types::duration::Duration, found struct xsd_types::types::Duration

let timeout: xsd_types::types::duration::Duration = xsd_types::types::duration::Duration::from_str(" ").unwrap();

Unfortunately some of our cameras are not responding within the default timeout so I'm looking to increase the timeout. Thank you for providing this library.

-John

Hondough commented 2 years ago

switched my cargo.toml to git = "https://github.com/lumeohq/xsd-parser-rs", rev = "7f3d433" from git = "https://github.com/lumeohq/xsd-parser-rs"