mirror of
https://github.com/kerberos-io/onvif.git
synced 2026-08-23 15:08:33 +00:00
Improvements in the package
This commit is contained in:
@@ -150,6 +150,10 @@ func (dev device) CallNonAuthorizedMethod(endpoint string, method interface{}) (
|
||||
return "", err
|
||||
}
|
||||
|
||||
soap.AddRootNamespaces(xlmns)
|
||||
|
||||
fmt.Println(soap.String())
|
||||
|
||||
/*
|
||||
Sending request and returns the response
|
||||
*/
|
||||
@@ -191,6 +195,8 @@ func (dev device) CallAuthorizedMethod(endpoint string, method interface{}) (str
|
||||
soap.AddRootNamespace("wsse", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext1.0.xsd")
|
||||
soap.AddRootNamespace("wsu", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility1.0.xsd")
|
||||
|
||||
soap.AddRootNamespaces(xlmns)
|
||||
|
||||
soapReq, err := xml.MarshalIndent(auth, "", " ")
|
||||
if err != nil {
|
||||
log.Printf("error: %v\n", err.Error())
|
||||
@@ -202,6 +208,7 @@ func (dev device) CallAuthorizedMethod(endpoint string, method interface{}) (str
|
||||
*/
|
||||
soap.AddStringHeaderContent(string(soapReq))
|
||||
|
||||
fmt.Println(soap.String())
|
||||
/*
|
||||
Sending request and returns the response
|
||||
*/
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
package scheme
|
||||
|
||||
type Vector2D struct {
|
||||
X float64 `xml:"x,attr"`
|
||||
Y float64 `xml:"y,attr"`
|
||||
Space string `xml:"space,attr,omitempty"`
|
||||
}
|
||||
|
||||
func (v *Vector2D) GetProperties() *map[string]interface{} {
|
||||
return &map[string]interface{} {
|
||||
"x":v.X,
|
||||
"y":v.Y,
|
||||
"space":v.Space,
|
||||
}
|
||||
}
|
||||
|
||||
type Vector1D struct {
|
||||
X float64 `xml:"x,attr"`
|
||||
Space string `xml:"space,attr,omitempty"`
|
||||
}
|
||||
|
||||
func (v *Vector1D) GetProperties() *map[string]interface{} {
|
||||
return &map[string]interface{} {
|
||||
"x":v.X,
|
||||
"space":v.Space,
|
||||
}
|
||||
}
|
||||
@@ -1,161 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--W3C XML Schema generated by XMLSpy v2017 (x64) (http://www.altova.com)-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" targetNamespace="http://www.onvif.org/ver10/schema" elementFormDefault="qualified" version="16.12">
|
||||
<!--===============================-->
|
||||
<!-- Start PTZ Related Types -->
|
||||
<!--===============================-->
|
||||
<xs:complexType name="Vector2D">
|
||||
<xs:attribute name="x" type="xs:float" use="required"/>
|
||||
<xs:attribute name="y" type="xs:float" use="required"/>
|
||||
<xs:attribute name="space" type="xs:anyURI" use="optional">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Pan/tilt coordinate space selector. The following options are defined:<ul>
|
||||
<li> http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace</li>
|
||||
<li> http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace</li>
|
||||
<li> http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace</li>
|
||||
<li> http://www.onvif.org/ver10/tptz/PanTiltSpaces/GenericSpeedSpace</li>
|
||||
</ul>
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="Vector1D">
|
||||
<xs:attribute name="x" type="xs:float" use="required"/>
|
||||
<xs:attribute name="space" type="xs:anyURI" use="optional">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Zoom coordinate space selector. The following options are defined:<ul style="">
|
||||
<li> http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace</li>
|
||||
<li> http://www.onvif.org/ver10/tptz/ZoomSpaces/TranslationGenericSpace</li>
|
||||
<li> http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace</li>
|
||||
<li> http://www.onvif.org/ver10/tptz/ZoomSpaces/ZoomGenericSpeedSpace</li>
|
||||
</ul>
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="PTZVector">
|
||||
<xs:sequence>
|
||||
<xs:element name="PanTilt" type="tt:Vector2D" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Pan and tilt position. The x component corresponds to pan and the y component to tilt.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="Zoom" type="tt:Vector1D" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
A zoom position.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="PTZStatus">
|
||||
<xs:sequence>
|
||||
<xs:element name="Position" type="tt:PTZVector" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Specifies the absolute position of the PTZ unit together with the Space references. The default absolute spaces of the corresponding PTZ configuration MUST be referenced within the Position element.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="MoveStatus" type="tt:PTZMoveStatus" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Indicates if the Pan/Tilt/Zoom device unit is currently moving, idle or in an unknown state.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="Error" type="xs:string" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
States a current PTZ error.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="UtcTime" type="xs:dateTime">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Specifies the UTC time when this status was generated.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- first Vendor then ONVIF -->
|
||||
</xs:sequence>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="PTZMoveStatus">
|
||||
<xs:sequence>
|
||||
<xs:element name="PanTilt" type="tt:MoveStatus" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="Zoom" type="tt:MoveStatus" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:simpleType name="MoveStatus">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="IDLE"/>
|
||||
<xs:enumeration value="MOVING"/>
|
||||
<xs:enumeration value="UNKNOWN"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<!--===============================-->
|
||||
<!-- Event and Analytics Types -->
|
||||
<!--===============================-->
|
||||
<xs:complexType name="Vector">
|
||||
<xs:attribute name="x" type="xs:float"/>
|
||||
<xs:attribute name="y" type="xs:float"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="Rectangle">
|
||||
<xs:attribute name="bottom" type="xs:float"/>
|
||||
<xs:attribute name="top" type="xs:float"/>
|
||||
<xs:attribute name="right" type="xs:float"/>
|
||||
<xs:attribute name="left" type="xs:float"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="Polygon">
|
||||
<xs:sequence>
|
||||
<xs:element name="Point" type="tt:Vector" minOccurs="3" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:element name="Polygon" type="tt:Polygon"/>
|
||||
<xs:complexType name="Color">
|
||||
<xs:attribute name="X" type="xs:float" use="required"/>
|
||||
<xs:attribute name="Y" type="xs:float" use="required"/>
|
||||
<xs:attribute name="Z" type="xs:float" use="required"/>
|
||||
<xs:attribute name="Colorspace" type="xs:anyURI"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="ColorCovariance">
|
||||
<xs:attribute name="XX" type="xs:float" use="required"/>
|
||||
<xs:attribute name="YY" type="xs:float" use="required"/>
|
||||
<xs:attribute name="ZZ" type="xs:float" use="required"/>
|
||||
<xs:attribute name="XY" type="xs:float"/>
|
||||
<xs:attribute name="XZ" type="xs:float"/>
|
||||
<xs:attribute name="YZ" type="xs:float"/>
|
||||
<xs:attribute name="Colorspace" type="xs:anyURI"/>
|
||||
</xs:complexType>
|
||||
<!--===============================-->
|
||||
<!-- Scene Description Types -->
|
||||
<!--===============================-->
|
||||
<xs:complexType name="Transformation">
|
||||
<xs:sequence>
|
||||
<xs:element name="Translate" type="tt:Vector" minOccurs="0"/>
|
||||
<xs:element name="Scale" type="tt:Vector" minOccurs="0"/>
|
||||
<xs:element name="Extension" type="tt:TransformationExtension" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="TransformationExtension">
|
||||
<xs:sequence>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- first Vendor then ONVIF -->
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
||||
@@ -1,328 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--W3C XML Schema generated by XMLSpy v2017 (x64) (http://www.altova.com)-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" targetNamespace="http://www.onvif.org/ver10/schema" elementFormDefault="qualified" version="16.12">
|
||||
<xs:include schemaLocation="common.xsd"/>
|
||||
<xs:import namespace="http://docs.oasis-open.org/wsn/b-2" schemaLocation="http://docs.oasis-open.org/wsn/b-2.xsd"/>
|
||||
<!--===============================-->
|
||||
<!-- Scene Description -->
|
||||
<!--===============================-->
|
||||
<xs:complexType name="Appearance">
|
||||
<xs:sequence>
|
||||
<xs:element name="Transformation" type="tt:Transformation" minOccurs="0"/>
|
||||
<xs:element name="Shape" type="tt:ShapeDescriptor" minOccurs="0"/>
|
||||
<xs:element name="Color" type="tt:ColorDescriptor" minOccurs="0"/>
|
||||
<xs:element name="Class" type="tt:ClassDescriptor" minOccurs="0"/>
|
||||
<xs:element name="Extension" type="tt:AppearanceExtension" minOccurs="0"/>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- reserved for ONVIF -->
|
||||
</xs:sequence>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="AppearanceExtension">
|
||||
<xs:sequence>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- first Vendor then ONVIF -->
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="ShapeDescriptor">
|
||||
<xs:sequence>
|
||||
<xs:element name="BoundingBox" type="tt:Rectangle"/>
|
||||
<xs:element name="CenterOfGravity" type="tt:Vector"/>
|
||||
<xs:element name="Polygon" type="tt:Polygon" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="Extension" type="tt:ShapeDescriptorExtension" minOccurs="0"/>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- reserved for ONVIF -->
|
||||
</xs:sequence>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="ShapeDescriptorExtension">
|
||||
<xs:sequence>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- first Vendor then ONVIF -->
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="ColorDescriptor">
|
||||
<xs:sequence>
|
||||
<xs:element name="ColorCluster" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Color" type="tt:Color"/>
|
||||
<xs:element name="Weight" type="xs:float" minOccurs="0"/>
|
||||
<xs:element name="Covariance" type="tt:ColorCovariance" minOccurs="0"/>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- reserved for ONVIF -->
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="Extension" type="tt:ColorDescriptorExtension" minOccurs="0"/>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- reserved for ONVIF -->
|
||||
</xs:sequence>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="ColorDescriptorExtension">
|
||||
<xs:sequence>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- first Vendor then ONVIF -->
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:simpleType name="ClassType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="Animal"/>
|
||||
<xs:enumeration value="Face"/>
|
||||
<xs:enumeration value="Human"/>
|
||||
<xs:enumeration value="Vehical"/>
|
||||
<xs:enumeration value="Other"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:complexType name="ClassDescriptor">
|
||||
<xs:sequence>
|
||||
<xs:element name="ClassCandidate" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Type" type="tt:ClassType"/>
|
||||
<xs:element name="Likelihood" type="xs:float"/>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- reserved for ONVIF -->
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="Extension" type="tt:ClassDescriptorExtension" minOccurs="0"/>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- reserved for ONVIF -->
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="ClassDescriptorExtension">
|
||||
<xs:sequence>
|
||||
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="OtherTypes" type="tt:OtherType" maxOccurs="unbounded"/>
|
||||
<xs:element name="Extension" type="tt:ClassDescriptorExtension2" minOccurs="0"/>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- reserved for ONVIF -->
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="ClassDescriptorExtension2">
|
||||
<xs:sequence>
|
||||
<xs:any namespace="##targetNamespace" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="OtherType">
|
||||
<xs:sequence>
|
||||
<xs:element name="Type" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Object Class Type</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="Likelihood" type="xs:float">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A likelihood/probability that the corresponding object belongs to this class. The sum of the likelihoods shall NOT exceed 1</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="1" maxOccurs="unbounded"/> <!-- first Vendor then ONVIF -->
|
||||
</xs:sequence>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="Object">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="tt:ObjectId">
|
||||
<xs:sequence>
|
||||
<xs:element name="Appearance" type="tt:Appearance" minOccurs="0"/>
|
||||
<xs:element name="Behaviour" type="tt:Behaviour" minOccurs="0"/>
|
||||
<xs:element name="Extension" type="tt:ObjectExtension" minOccurs="0"/>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- reserved for ONVIF -->
|
||||
</xs:sequence>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="ObjectExtension">
|
||||
<xs:sequence>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- first Vendor then ONVIF -->
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="Frame">
|
||||
<xs:sequence>
|
||||
<xs:element name="PTZStatus" type="tt:PTZStatus" minOccurs="0"/>
|
||||
<xs:element name="Transformation" type="tt:Transformation" minOccurs="0"/>
|
||||
<xs:element name="Object" type="tt:Object" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="ObjectTree" type="tt:ObjectTree" minOccurs="0"/>
|
||||
<xs:element name="Extension" type="tt:FrameExtension" minOccurs="0"/>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- reserved for ONVIF -->
|
||||
</xs:sequence>
|
||||
<xs:attribute name="UtcTime" type="xs:dateTime" use="required"/>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="FrameExtension">
|
||||
<xs:sequence>
|
||||
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="MotionInCells" type="tt:MotionInCells" minOccurs="0"/>
|
||||
<xs:element name="Extension" type="tt:FrameExtension2" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="FrameExtension2">
|
||||
<xs:sequence>
|
||||
<xs:any namespace="##targetNamespace" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="Merge">
|
||||
<xs:sequence>
|
||||
<xs:element name="from" type="tt:ObjectId" minOccurs="2" maxOccurs="unbounded"/>
|
||||
<xs:element name="to" type="tt:ObjectId"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="Split">
|
||||
<xs:sequence>
|
||||
<xs:element name="from" type="tt:ObjectId"/>
|
||||
<xs:element name="to" type="tt:ObjectId" minOccurs="2" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="Rename">
|
||||
<xs:sequence>
|
||||
<xs:element name="from" type="tt:ObjectId"/>
|
||||
<xs:element name="to" type="tt:ObjectId"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="ObjectId">
|
||||
<xs:attribute name="ObjectId" type="xs:integer"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="Behaviour">
|
||||
<xs:sequence>
|
||||
<xs:element name="Removed" minOccurs="0">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="Idle" minOccurs="0">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="Extension" type="tt:BehaviourExtension" minOccurs="0"/>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- reserved for ONVIF -->
|
||||
</xs:sequence>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="BehaviourExtension">
|
||||
<xs:sequence>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- first Vendor then ONVIF -->
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="ObjectTree">
|
||||
<xs:sequence>
|
||||
<xs:element name="Rename" type="tt:Rename" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="Split" type="tt:Split" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="Merge" type="tt:Merge" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="Delete" type="tt:ObjectId" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="Extension" type="tt:ObjectTreeExtension" minOccurs="0"/>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- reserved for ONVIF -->
|
||||
</xs:sequence>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="ObjectTreeExtension">
|
||||
<xs:sequence>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- first Vendor then ONVIF -->
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="MotionInCells">
|
||||
<xs:sequence>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- first Vendor then ONVIF -->
|
||||
</xs:sequence>
|
||||
<xs:attribute name="Columns" type="xs:integer" use="required">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Number of columns of the cell grid (x dimension)</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="Rows" type="xs:integer" use="required">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Number of rows of the cell grid (y dimension)</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="Cells" type="xs:base64Binary" use="required">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A “1” denotes a cell where motion is detected and a “0” an empty cell. The first cell is in the upper left corner. Then the cell order goes first from left to right and then from up to down. If the number of cells is not a multiple of 8 the last byte is filled with zeros. The information is run length encoded according to Packbit coding in ISO 12369 (TIFF, Revision 6.0).</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
<!--===============================-->
|
||||
<!-- Metadata Streaming Types -->
|
||||
<!--===============================-->
|
||||
<xs:complexType name="MetadataStream">
|
||||
<xs:sequence>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="VideoAnalytics" type="tt:VideoAnalyticsStream"/>
|
||||
<xs:element name="PTZ" type="tt:PTZStream"/>
|
||||
<xs:element name="Event" type="tt:EventStream"/>
|
||||
<xs:element name="Extension" type="tt:MetadataStreamExtension"/>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- reserved for ONVIF -->
|
||||
</xs:choice>
|
||||
</xs:sequence>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="MetadataStreamExtension">
|
||||
<xs:sequence>
|
||||
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="AudioAnalyticsStream" type="tt:AudioAnalyticsStream" minOccurs="0"/>
|
||||
<xs:element name="Extension" type="tt:MetadataStreamExtension2" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="MetadataStreamExtension2">
|
||||
<xs:sequence>
|
||||
<xs:any namespace="##targetNamespace" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="AudioAnalyticsStream">
|
||||
<xs:sequence>
|
||||
<xs:element name="AudioDescriptor" type="tt:AudioDescriptor" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="Extension" type="tt:AudioAnalyticsStreamExtension" minOccurs="0"/>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- reserved for ONVIF -->
|
||||
</xs:sequence>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="AudioDescriptor">
|
||||
<xs:sequence>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- first Vendor then ONVIF -->
|
||||
</xs:sequence>
|
||||
<xs:attribute name="UtcTime" type="xs:dateTime" use="required"/>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="AudioAnalyticsStreamExtension">
|
||||
<xs:sequence>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- first Vendor then ONVIF -->
|
||||
</xs:sequence>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
<xs:element name="MetadataStream" type="tt:MetadataStream"/>
|
||||
<xs:complexType name="VideoAnalyticsStream">
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="Frame" type="tt:Frame"/>
|
||||
<xs:element name="Extension" type="tt:VideoAnalyticsStreamExtension"/>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- reserved for ONVIF -->
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="VideoAnalyticsStreamExtension">
|
||||
<xs:sequence>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- first Vendor then ONVIF -->
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="PTZStream">
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="PTZStatus" type="tt:PTZStatus"/>
|
||||
<xs:element name="Extension" type="tt:PTZStreamExtension"/>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- reserved for ONVIF -->
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="PTZStreamExtension">
|
||||
<xs:sequence>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- first Vendor then ONVIF -->
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="EventStream">
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element ref="wsnt:NotificationMessage"/>
|
||||
<xs:element name="Extension" type="tt:EventStreamExtension"/>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- reserved for ONVIF -->
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="EventStreamExtension">
|
||||
<xs:sequence>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <!-- first Vendor then ONVIF -->
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
||||
@@ -1,52 +0,0 @@
|
||||
package scheme
|
||||
|
||||
import "encoding/xml"
|
||||
|
||||
//Types
|
||||
|
||||
type TypeWorker interface {
|
||||
GetProperties() *map[string] interface{}
|
||||
}
|
||||
|
||||
|
||||
//Start of ContinuousMove
|
||||
type Velocity struct {
|
||||
xmlName xml.Name `xml:"wsdl:velocity"`
|
||||
PanTilt Vector2D `xml:"tt:PanTilt,omitempty"`
|
||||
Zoom Vector1D `xml:"tt:Zoom,omitempty"`
|
||||
}
|
||||
|
||||
type Zoom struct {
|
||||
XMLName xml.Name
|
||||
Zoom int `xml:"x,attr"`
|
||||
}
|
||||
|
||||
type ContinuousMove struct {
|
||||
XMLName xml.Name `xml:"wsdl:ContinuousMove"`
|
||||
ReferenceToken string `xml:"wsdl:ProfileToken"`
|
||||
Velocity Velocity `xml:"wsdl:Velocity"`
|
||||
Timeout int `xml:"wsdl:Timeout"` //In seconds. Maybe need set more possibilities
|
||||
}
|
||||
|
||||
func (t *Velocity)GetProperties() *map[string] interface{} {
|
||||
return &map[string]interface{}{
|
||||
"PanTilt":t.PanTilt,
|
||||
"Zoom":t.Zoom,
|
||||
}
|
||||
}
|
||||
|
||||
func (t *Zoom)GetProperties() *map[string] interface{} {
|
||||
return &map[string]interface{} {
|
||||
"Zoom": t.Zoom,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func (t *ContinuousMove) GetProperties() *map[string] interface{} {
|
||||
return &map[string]interface{}{
|
||||
"ProfileToken": t.ReferenceToken,
|
||||
"Velocity": t.Velocity,
|
||||
"Timeout": t.Timeout,
|
||||
}
|
||||
}
|
||||
//End of ContinuousMove
|
||||
8948
scheme/onvif.xsd
8948
scheme/onvif.xsd
File diff suppressed because it is too large
Load Diff
@@ -1,389 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<?xml-stylesheet type="text/xsl" href="onvif-schema-viewer.xsl"?>-->
|
||||
<!--
|
||||
Copyright (c) 2008-2017 by ONVIF: Open Network Video Interface Forum. All rights reserved.
|
||||
|
||||
Recipients of this document may copy, distribute, publish, or display this document so long as this copyright notice, license and disclaimer are retained with all copies of the document. No license is granted to modify this document.
|
||||
|
||||
THIS DOCUMENT IS PROVIDED "AS IS," AND THE CORPORATION AND ITS MEMBERS AND THEIR AFFILIATES, MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THIS DOCUMENT ARE SUITABLE FOR ANY PURPOSE; OR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
|
||||
IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THIS DOCUMENT, WHETHER OR NOT (1) THE CORPORATION, MEMBERS OR THEIR AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR (2) SUCH DAMAGES WERE REASONABLY FORESEEABLE, AND ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THIS DOCUMENT. THE FOREGOING DISCLAIMER AND LIMITATION ON LIABILITY DO NOT APPLY TO, INVALIDATE, OR LIMIT REPRESENTATIONS AND WARRANTIES MADE BY THE MEMBERS AND THEIR RESPECTIVE AFFILIATES TO THE CORPORATION AND OTHER MEMBERS IN CERTAIN WRITTEN POLICIES OF THE CORPORATION.
|
||||
-->
|
||||
<xs:schema xmlns:ttr="http://www.onvif.org/ver20/analytics/radiometry"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:tt="http://www.onvif.org/ver10/schema"
|
||||
targetNamespace="http://www.onvif.org/ver20/analytics/radiometry" elementFormDefault="qualified" version="1.0">
|
||||
|
||||
<xs:import namespace="http://www.onvif.org/ver10/schema" schemaLocation="../../ver10/schema/onvif.xsd"/>
|
||||
|
||||
<!-- Radiometry Analytics Module Options ===============================-->
|
||||
<xs:complexType name="RadiometryModuleConfigOptions">
|
||||
<xs:sequence>
|
||||
<xs:element name="MaxMeasurementModules" type="xs:int">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
The total number of temperature measurement modules that can be created on the
|
||||
device, screen based or geolocated, of any type (spots or boxes).
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="MaxScreenSpots" type="xs:int">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
The total number of spot measurement modules that can be loaded simultaneously on the
|
||||
screen by the device. A value of 0 shall be used to indicate no support for Spots.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="MaxScreenBoxes" type="xs:int">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
The total number of box measurement modules that can be loaded simultaneously on the
|
||||
screen by the device. A value of 0 shall be used to indicate no support for Boxes.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="RadiometryParameterOptions" type="ttr:RadiometryParameterOptions" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Specifies valid ranges for the different radiometry parameters used for temperature calculation.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="RadiometryParameterOptions">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Describes valid ranges for the different radiometry parameters used for accurate temperature calculation.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:sequence>
|
||||
<xs:element name="ReflectedAmbientTemperature" type="tt:FloatRange" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Valid range of temperature values, in Kelvin.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="Emissivity" type="tt:FloatRange" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Valid range of emissivity values for the objects to measure.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="DistanceToObject" type="tt:FloatRange" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Valid range of distance between camera and object for a valid temperature reading, in meters.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="RelativeHumidity" type="tt:FloatRange" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Valid range of relative humidity values, in percentage.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="AtmosphericTemperature" type="tt:FloatRange" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Valid range of temperature values, in Kelvin.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="AtmosphericTransmittance" type="tt:FloatRange" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Valid range of atmospheric transmittance values.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="ExtOpticsTemperature" type="tt:FloatRange" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Valid range of temperature values, in Kelvin.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="ExtOpticsTransmittance" type="tt:FloatRange" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Valid range of external optics transmittance.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<!--===============================-->
|
||||
|
||||
<xs:complexType name="RadiometrySpotModuleConfig">
|
||||
<xs:sequence>
|
||||
<xs:element name="ScreenCoords" type="tt:Vector">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Screen coordinates, if spot is currently on screen. Assumes normalized screen limits (-1.0, 1.0).
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="AbsoluteCoords" type="tt:PTZVector" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Absolute orientation of the PTZ Vector with the Spot on screen. If no PTZVector is present
|
||||
the spot shall behave as a screen element, and stay on the same screen coordinates as the PTZ
|
||||
moves (like a head up display mask). If PTZVector is present the Spot element shall appear on
|
||||
display only when contained in the Field of View. In this case SpotScreenCoords shall be
|
||||
reported as relative to PTZVector.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="RadiometryParameters" type="ttr:RadiometryParameters" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Not present parameter means the Device shall use its value from Global Parameters in Thermal Service.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="ItemID" type="tt:ReferenceToken">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Unique identifier for this Spot Temperature Measurement Analytics Module.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="Active" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Indicates if the Temperature Measurement Item is enabled to provide temperature readings.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
|
||||
|
||||
<xs:complexType name="RadiometryBoxModuleConfig">
|
||||
<xs:sequence>
|
||||
<xs:element name="ScreenCoords" type="tt:Rectangle">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Screen coordinates, if box is currently on screen. Assumes normalized screen limits (-1.0, 1.0).
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="AbsoluteCoords" type="tt:PTZVector" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Absolute orientation of the PTZ Vector with the Box on screen. If no PTZVector is present
|
||||
the box shall behave as a screen element, and stay on the same screen coordinates as the PTZ
|
||||
moves (like a head up display mask). If PTZVector is present the Box element shall appear on
|
||||
display only when contained in the Field of View. In this case BoxScreenCoords shall be
|
||||
reported as relative to PTZVector.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="RadiometryParameters" type="ttr:RadiometryParameters" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Not present parameter means the Device shall use its value from Global Parameters in Thermal Service.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="ItemID" type="tt:ReferenceToken">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Unique identifier for this Box Temperature Measurement Analytics Module.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="Active" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Indicates if the Temperature Measurement Item is enabled to provide temperature readings.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
|
||||
<!-- Radiometry Metadata Types -->
|
||||
<xs:complexType name="SpotTemperatureReading">
|
||||
<xs:sequence>
|
||||
<xs:element name="RadiometryParameters" type="ttr:RadiometryParameters" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Not present means Global Parameters from Thermal Service are being used.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="ItemID" type="tt:ReferenceToken"/>
|
||||
<xs:attribute name="SpotTemperature" type="xs:float" use="required"/>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="BoxTemperatureReading">
|
||||
<xs:sequence>
|
||||
<xs:element name="RadiometryParameters" type="ttr:RadiometryParameters" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Not present means Global Parameters from Thermal Service are being used.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="ItemID" type="tt:ReferenceToken" use="required"/>
|
||||
<xs:attribute name="MaxTemperature" type="xs:float" use="required"/>
|
||||
<xs:attribute name="MinTemperature" type="xs:float" use="required"/>
|
||||
<xs:attribute name="AverageTemperature" type="xs:float"/>
|
||||
<xs:attribute name="MedianTemperature" type="xs:float"/>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
|
||||
<!-- Aux Types -->
|
||||
<xs:complexType name="RadiometryParameters">
|
||||
<xs:sequence>
|
||||
<xs:element name="ReflectedAmbientTemperature" type="xs:float" minOccurs="0"/>
|
||||
<xs:element name="Emissivity" type="xs:float" minOccurs="0"/>
|
||||
<xs:element name="DistanceToObject" type="xs:float" minOccurs="0"/>
|
||||
<xs:element name="RelativeHumidity" type="xs:float" minOccurs="0"/>
|
||||
<xs:element name="AtmosphericTemperature" type="xs:float" minOccurs="0"/>
|
||||
<xs:element name="AtmosphericTransmittance" type="xs:float" minOccurs="0"/>
|
||||
<xs:element name="ExtOpticsTemperature" type="xs:float" minOccurs="0"/>
|
||||
<xs:element name="ExtOpticsTransmittance" type="xs:float" minOccurs="0"/>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
|
||||
<!-- Radiometry Rule Options ===============================-->
|
||||
<xs:complexType name="RadiometryRuleConfigOptions">
|
||||
<xs:sequence>
|
||||
<xs:element name="RadiometryRuleOptions" type="ttr:RadiometryRuleOptions" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Specifies valid ranges for thresholds and reference parameters used for triggering radiometric rules.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="TemperatureConditionOptions" type="ttr:TemperatureCondition" maxOccurs="unbounded">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Specifies valid rule conditions for temperature comparisions in radiometric rules.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="TemperatureTypeOptions" type="ttr:TemperatureType" maxOccurs="unbounded">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Specifies temperature measurement types provided by radiometry analytics modules in the device.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="RadiometryRuleOptions">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Describes valid ranges for radiometric rule condition thresholds and reference parameters.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:sequence>
|
||||
<xs:element name="ThresholdTemperature" type="tt:FloatRange">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Valid range of temperature values, in Kelvin.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="ThresholdTime" type="tt:FloatRange" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Valid range of hysteresis time interval for temperature conditions, in seconds.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="HysteresisTemperature" type="tt:FloatRange" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Valid range of temperature hysteresis values, in Kelvin.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:simpleType name="TemperatureCondition">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="LessThan"/>
|
||||
<xs:enumeration value="MoreThan"/>
|
||||
<xs:enumeration value="EqualTo"/>
|
||||
<xs:enumeration value="Change"/> <!-- proposed by Axis, Verona 2015 -->
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="TemperatureType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="MaxTemp"/>
|
||||
<xs:enumeration value="MinTemp"/>
|
||||
<xs:enumeration value="AverageTemp"/>
|
||||
<xs:enumeration value="StdDeviation"/>
|
||||
<xs:enumeration value="MedianTemp"/>
|
||||
<xs:enumeration value="ISOCoverage"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<!--===============================-->
|
||||
<xs:complexType name="RadiometryTemperatureRuleConfig">
|
||||
<xs:sequence>
|
||||
<xs:element name="TemperatureType" type="ttr:TemperatureType" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Indicates which of the temperature values provided by the input Analytics Module
|
||||
shall be used by the rule. In the case of Analytics Modules providing a single
|
||||
Temperature Value (e.g. Spot) this parameter is ignored, and is therefore optional.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="RuleCondition" type="ttr:TemperatureCondition">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Indicates the type of temperature condition to check.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="ThresholdTemperature" type="xs:float">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Indicates the temperature reference value the rule shall be checked against.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="ThresholdTime" type="xs:duration">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Indicates the time interval during which the rule condition shall be met to trigger an event.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="HysteresisTemperature" type="xs:float">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Indicates the width in Kelvin of the temerature hysteresis band to be considered by the rule.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="RadiometryModuleID" type="tt:ReferenceToken">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Reference Token to the Temperature Measurement Analytics Module providing the Temperature on which rule is defined.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="Enabled" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Indicates if the Temperature Rule is enabled to provide temperature alarm events.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
|
||||
</xs:schema>
|
||||
110
scheme/rules.xsd
110
scheme/rules.xsd
@@ -1,110 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (c) 2008-2016 by ONVIF: Open Network Video Interface Forum. All rights reserved.
|
||||
|
||||
Recipients of this document may copy, distribute, publish, or display this document so long as this copyright notice, license and disclaimer are retained with all copies of the document. No license is granted to modify this document.
|
||||
|
||||
THIS DOCUMENT IS PROVIDED "AS IS," AND THE CORPORATION AND ITS MEMBERS AND THEIR AFFILIATES, MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THIS DOCUMENT ARE SUITABLE FOR ANY PURPOSE; OR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
|
||||
IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THIS DOCUMENT, WHETHER OR NOT (1) THE CORPORATION, MEMBERS OR THEIR AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR (2) SUCH DAMAGES WERE REASONABLY FORESEEABLE, AND ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THIS DOCUMENT. THE FOREGOING DISCLAIMER AND LIMITATION ON LIABILITY DO NOT APPLY TO, INVALIDATE, OR LIMIT REPRESENTATIONS AND WARRANTIES MADE BY THE MEMBERS AND THEIR RESPECTIVE AFFILIATES TO THE CORPORATION AND OTHER MEMBERS IN CERTAIN WRITTEN POLICIES OF THE CORPORATION.
|
||||
-->
|
||||
<xs:schema xmlns:axt="http://www.onvif.org/ver20/analytics"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:tt="http://www.onvif.org/ver10/schema"
|
||||
targetNamespace="http://www.onvif.org/ver20/analytics" elementFormDefault="qualified" version="16.12">
|
||||
|
||||
<xs:import namespace="http://www.onvif.org/ver10/schema" schemaLocation="../../../ver10/schema/onvif.xsd"/>
|
||||
|
||||
<!--===============================-->
|
||||
<xs:complexType name="MotionRegionConfigOptions">
|
||||
<xs:sequence>
|
||||
<xs:element name="MaxRegions" type="xs:int" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
The total number of Motion Region Detector rules that can be created on the
|
||||
device.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="DisarmSupport" type="xs:boolean" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
True if the device supports disarming a Motion Region Detector rule.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="PolygonSupport" type="xs:boolean" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
True if the device supports defining a region using a Polygon instead of a
|
||||
Rectangle.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="PolygonLimits" type="tt:IntRange" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
For devices that support Polygons with limitations on the number of sides,
|
||||
provides the minimum and maximum number of sides that can be defined in the
|
||||
Polygon.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="SingleSensitivitySupport" type="xs:boolean" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Indicates the device can only support one sensitivity level for all defines
|
||||
motion detection regions. Changing the sensitivity for one region would be
|
||||
applied to all regions.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="RuleNotification" type="xs:boolean" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
True if the device will include the Name of the Rule to indicate the region
|
||||
that motion was detected in.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
|
||||
<!--===============================-->
|
||||
<xs:element name="MotionRegionConfig">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="tt:Polygon" minOccurs="0">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Provides the points of a Polygon in the VideoSourceConfiguration's Bounds
|
||||
element. If the device does not support Polygons, this structure must contain
|
||||
four points that represent a Rectangle.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="Armed" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Indicates if the Motion Region is Armed (detecting motion) or Disarmed (motion is
|
||||
not being detected).
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="Sensitivity" type="xs:float">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Indicates the sensitivity level of the motion detector for this region. The
|
||||
sensitivity value is normalized where 0 represents the lower sensitivity where
|
||||
significant motion is required to trigger an alarm and 1 represents the higher
|
||||
sensitivity where very little motion is required to trigger an alarm.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
114
scheme/types.xsd
114
scheme/types.xsd
@@ -1,114 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (c) 2010-2015 by ONVIF: Open Network Video Interface Forum. All rights reserved.
|
||||
|
||||
Recipients of this document may copy, distribute, publish, or display this
|
||||
document so long as this copyright notice, license and disclaimer are
|
||||
retained with all copies of the document.
|
||||
|
||||
THIS DOCUMENT IS PROVIDED "AS IS," AND THE CORPORATION AND ITS MEMBERS AND
|
||||
THEIR AFFILIATES, MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE;
|
||||
THAT THE CONTENTS OF THIS DOCUMENT ARE SUITABLE FOR ANY PURPOSE;
|
||||
OR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY PATENTS,
|
||||
COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
|
||||
IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL
|
||||
DAMAGES, ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THIS
|
||||
DOCUMENT, WHETHER OR NOT (1) THE CORPORATION, MEMBERS OR THEIR AFFILIATES
|
||||
HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR (2) SUCH DAMAGES
|
||||
WERE REASONABLY FORESEEABLE, AND ARISING OUT OF OR RELATING TO ANY USE OR
|
||||
DISTRIBUTION OF THIS DOCUMENT.
|
||||
THE FOREGOING DISCLAIMER AND LIMITATION ON LIABILITY DO NOT APPLY TO,
|
||||
INVALIDATE, OR LIMIT REPRESENTATIONS AND WARRANTIES MADE BY THE MEMBERS
|
||||
AND THEIR RESPECTIVE AFFILIATES TO THE CORPORATION AND OTHER MEMBERS IN
|
||||
CERTAIN WRITTEN POLICIES OF THE CORPORATION.
|
||||
-->
|
||||
<xs:schema targetNamespace="http://www.onvif.org/ver10/pacs"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:pt="http://www.onvif.org/ver10/pacs"
|
||||
elementFormDefault="qualified"
|
||||
version="1.1">
|
||||
<!--====== types ======-->
|
||||
<xs:simpleType name="ReferenceToken">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Type used to reference logical and physical entities.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="64"/>
|
||||
<xs:minLength value="0"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<!--===============================-->
|
||||
<xs:complexType name="DataEntity">
|
||||
<xs:annotation>
|
||||
<xs:documentation>General datastructure referenced by a token.
|
||||
Should be used as extension base.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:sequence>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="token" type="pt:ReferenceToken" use="required">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A service-unique identifier of the item.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
<!--===============================-->
|
||||
<xs:simpleType name="Name">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Type used for names of logical and physical entities.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="64"/>
|
||||
<xs:minLength value="0"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<!--===============================-->
|
||||
<xs:simpleType name="Description">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Description is optional and the maximum length is device specific.
|
||||
If the length is more than maximum length, it is silently chopped to the maximum length
|
||||
supported by the device/service (which may be 0).
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="1024"/>
|
||||
<xs:minLength value="0"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<!--===============================-->
|
||||
<xs:simpleType name="PositiveInteger">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Type used to represent the numbers from 1 ,2 , 3,...</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:unsignedInt">
|
||||
<xs:minInclusive value="1"></xs:minInclusive>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<!--===============================-->
|
||||
<xs:complexType name="Attribute">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Attributes contains a Name and an optional Value and type.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:sequence>
|
||||
<xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="Name" type="xs:string" use="required">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Name of attribute. Key names starting with "ONVIF" (any case) are reserved for ONVIF
|
||||
use.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="Value" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Value of attribute</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:anyAttribute processContents="lax"/>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
||||
109
wsdlprocess.go
109
wsdlprocess.go
@@ -1,109 +0,0 @@
|
||||
package goonvif
|
||||
|
||||
import (
|
||||
"github.com/beevik/etree"
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const PREFIX = "wsdl:"
|
||||
const DIVIDER = "**********************************"
|
||||
|
||||
const SCHEME = "src/github.com/yakovlevdmv/goonvif/scheme/onvif.go"
|
||||
|
||||
func ReadWSDL(path string) {
|
||||
doc := etree.NewDocument()
|
||||
if err := doc.ReadFromFile(path); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
fmt.Println(DIVIDER)
|
||||
|
||||
fmt.Println("Operations")
|
||||
|
||||
root := doc.SelectElement(PREFIX + "definitions")
|
||||
//fmt.Println("ROOT element:", root.Tag)
|
||||
//for _, attr := range root.Attr {
|
||||
// fmt.Printf(" ATTR: \n\tprefix:%s\n\tname:%s\n\tnamespace:%s\n", attr.Space, attr.Key, attr.Value)
|
||||
//}
|
||||
|
||||
fmt.Println(DIVIDER)
|
||||
|
||||
portType := root.SelectElement(PREFIX + "portType")
|
||||
fmt.Println("Port Type: ", portType.SelectAttr("name").Value)
|
||||
|
||||
fmt.Println(DIVIDER)
|
||||
|
||||
counter := 1
|
||||
for _, operation := range portType.SelectElements("wsdl:operation") {
|
||||
operationName :=operation.SelectAttr("name").Value
|
||||
fmt.Println(fmt.Sprintf("%d. %s", counter, operationName))
|
||||
counter++
|
||||
|
||||
/**
|
||||
Getting Soap Action endpoint
|
||||
*/
|
||||
fmt.Println("\tSOAP action:")
|
||||
fmt.Println("\t" + root.FindElement("//wsdl:binding/wsdl:operation[@name='" + operationName + "']/soap:operation").SelectAttr("soapAction").Value)
|
||||
|
||||
/**
|
||||
Обработка вложенных тегов
|
||||
*/
|
||||
for _, element := range operation.ChildElements() {
|
||||
if element.Tag == "documentation" {
|
||||
//fmt.Println("\tDescription: " + element.Text())
|
||||
fmt.Println("\tDescription: " + element.Text())
|
||||
}
|
||||
if element.Tag == "input" {
|
||||
fmt.Println("\tInput:")
|
||||
name := strings.Split(element.SelectAttr("message").Value, ":")[1]
|
||||
//fmt.Println("\t[" + name + "]")
|
||||
|
||||
/**
|
||||
Get type name from message attribute
|
||||
*/
|
||||
typeName := strings.Split(root.FindElement("//wsdl:message[@name='" + name + "']/wsdl:part").SelectAttr("element").Value, ":")[1]
|
||||
fmt.Println("\t[" + typeName + "]")
|
||||
|
||||
|
||||
parseType(typeName, path)
|
||||
}
|
||||
if element.Tag == "output" {
|
||||
fmt.Println("\tOutput:")
|
||||
name := strings.Split(element.SelectAttr("message").Value, ":")[1]
|
||||
//fmt.Println("\t[" + name + "]")
|
||||
|
||||
/**
|
||||
Get type name from message attribute
|
||||
*/
|
||||
typeName := strings.Split(root.FindElement("//wsdl:message[@name='" + name + "']/wsdl:part").SelectAttr("element").Value, ":")[1]
|
||||
fmt.Println("\t[" + typeName + "]")
|
||||
parseType(typeName, path)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func parseType(typeName string, wsdl_path string) {
|
||||
doc := etree.NewDocument()
|
||||
if err := doc.ReadFromFile(wsdl_path); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
root := doc.SelectElement(PREFIX + "definitions")
|
||||
|
||||
t := root.FindElement("//wsdl:types//xs:element[@name='" + typeName + "']")
|
||||
//t := types.FindElement("//xs:element[@name='" + "DeleteGeoLocationRequest" + "']")
|
||||
//fmt.Println("//xs:element[@name='" + typeName + "']")
|
||||
_type := t.FindElement("//xs:element")
|
||||
if _type != nil {
|
||||
t_name := strings.Split(_type.SelectAttr("type").Value + "]", ":")[1]
|
||||
t_namespace := strings.Split(_type.SelectAttr("type").Value + "]", ":")[0]
|
||||
fmt.Println("\t\t" + _type.SelectAttr("name").Value + " [" + t_name)
|
||||
fmt.Println("\t\tNamespace of type: " + t_namespace)
|
||||
//fmt.Println("\t\t" + _type.SelectAttr("minOccurs").Value)
|
||||
//fmt.Println("\t\t" + _type.SelectAttr("maxOccurs").Value)
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user