lumeohq / onvif-rs

A native Rust ONVIF client library.
MIT License
115 stars 61 forks source link

GetAudioEncoderConfigurationOptionsResponse isn't decoded #99

Closed seimonw closed 2 years ago

seimonw commented 2 years ago

Hi, I've been trying out this library with some cameras. It's been working great, but I've come across the following issue that I'm not understanding.

I'm calling schema::media::get_audio_encoder_configuration_options(), I've added a println! in the transport function to print the response xml which looks good as far as I can see but my GetAudioEncoderConfigurationOptionsResponse just looks like default

Ok(GetAudioEncoderConfigurationOptionsResponse {
  options: AudioEncoderConfigurationOptions {
    options: [AudioEncoderConfigurationOption {
      encoding: __Unknown__("No valid variants"),
      bitrate_list: IntList { items: [] },
      sample_rate_list: IntList { items: [] }
    }]
  }
})

The response xml:

<?xml version="1.0" encoding="UTF-8"?>
  <trt:GetAudioEncoderConfigurationOptionsResponse xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tt="http://www.onvif.org/ver10/schema">
    <trt:Options>
      <tt:Options>
        <tt:Encoding>AAC</tt:Encoding>
        <tt:BitrateList>
          <tt:Items>64</tt:Items>
          <tt:Items>32</tt:Items>
        </tt:BitrateList>
        <tt:SampleRateList>
          <tt:Items>16</tt:Items>
          <tt:Items>8</tt:Items>
        </tt:SampleRateList>
      </tt:Options>
      <tt:Options>
        <tt:Encoding>G711</tt:Encoding>
        <tt:BitrateList>
          <tt:Items>32</tt:Items>
        </tt:BitrateList>
        <tt:SampleRateList>
          <tt:Items>8</tt:Items>
        </tt:SampleRateList>
      </tt:Options>
      <tt:Options>
        <tt:Encoding>G726</tt:Encoding>
        <tt:BitrateList>
          <tt:Items>32</tt:Items>
        </tt:BitrateList>
        <tt:SampleRateList>
          <tt:Items>8</tt:Items>
        </tt:SampleRateList>
      </tt:Options>
    </trt:Options>
  </trt:GetAudioEncoderConfigurationOptionsResponse>

The logging output:

