Search code examples
onvif

onvif compilation error with missing page


Since today, I have a problem compiling ONVIF in C++ using GSOAP library.

It seems to be due to a 404 error on the webpage https://www.w3.org/2004/08/xop/include which is referenced in the onvif.xsd specification (here: https://www.onvif.org/ver10/schema/onvif.xsd)

<xs:import namespace="http://www.w3.org/2004/08/xop/include" schemaLocation="http://www.w3.org/2004/08/xop/include"/>

For those who need the content, it can be found here: https://web.archive.org/web/20220513081836/https://www.w3.org/2004/08/xop/include

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
xmlns:tns="http://www.w3.org/2004/08/xop/include" 
targetNamespace="http://www.w3.org/2004/08/xop/include">

  <xs:element name="Include" type="tns:Include"/>
  <xs:complexType name="Include">
    <xs:sequence>
      <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="href" type="xs:anyURI" use="required"/>
    <xs:anyAttribute namespace="##other"/>
   </xs:complexType>
</xs:schema>

does anyone has a patch for this ? can Onvif people publish a fix ?

Note: w3 website documentation also refers to this 404 page : https://www.w3.org/TR/xop10/#xop_include


Solution

  • I think this is a normal occurrence, and happens to me at least a couple times a month. To resolve this I downloaded the schema sheets down and then changed the "schemaLocation" to the local path/file name for the schema sheet.

    I would download down all of the xsd, wsdl, and included files to a local directory then they won't need to be fetched on compilation. I was able to access the xop/include at the link now so it must be online again, but I would cache it locally to save yourself a headache in the future when it goes down again.

    schema directory and sheet