[2022-10-05][16:20:28][media][DEBUG] Struct GetAudioEncoderConfigurationOptionsResponse @ 0: start to parse "GetAudioEncoderConfigurationOptionsResponse"
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/media/wsdl}trt:GetAudioEncoderConfigurationOptionsResponse, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 1
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOptions @ 1: start to parse "Options"
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/media/wsdl}trt:Options, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 2
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOption @ 2: start to parse "Options"
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Options, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 3
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Enum AudioEncoding @ 3: start to parse "Encoding"
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Encoding, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(AAC), new depth 4
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Enum AudioEncoding @ 3: success
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Encoding), new depth 3
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct IntList @ 3: start to parse "BitrateList"
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:BitrateList, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Items, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(64), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Items), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Items, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(32), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Items), new depth 4
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct IntList @ 3: success
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:BitrateList), new depth 3
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct IntList @ 3: start to parse "SampleRateList"
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:SampleRateList, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Items, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(16), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Items), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Items, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(8), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Items), new depth 4
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct IntList @ 3: success
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:SampleRateList), new depth 3
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOption @ 2: success
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOptions @ 1: success
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Options), new depth 2
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOptions @ 2: start to parse "Options"
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Options, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 3
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOption @ 3: start to parse "Encoding"
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Encoding, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(G711), new depth 4
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOption @ 3: success
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Encoding), new depth 3
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:BitrateList, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Items, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(32), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Items), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:BitrateList), new depth 3
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:SampleRateList, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Items, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(8), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Items), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:SampleRateList), new depth 3
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOptions @ 2: success
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Options), new depth 2
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOptions @ 2: start to parse "Options"
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Options, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 3
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOption @ 3: start to parse "Encoding"
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Encoding, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(G726), new depth 4
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOption @ 3: success
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Encoding), new depth 3
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:BitrateList, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElemen[2022-10-05][16:20:28][media][DEBUG] Struct GetAudioEncoderConfigurationOptionsResponse @ 0: start to parse "GetAudioEncoderConfigurationOptionsResponse"
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/media/wsdl}trt:GetAudioEncoderConfigurationOptionsResponse, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 1
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOptions @ 1: start to parse "Options"
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/media/wsdl}trt:Options, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 2
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOption @ 2: start to parse "Options"
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Options, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 3
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Enum AudioEncoding @ 3: start to parse "Encoding"
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Encoding, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(AAC), new depth 4
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Enum AudioEncoding @ 3: success
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Encoding), new depth 3
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct IntList @ 3: start to parse "BitrateList"
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:BitrateList, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Items, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(64), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Items), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Items, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(32), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Items), new depth 4
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct IntList @ 3: success
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:BitrateList), new depth 3
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct IntList @ 3: start to parse "SampleRateList"
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:SampleRateList, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Items, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(16), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Items), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Items, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(8), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Items), new depth 4
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct IntList @ 3: success
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:SampleRateList), new depth 3
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOption @ 2: success
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOptions @ 1: success
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Options), new depth 2
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOptions @ 2: start to parse "Options"
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Options, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 3
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOption @ 3: start to parse "Encoding"
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Encoding, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(G711), new depth 4
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOption @ 3: success
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Encoding), new depth 3
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:BitrateList, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Items, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(32), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Items), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:BitrateList), new depth 3
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:SampleRateList, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Items, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(8), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Items), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:SampleRateList), new depth 3
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOptions @ 2: success
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Options), new depth 2
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOptions @ 2: start to parse "Options"
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Options, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 3
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOption @ 3: start to parse "Encoding"
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Encoding, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(G726), new depth 4
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOption @ 3: success
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Encoding), new depth 3
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:BitrateList, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Items, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(32), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Items), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:BitrateList), new depth 3
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:SampleRateList, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Items, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(8), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Items), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:SampleRateList), new depth 3
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOptions @ 2: success
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Options), new depth 2
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/media/wsdl}trt:Options), new depth 1
[2022-10-05][16:20:28][media][DEBUG] Struct GetAudioEncoderConfigurationOptionsResponse @ 0: success
t({http://www.onvif.org/ver10/schema}tt:Items, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(32), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Items), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:BitrateList), new depth 3
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:SampleRateList, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched StartElement({http://www.onvif.org/ver10/schema}tt:Items, {"": "", "s": "http://www.w3.org/2003/05/soap-envelope", "sc": "http://www.w3.org/2003/05/soap-encoding", "trt": "http://www.onvif.org/ver10/media/wsdl", "tt": "http://www.onvif.org/ver10/schema", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"}), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(8), new depth 5
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Items), new depth 4
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:SampleRateList), new depth 3
[2022-10-05][16:20:28][onvif_xsd][DEBUG] Struct AudioEncoderConfigurationOptions @ 2: success
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/schema}tt:Options), new depth 2
[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched EndElement({http://www.onvif.org/ver10/media/wsdl}trt:Options), new depth 1
[2022-10-05][16:20:28][media][DEBUG] Struct GetAudioEncoderConfigurationOptionsResponse @ 0: success
seimonw commented 2 years ago

I think it's something to do with the second Option Enum closing the Struct somehow:

[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(AAC), new depth 4
[2022-10-05][16:20:28][onvif_xsd][DEBUG] **Enum** AudioEncoding @ 3: success

vs

[2022-10-05][16:20:28][yaserde::de][DEBUG] Fetched Characters(G711), new depth 4
[2022-10-05][16:20:28][onvif_xsd][DEBUG] **Struct** AudioEncoderConfigurationOption @ 3: success
seimonw commented 2 years ago

Ah, ok - I think you already know about it by the looks: https://github.com/media-io/yaserde/issues/76