Browse Source

1. add wsdl file; 2. add test for schedule

tangs 5 years ago
parent
commit
679536448e

+ 0 - 0
plugins/README.md


+ 2 - 0
plugins/ipc_test.py

@@ -0,0 +1,2 @@
+#!/usr/bin/env python
+# -*- coding:utf-8 -*-

+ 751 - 0
resource/wsdl/accesscontrol.wsdl

@@ -0,0 +1,751 @@
+<?xml version="1.0" encoding="utf-8"?>
+<?xml-stylesheet type="text/xsl" href="../../ver20/util/onvif-wsdl-viewer.xsl"?>
+<!--
+Copyright (c) 2010-2013 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.
+-->
+<wsdl:definitions name="PACSService" targetNamespace="http://www.onvif.org/ver10/accesscontrol/wsdl"
+  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:tac="http://www.onvif.org/ver10/accesscontrol/wsdl"
+  >
+  <wsdl:types>
+    <xs:schema targetNamespace="http://www.onvif.org/ver10/accesscontrol/wsdl"
+     xmlns:xs="http://www.w3.org/2001/XMLSchema"
+     xmlns:pt="http://www.onvif.org/ver10/pacs"
+     xmlns:tac="http://www.onvif.org/ver10/accesscontrol/wsdl"
+     elementFormDefault="qualified"
+     version="1.0">
+      <xs:import namespace="http://www.onvif.org/ver10/pacs" schemaLocation="types.xsd"/>
+      <!--====== types ======-->
+      <xs:complexType name="ServiceCapabilities">
+      <xs:annotation>
+        <xs:documentation>
+The service capabilities reflect optional functionality of a service.
+The information is static and does not change during device operation.
+The following capabilities are available:
+</xs:documentation>
+      </xs:annotation>
+        <xs:sequence>
+          <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
+        </xs:sequence>
+        <xs:attribute name="MaxLimit" type="xs:unsignedInt" use="required"><xs:annotation>
+            <xs:documentation>The maximum number of entries returned by a single GetList request. The device shall never return more than this number of entities in a single response.</xs:documentation>
+          </xs:annotation></xs:attribute>
+        <xs:anyAttribute processContents="lax"/>
+      </xs:complexType>
+      <!--===============================-->
+      <xs:complexType name="AccessPointInfoBase">
+      <xs:annotation>
+        <xs:documentation>
+Used as extension base for AccessPointInfo.
+</xs:documentation>
+      </xs:annotation>
+        <xs:complexContent>
+          <xs:extension base="pt:DataEntity">
+            <xs:sequence>
+              <xs:element name="Name" type="pt:Name"><xs:annotation>
+                  <xs:documentation>A user readable name. It shall be up to 64 characters.</xs:documentation>
+                </xs:annotation></xs:element>
+              <xs:element name="Description" type="pt:Description" minOccurs="0"><xs:annotation>
+                  <xs:documentation>Optional user readable description for the AccessPoint. It shall be up to 1024 characters.</xs:documentation>
+                </xs:annotation></xs:element>
+              <xs:element name="AreaFrom" type="pt:ReferenceToken" minOccurs="0"><xs:annotation>
+                  <xs:documentation>Optional reference to the Area from which access is requested.</xs:documentation>
+                </xs:annotation></xs:element>
+              <xs:element name="AreaTo" type="pt:ReferenceToken" minOccurs="0"><xs:annotation>
+                  <xs:documentation>Optional reference to the Area to which access is requested.</xs:documentation>
+                </xs:annotation></xs:element>
+              <xs:element name="EntityType" type="xs:QName" minOccurs="0"><xs:annotation>
+                  <xs:documentation>Optional entity type; if missing, a Door type as defined by the ONVIF DoorControl service should be assumed. This can also be represented by the QName value "tdc:Door" - where tdc is the namespace of the Door Control service: &quot;http://www.onvif.org/ver10/doorcontrol/wsdl&quot;. This field is provided for future extensions; it will allow an AccessPoint being extended to cover entity types other than Doors as well.</xs:documentation>
+                </xs:annotation></xs:element>
+              <xs:element name="Entity" type="pt:ReferenceToken"><xs:annotation>
+                  <xs:documentation>Reference to the entity used to control access; the entity type may be specified by the optional EntityType field explained below but is typically a Door.</xs:documentation>
+                </xs:annotation></xs:element>
+            </xs:sequence>
+          </xs:extension>
+        </xs:complexContent>
+      </xs:complexType>
+      <!--===============================-->
+      <xs:complexType name="AccessPointInfo">
+      <xs:annotation>
+        <xs:documentation>
+The AccessPointInfo structure contains basic information about an AccessPoint instance.
+An AccessPoint defines an entity a Credential can be granted or denied access to. The
+AccessPointInfo provides basic information on how access is controlled in one direction for a
+door (from which area to which area).
+&lt;/p&gt;&lt;p&gt;
+ door is the typical device involved, but other type of
+devices may be supported as well.
+Multiple AccessPoints may cover the same Door.
+A typical case is one AccessPoint for entry and another for exit, both referencing
+the same Door.
+&lt;/p&gt;&lt;p&gt;
+
+An ONVIF compliant device shall provide the following fields for each AccessPoint instance:
+</xs:documentation>
+      </xs:annotation>
+        <xs:complexContent>
+          <xs:extension base="tac:AccessPointInfoBase">
+            <xs:sequence>
+              <xs:element name="Capabilities" type="tac:AccessPointCapabilities"><xs:annotation>
+                  <xs:documentation>The capabilities for the AccessPoint.</xs:documentation>
+                </xs:annotation></xs:element>
+              <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
+            </xs:sequence>
+            <xs:anyAttribute processContents="lax"/>
+          </xs:extension>
+        </xs:complexContent>
+      </xs:complexType>
+      <!--===============================-->
+      <xs:complexType name="AccessPointCapabilities">
+      <xs:annotation>
+        <xs:documentation>
+The AccessPoint capabilities reflect optional functionality of a particular physical entity.
+Different AccessPoint instances may have different set of capabilities. This information may
+change during device operation, e.g. if hardware settings are changed.
+The following capabilities are available:</xs:documentation>
+      </xs:annotation>
+        <xs:sequence>
+          <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
+        </xs:sequence>
+        <xs:attribute name="DisableAccessPoint" type="xs:boolean" use="required"><xs:annotation>
+            <xs:documentation>Indicates whether or not this AccessPoint instance supports EnableAccessPoint and DisableAccessPoint commands.</xs:documentation>
+          </xs:annotation></xs:attribute>
+        <xs:attribute name="Duress" type="xs:boolean"><xs:annotation>
+            <xs:documentation>Indicates whether or not this AccessPoint instance supports generation of duress events.</xs:documentation>
+          </xs:annotation></xs:attribute>
+        <xs:attribute name="AnonymousAccess" type="xs:boolean"><xs:annotation>
+            <xs:documentation>Indicates whether or not this AccessPoint has a REX switch or other input that allows anonymous access.</xs:documentation>
+          </xs:annotation></xs:attribute>
+        <xs:attribute name="AccessTaken" type="xs:boolean"><xs:annotation>
+            <xs:documentation>Indicates whether or not this AccessPoint instance supports generation of AccessTaken and AccessNotTaken events. If AnonymousAccess and AccessTaken are both true, it indicates that the Anonymous versions of AccessTaken and AccessNotTaken are supported.</xs:documentation>
+          </xs:annotation></xs:attribute>
+        <xs:attribute name="ExternalAuthorization" type="xs:boolean"><xs:annotation>
+            <xs:documentation>Indicates whether or not this AccessPoint instance supports the ExternalAuthorization operation and the generation of Request events. If AnonymousAccess and ExternalAuthorization are both true, it indicates that the Anonymous version is supported as well.</xs:documentation>
+          </xs:annotation></xs:attribute>
+        <xs:anyAttribute processContents="lax"/>
+      </xs:complexType>
+      <!--===============================-->
+      <xs:complexType name="AreaInfoBase">
+      <xs:annotation>
+        <xs:documentation>
+Basic information about an Area. Used as extension base.
+</xs:documentation>
+      </xs:annotation>
+        <xs:complexContent>
+          <xs:extension base="pt:DataEntity">
+            <xs:sequence>
+              <xs:element name="Name" type="pt:Name"><xs:annotation>
+                  <xs:documentation>User readable name. It shall be up to 64 characters.</xs:documentation>
+                </xs:annotation></xs:element>
+              <xs:element name="Description" type="pt:Description" minOccurs="0"><xs:annotation>
+                  <xs:documentation>User readable description for the Area. It shall be up to 1024 characters.</xs:documentation>
+                </xs:annotation></xs:element>
+            </xs:sequence>
+          </xs:extension>
+        </xs:complexContent>
+      </xs:complexType>
+      <!--===============================-->
+      <xs:complexType name="AreaInfo">
+      <xs:annotation>
+        <xs:documentation>
+The AreaInfo structure contains basic information about an Area.
+An ONVIF compliant device shall provide the following fields for each Area:
+</xs:documentation>
+      </xs:annotation>
+        <xs:complexContent>
+          <xs:extension base="tac:AreaInfoBase">
+            <xs:sequence>
+            </xs:sequence>
+            <xs:anyAttribute processContents="lax"/>
+          </xs:extension>
+        </xs:complexContent>
+      </xs:complexType>
+      <!--===============================-->
+      <xs:complexType name="AccessPointState">
+      <xs:annotation>
+        <xs:documentation>
+The AccessPointState contains state information for an AccessPoint.
+An ONVIF compliant device shall provide the following fields for each AccessPoint instance:
+</xs:documentation>
+      </xs:annotation>
+        <xs:sequence>
+          <xs:element name="Enabled" type="xs:boolean"><xs:annotation>
+              <xs:documentation>Indicates that the AccessPoint is enabled. By default this field value shall be True, if the DisableAccessPoint capabilities is not supported.</xs:documentation>
+            </xs:annotation></xs:element>
+          <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
+        </xs:sequence>
+        <xs:anyAttribute processContents="lax"/>
+      </xs:complexType>
+      <!--===============================-->
+      <xs:simpleType name="Decision">
+      <xs:annotation>
+        <xs:documentation>
+The Decision enumeration represents a choice of two available options for an access request:
+</xs:documentation>
+      </xs:annotation>
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="Granted">
+            <xs:annotation><xs:documentation>The decision is to grant access.</xs:documentation></xs:annotation>
+          </xs:enumeration>
+          <xs:enumeration value="Denied">
+            <xs:annotation><xs:documentation>The decision is to deny access.</xs:documentation></xs:annotation>
+          </xs:enumeration>
+        </xs:restriction>
+      </xs:simpleType>
+      <!--===============================-->
+      <xs:simpleType name="DenyReason">
+      <xs:annotation>
+        <xs:documentation>
+Non-normative enum that describes the various reasons for denying access.
+The following strings shall be used for the reason field:
+</xs:documentation>
+      </xs:annotation>
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="CredentialNotEnabled">
+            <xs:annotation><xs:documentation>The device shall provide the following event, whenever a valid credential is not enabled or has been disabled (e.g., due to credential being lost etc.) to prevent unauthorized entry.</xs:documentation></xs:annotation>
+          </xs:enumeration>
+          <xs:enumeration value="CredentialNotActive">
+            <xs:annotation><xs:documentation>The device shall provide the following event, whenever a valid credential is presented though it is not active yet;: e.g, the credential was presented before the start date.</xs:documentation></xs:annotation>
+          </xs:enumeration>
+          <xs:enumeration value="CredentialExpired">
+            <xs:annotation><xs:documentation>The device shall provide the following event, whenever a valid credential was presented after its expiry date.</xs:documentation></xs:annotation>
+          </xs:enumeration>
+          <xs:enumeration value="InvalidPIN">
+            <xs:annotation><xs:documentation>The device shall provide the following event, whenever an entered PIN code does not match the credential.</xs:documentation></xs:annotation>
+          </xs:enumeration>
+          <xs:enumeration value="NotPermittedAtThisTime">
+            <xs:annotation><xs:documentation>The device shall provide the following event, whenever a valid credential is denied access to the requested AccessPoint because the credential is not permitted at the moment.</xs:documentation></xs:annotation>
+          </xs:enumeration>
+          <xs:enumeration value="Unauthorized">
+            <xs:annotation><xs:documentation>The device shall provide the following event, whenever the presented credential is not authorized.</xs:documentation></xs:annotation>
+          </xs:enumeration>
+          <xs:enumeration value="Other">
+            <xs:annotation><xs:documentation>The device shall provide the following event, whenever the request is denied and no other specific event matches it or is supported by the service.</xs:documentation></xs:annotation>
+          </xs:enumeration>
+        </xs:restriction>
+      </xs:simpleType>
+      <!--===============================-->
+      <!--  Message Request / Response elements  -->
+      <xs:element name="GetServiceCapabilities">
+        <xs:complexType>
+          <xs:sequence>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <!--===============================-->
+      <xs:element name="GetServiceCapabilitiesResponse">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="Capabilities" type="tac:ServiceCapabilities"><xs:annotation>
+                <xs:documentation>The capability response message contains the requested Access Control service capabilities using a hierarchical XML capability structure.</xs:documentation>
+              </xs:annotation></xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <!--===============================-->
+      <xs:element name="GetAccessPointInfoList">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="Limit" type="xs:int" minOccurs="0"><xs:annotation>
+                <xs:documentation>Maximum number of entries to return. If not specified, less than one or higher than what the device supports, the number of items is determined by the device.</xs:documentation>
+              </xs:annotation></xs:element>
+            <xs:element name="StartReference" type="xs:string" minOccurs="0"><xs:annotation>
+                <xs:documentation>Start returning entries from this start reference. If not specified, entries shall start from the beginning of the dataset.</xs:documentation>
+              </xs:annotation></xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <!--===============================-->
+      <xs:element name="GetAccessPointInfoListResponse">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="NextStartReference" type="xs:string" minOccurs="0"><xs:annotation>
+                <xs:documentation>StartReference to use in next call to get the following items. If absent, no more items to get.</xs:documentation>
+              </xs:annotation></xs:element>
+            <xs:element name="AccessPointInfo" type="tac:AccessPointInfo" minOccurs="0" maxOccurs="unbounded"><xs:annotation>
+                <xs:documentation>List of AccessPointInfo items.</xs:documentation>
+              </xs:annotation></xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <!--===============================-->
+      <xs:element name="GetAccessPointInfo">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="Token" type="pt:ReferenceToken" maxOccurs="unbounded"><xs:annotation>
+                <xs:documentation>Tokens of AccessPointInfo items to get.</xs:documentation>
+              </xs:annotation></xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <!--===============================-->
+      <xs:element name="GetAccessPointInfoResponse">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="AccessPointInfo" type="tac:AccessPointInfo" minOccurs="0" maxOccurs="unbounded"><xs:annotation>
+                <xs:documentation>List of AccessPointInfo items.</xs:documentation>
+              </xs:annotation></xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <!--===============================-->
+      <xs:element name="GetAreaInfoList">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="Limit" type="xs:int" minOccurs="0"><xs:annotation>
+                <xs:documentation>Maximum number of entries to return. If not specified, less than one or higher than what the device supports, the number of items is determined by the device.</xs:documentation>
+              </xs:annotation></xs:element>
+            <xs:element name="StartReference" type="xs:string" minOccurs="0"><xs:annotation>
+                <xs:documentation>Start returning entries from this start reference. If not specified, entries shall start from the beginning of the dataset.</xs:documentation>
+              </xs:annotation></xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <!--===============================-->
+      <xs:element name="GetAreaInfoListResponse">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="NextStartReference" type="xs:string" minOccurs="0"><xs:annotation>
+                <xs:documentation>StartReference to use in next call to get the following items. If absent, no more items to get.</xs:documentation>
+              </xs:annotation></xs:element>
+            <xs:element name="AreaInfo" type="tac:AreaInfo" minOccurs="0" maxOccurs="unbounded"><xs:annotation>
+                <xs:documentation>List of AreaInfo items.</xs:documentation>
+              </xs:annotation></xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <!--===============================-->
+      <xs:element name="GetAreaInfo">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="Token" type="pt:ReferenceToken" maxOccurs="unbounded"><xs:annotation>
+                <xs:documentation>Tokens of AreaInfo items to get.</xs:documentation>
+              </xs:annotation></xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <!--===============================-->
+      <xs:element name="GetAreaInfoResponse">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="AreaInfo" type="tac:AreaInfo" minOccurs="0" maxOccurs="unbounded"><xs:annotation>
+                <xs:documentation>List of AreaInfo items.</xs:documentation>
+              </xs:annotation></xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <!--===============================-->
+      <xs:element name="GetAccessPointState">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="Token" type="pt:ReferenceToken"><xs:annotation>
+                <xs:documentation>Token of AccessPoint instance to get AccessPointState for.</xs:documentation>
+              </xs:annotation></xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <!--===============================-->
+      <xs:element name="GetAccessPointStateResponse">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="AccessPointState" type="tac:AccessPointState"><xs:annotation>
+                <xs:documentation>AccessPointState item.</xs:documentation>
+              </xs:annotation></xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <!--===============================-->
+      <xs:element name="EnableAccessPoint">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="Token" type="pt:ReferenceToken"><xs:annotation>
+                <xs:documentation>Token of the AccessPoint instance to enable.</xs:documentation>
+              </xs:annotation></xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <!--===============================-->
+      <xs:element name="EnableAccessPointResponse">
+        <xs:complexType>
+          <xs:sequence>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <!--===============================-->
+      <xs:element name="DisableAccessPoint">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="Token" type="pt:ReferenceToken"><xs:annotation>
+                <xs:documentation>Token of the AccessPoint instance to disable.</xs:documentation>
+              </xs:annotation></xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <!--===============================-->
+      <xs:element name="DisableAccessPointResponse">
+        <xs:complexType>
+          <xs:sequence>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <!--===============================-->
+      <xs:element name="ExternalAuthorization">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="AccessPointToken" type="pt:ReferenceToken"><xs:annotation>
+                <xs:documentation>Token of the Access Point instance.</xs:documentation>
+              </xs:annotation></xs:element>
+            <xs:element name="CredentialToken" type="pt:ReferenceToken" minOccurs="0"><xs:annotation>
+                <xs:documentation>Optional token of the Credential involved.</xs:documentation>
+              </xs:annotation></xs:element>
+            <xs:element name="Reason" type="xs:string" minOccurs="0"><xs:annotation>
+                <xs:documentation>Optional reason for decision.</xs:documentation>
+              </xs:annotation></xs:element>
+            <xs:element name="Decision" type="tac:Decision"><xs:annotation>
+                <xs:documentation>Decision - Granted or Denied.</xs:documentation>
+              </xs:annotation></xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <!--===============================-->
+      <xs:element name="ExternalAuthorizationResponse">
+        <xs:complexType>
+          <xs:sequence>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <!--===============================-->
+    </xs:schema>
+  </wsdl:types>
+  <!--===============================-->
+  <wsdl:message name="GetServiceCapabilitiesRequest">
+    <wsdl:part name="parameters" element="tac:GetServiceCapabilities"/>
+  </wsdl:message>
+  <wsdl:message name="GetServiceCapabilitiesResponse">
+    <wsdl:part name="parameters" element="tac:GetServiceCapabilitiesResponse"/>
+  </wsdl:message>
+  <!--===============================-->
+  <wsdl:message name="GetAccessPointInfoListRequest">
+    <wsdl:part name="parameters" element="tac:GetAccessPointInfoList"/>
+  </wsdl:message>
+  <wsdl:message name="GetAccessPointInfoListResponse">
+    <wsdl:part name="parameters" element="tac:GetAccessPointInfoListResponse"/>
+  </wsdl:message>
+  <!--===============================-->
+  <wsdl:message name="GetAccessPointInfoRequest">
+    <wsdl:part name="parameters" element="tac:GetAccessPointInfo"/>
+  </wsdl:message>
+  <wsdl:message name="GetAccessPointInfoResponse">
+    <wsdl:part name="parameters" element="tac:GetAccessPointInfoResponse"/>
+  </wsdl:message>
+  <!--===============================-->
+  <wsdl:message name="GetAreaInfoListRequest">
+    <wsdl:part name="parameters" element="tac:GetAreaInfoList"/>
+  </wsdl:message>
+  <wsdl:message name="GetAreaInfoListResponse">
+    <wsdl:part name="parameters" element="tac:GetAreaInfoListResponse"/>
+  </wsdl:message>
+  <!--===============================-->
+  <wsdl:message name="GetAreaInfoRequest">
+    <wsdl:part name="parameters" element="tac:GetAreaInfo"/>
+  </wsdl:message>
+  <wsdl:message name="GetAreaInfoResponse">
+    <wsdl:part name="parameters" element="tac:GetAreaInfoResponse"/>
+  </wsdl:message>
+  <!--===============================-->
+  <wsdl:message name="GetAccessPointStateRequest">
+    <wsdl:part name="parameters" element="tac:GetAccessPointState"/>
+  </wsdl:message>
+  <wsdl:message name="GetAccessPointStateResponse">
+    <wsdl:part name="parameters" element="tac:GetAccessPointStateResponse"/>
+  </wsdl:message>
+  <!--===============================-->
+  <wsdl:message name="EnableAccessPointRequest">
+    <wsdl:part name="parameters" element="tac:EnableAccessPoint"/>
+  </wsdl:message>
+  <wsdl:message name="EnableAccessPointResponse">
+    <wsdl:part name="parameters" element="tac:EnableAccessPointResponse"/>
+  </wsdl:message>
+  <!--===============================-->
+  <wsdl:message name="DisableAccessPointRequest">
+    <wsdl:part name="parameters" element="tac:DisableAccessPoint"/>
+  </wsdl:message>
+  <wsdl:message name="DisableAccessPointResponse">
+    <wsdl:part name="parameters" element="tac:DisableAccessPointResponse"/>
+  </wsdl:message>
+  <!--===============================-->
+  <wsdl:message name="ExternalAuthorizationRequest">
+    <wsdl:part name="parameters" element="tac:ExternalAuthorization"/>
+  </wsdl:message>
+  <wsdl:message name="ExternalAuthorizationResponse">
+    <wsdl:part name="parameters" element="tac:ExternalAuthorizationResponse"/>
+  </wsdl:message>
+  <!--===============================-->
+  <!--====== Faults messages ========-->
+  <wsdl:portType name="PACSPort">
+    <wsdl:operation name="GetServiceCapabilities">
+    <wsdl:documentation>
+This operation returns the capabilities of the Access Control service.
+&lt;/p&gt;&lt;p&gt;
+An ONVIF compliant device which provides the Access Control service shall
+implement this method.
+</wsdl:documentation>
+      <wsdl:input message="tac:GetServiceCapabilitiesRequest"/>
+      <wsdl:output message="tac:GetServiceCapabilitiesResponse"/>
+    </wsdl:operation>
+    <wsdl:operation name="GetAccessPointInfoList">
+    <wsdl:documentation>
+This operation requests a list of all AccessPointInfo items provided by the device.
+An ONVIF compliant device which provides the Access Control service shall implement this method.
+&lt;/p&gt;&lt;p&gt;
+A call to this method shall return a StartReference when not all data is returned and more
+data is available. The reference shall be valid for retrieving the next set of data.
+Please refer section [Retrieving system configuration] for more details.
+&lt;/p&gt;&lt;p&gt;
+The number of items returned shall not be greater than Limit parameter.
+&lt;/p&gt;&lt;p&gt;
+</wsdl:documentation>
+      <wsdl:input message="tac:GetAccessPointInfoListRequest"/>
+      <wsdl:output message="tac:GetAccessPointInfoListResponse"/>
+    </wsdl:operation>
+    <wsdl:operation name="GetAccessPointInfo">
+    <wsdl:documentation>
+This operation requests a list of AccessPointInfo items matching the given tokens.
+&lt;/p&gt;&lt;p&gt;
+An ONVIF compliant device which provides Access Control service shall implement this method.
+&lt;/p&gt;&lt;p&gt;
+The device shall ignore tokens it cannot resolve and shall return an empty list if there
+are no items matching specified tokens. The device shall not return a fault in this case.
+&lt;/p&gt;&lt;p&gt;
+If the number of requested items is greater than MaxLimit, a TooManyItems
+fault shall be returned.
+&lt;/p&gt;&lt;p&gt;
+</wsdl:documentation>
+      <wsdl:input message="tac:GetAccessPointInfoRequest"/>
+      <wsdl:output message="tac:GetAccessPointInfoResponse"/>
+    </wsdl:operation>
+    <wsdl:operation name="GetAreaInfoList">
+    <wsdl:documentation>
+This operation requests a list of all AreaInfo items provided by the device.
+An ONVIF compliant device which provides the Access Control service shall implement this method.
+&lt;/p&gt;&lt;p&gt;
+A call to this method shall return a StartReference when not all data is returned and more
+data is available. The reference shall be valid for retrieving the next set of data.
+Please refer section [Retrieving system configuration] for more details.
+&lt;/p&gt;&lt;p&gt;
+The number of items returned shall not be greater than Limit parameter.
+&lt;/p&gt;&lt;p&gt;
+
+</wsdl:documentation>
+      <wsdl:input message="tac:GetAreaInfoListRequest"/>
+      <wsdl:output message="tac:GetAreaInfoListResponse"/>
+    </wsdl:operation>
+    <wsdl:operation name="GetAreaInfo">
+    <wsdl:documentation>
+This operation requests a list of AreaInfo items matching the given tokens.
+&lt;/p&gt;&lt;p&gt;
+An ONVIF compliant device which provides Access Control service shall implement this method.
+&lt;/p&gt;&lt;p&gt;
+The device shall ignore tokens it cannot resolve and shall return an empty list if there
+are no items matching specified tokens. The device shall not return a fault in this case.
+&lt;/p&gt;&lt;p&gt;
+If the number of requested items is greater than MaxLimit, a TooManyItems
+fault shall be returned.
+&lt;/p&gt;&lt;p&gt;
+</wsdl:documentation>
+      <wsdl:input message="tac:GetAreaInfoRequest"/>
+      <wsdl:output message="tac:GetAreaInfoResponse"/>
+    </wsdl:operation>
+    <wsdl:operation name="GetAccessPointState">
+    <wsdl:documentation>
+This operation requests the AccessPointState for the AccessPoint instance specified by Token.
+&lt;/p&gt;&lt;p&gt;
+An ONVIF compliant device that provides Access Control service shall implement this method.
+</wsdl:documentation>
+      <wsdl:input message="tac:GetAccessPointStateRequest"/>
+      <wsdl:output message="tac:GetAccessPointStateResponse"/>
+    </wsdl:operation>
+    <wsdl:operation name="EnableAccessPoint">
+    <wsdl:documentation>
+This operation allows enabling an access point.
+&lt;/p&gt;&lt;p&gt;
+A device that signals support for DisableAccessPoint capability for a particular AccessPoint
+instance shall implement this command.
+&lt;/p&gt;&lt;p&gt;
+</wsdl:documentation>
+      <wsdl:input message="tac:EnableAccessPointRequest"/>
+      <wsdl:output message="tac:EnableAccessPointResponse"/>
+    </wsdl:operation>
+    <wsdl:operation name="DisableAccessPoint">
+    <wsdl:documentation>
+This operation allows disabling an access point.
+&lt;/p&gt;&lt;p&gt;
+A device that signals support for DisableAccessPoint capability for a particular AccessPoint
+instance shall implement this command.
+&lt;/p&gt;&lt;p&gt;
+</wsdl:documentation>
+      <wsdl:input message="tac:DisableAccessPointRequest"/>
+      <wsdl:output message="tac:DisableAccessPointResponse"/>
+    </wsdl:operation>
+    <wsdl:operation name="ExternalAuthorization">
+    <wsdl:documentation>
+This operation allows to Deny or Grant decision at an AccessPoint instance.
+&lt;/p&gt;&lt;p&gt;
+A device that signals support for ExternalAuthorization capability for a particular
+AccessPoint instance shall implement this method.
+</wsdl:documentation>
+      <wsdl:input message="tac:ExternalAuthorizationRequest"/>
+      <wsdl:output message="tac:ExternalAuthorizationResponse"/>
+    </wsdl:operation>
+  </wsdl:portType>
+  <!--===============================-->
+  <wsdl:binding name="PACSBinding" type="tac:PACSPort">
+<wsdl:documentation>
+Copyright (c) 2010-2013 by ONVIF: Open Network Video Interface Forum. All rights reserved.<br/>
+This is the initial minimized version of the Access Control service 
+aimed at the first PACS Profile C. <br/>
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+The AccessControl service implements the Authentication and 
+Authorization functionality and controls the actions to get 
+access to various Access Points controlling access to Doors and Areas. <br/>
+ 
+ 
+The basic data structures used by the service are: 
+ 
+* CredentialInfo holding basic information of a credential.<br/> 
+* AccessPointInfo holding basic information on how access is controlled in 
+one direction for a door (from which area to which area) defined in the DoorControl service.<br/> 
+ 
+ 
+
+</wsdl:documentation>
+    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+  <!--===============================-->
+    <wsdl:operation name="GetServiceCapabilities">
+      <soap:operation soapAction="http://www.onvif.org/ver10/accesscontrol/wsdl/GetServiceCapabilities"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <!--===============================-->
+    <wsdl:operation name="GetAccessPointInfoList">
+      <soap:operation soapAction="http://www.onvif.org/ver10/accesscontrol/wsdl/GetAccessPointInfoList"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <!--===============================-->
+    <wsdl:operation name="GetAccessPointInfo">
+      <soap:operation soapAction="http://www.onvif.org/ver10/accesscontrol/wsdl/GetAccessPointInfo"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <!--===============================-->
+    <wsdl:operation name="GetAreaInfoList">
+      <soap:operation soapAction="http://www.onvif.org/ver10/accesscontrol/wsdl/GetAreaInfoList"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <!--===============================-->
+    <wsdl:operation name="GetAreaInfo">
+      <soap:operation soapAction="http://www.onvif.org/ver10/accesscontrol/wsdl/GetAreaInfo"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <!--===============================-->
+    <wsdl:operation name="GetAccessPointState">
+      <soap:operation soapAction="http://www.onvif.org/ver10/accesscontrol/wsdl/GetAccessPointState"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <!--===============================-->
+    <wsdl:operation name="EnableAccessPoint">
+      <soap:operation soapAction="http://www.onvif.org/ver10/accesscontrol/wsdl/EnableAccessPoint"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <!--===============================-->
+    <wsdl:operation name="DisableAccessPoint">
+      <soap:operation soapAction="http://www.onvif.org/ver10/accesscontrol/wsdl/DisableAccessPoint"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <!--===============================-->
+    <wsdl:operation name="ExternalAuthorization">
+      <soap:operation soapAction="http://www.onvif.org/ver10/accesscontrol/wsdl/ExternalAuthorization"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <!--===============================-->
+  </wsdl:binding>
+  <wsdl:service name="PACSService">
+      <wsdl:port name="PACSPort" binding="tac:PACSBinding">
+          <soap:address location="http://192.168.0.51:8888/onvif/PACS"/>
+      </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>

File diff suppressed because it is too large
+ 1270 - 0
resource/wsdl/actionengine.wsdl


+ 149 - 0
resource/wsdl/addressing

@@ -0,0 +1,149 @@
+<?xml version="1.0"?>
+<!-- 
+Copyright © 2002-2004 BEA Systems Inc., International Business Machines Corporation, 
+Microsoft Corporation, Inc, SAP AG, and Sun Microsystems, Inc.. All rights reserved. 
+
+Permission to copy, display, perform, modify and distribute the WS-Addressing Specification, 
+and to authorize others to do the foregoing, in any medium without fee or royalty is hereby
+granted for the purpose of developing and evaluating the WS-Addressing Specification.
+
+BEA, IBM, Microsoft, SAP AG, and Sun Microsystems (collectively, the "Authors") each agree 
+to grant a license to third parties, under royalty-free  and otherwise reasonable, 
+non-discriminatory terms and conditions, to their respective essential patent claims that
+they deem necessary to implement the WS-Addressing Specification.
+
+DISCLAIMERS:
+
+THE WS-Addressing Specification IS PROVIDED "AS IS", AND THE AUTHORS 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 THE WS-Addressing Specification IS SUITABLE FOR ANY PURPOSE; NOR THAT THE 
+IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, 
+TRADEMARKS OR OTHER RIGHTS.
+
+THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL 
+DAMAGES ARISING OUT OF ANY USE OF THE WS-Addressing Specification OR THE PERFORMANCE OR 
+IMPLEMENTATION OF THE CONTENTS THEREOF.
+
+You may remove these disclaimers from your modified versions of the WS-Addressing 
+Specification provided that you effectively disclaim all warranties and liabilities on behalf 
+of all copyright holders in the copies of any such modified versions you distribute.
+
+The name and trademarks of the Authors may NOT be used in any manner, including advertising 
+or publicity pertaining to the WS-Addressing Specification or its contents without specific, 
+written prior permission. Title to copyright in the WS-Addressing Specification will at all 
+times remain with the Authors.
+
+No other rights are granted by implication, estoppel or otherwise.
+
+-->
+<xs:schema targetNamespace="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" elementFormDefault="qualified" blockDefault="#all">
+  <!-- //////////////////// WS-Addressing //////////////////// -->
+  <!-- Endpoint reference -->
+  <xs:element name="EndpointReference" type="wsa:EndpointReferenceType"/>
+  <xs:complexType name="EndpointReferenceType">
+    <xs:sequence>
+      <xs:element name="Address" type="wsa:AttributedURI"/>
+      <xs:element name="ReferenceProperties" type="wsa:ReferencePropertiesType" minOccurs="0"/>
+      <xs:element name="ReferenceParameters" type="wsa:ReferenceParametersType" minOccurs="0"/>
+      <xs:element name="PortType" type="wsa:AttributedQName" minOccurs="0"/>
+      <xs:element name="ServiceName" type="wsa:ServiceNameType" minOccurs="0"/>
+      <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
+        <xs:annotation>
+          <xs:documentation>
+					 If "Policy" elements from namespace "http://schemas.xmlsoap.org/ws/2002/12/policy#policy" are used, they must appear first (before any extensibility elements).
+					</xs:documentation>
+        </xs:annotation>
+      </xs:any>
+    </xs:sequence>
+    <xs:anyAttribute namespace="##other" processContents="lax"/>
+  </xs:complexType>
+  <xs:complexType name="ReferencePropertiesType">
+    <xs:sequence>
+      <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="ReferenceParametersType">
+    <xs:sequence>
+      <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="ServiceNameType">
+    <xs:simpleContent>
+      <xs:extension base="xs:QName">
+        <xs:attribute name="PortName" type="xs:NCName"/>
+        <xs:anyAttribute namespace="##other" processContents="lax"/>
+      </xs:extension>
+    </xs:simpleContent>
+  </xs:complexType>
+  <!-- Message information header blocks -->
+  <xs:element name="MessageID" type="wsa:AttributedURI"/>
+  <xs:element name="RelatesTo" type="wsa:Relationship"/>
+  <xs:element name="To" type="wsa:AttributedURI"/>
+  <xs:element name="Action" type="wsa:AttributedURI"/>
+  <xs:element name="From" type="wsa:EndpointReferenceType"/>
+  <xs:element name="ReplyTo" type="wsa:EndpointReferenceType"/>
+  <xs:element name="FaultTo" type="wsa:EndpointReferenceType"/>
+  <xs:complexType name="Relationship">
+    <xs:simpleContent>
+      <xs:extension base="xs:anyURI">
+        <xs:attribute name="RelationshipType" type="xs:QName" use="optional"/>
+        <xs:anyAttribute namespace="##other" processContents="lax"/>
+      </xs:extension>
+    </xs:simpleContent>
+  </xs:complexType>
+  <xs:simpleType name="RelationshipTypeValues">
+    <xs:restriction base="xs:QName">
+      <xs:enumeration value="wsa:Reply"/>
+    </xs:restriction>
+  </xs:simpleType>
+  <!--
+    June 19, 2007: The ReplyAfter element is deprecated. The name of this element does not match the
+    name (RetryAfter) used in the specification (http://www.w3.org/Submission/2004/SUBM-ws-addressing-20040810/).
+  -->
+  <xs:element name="ReplyAfter" type="wsa:ReplyAfterType"/>
+  <xs:complexType name="ReplyAfterType">
+    <xs:simpleContent>
+      <xs:extension base="xs:nonNegativeInteger">
+        <xs:anyAttribute namespace="##other"/>
+      </xs:extension>
+    </xs:simpleContent>
+  </xs:complexType>
+  <!--
+    June 19, 2007: The RetryAfter element has been added to be consistent with the specification
+    (http://www.w3.org/Submission/2004/SUBM-ws-addressing-20040810/).
+  -->
+  <xs:element name="RetryAfter" type="wsa:RetryAfterType"/>
+  <xs:complexType name="RetryAfterType">
+    <xs:simpleContent>
+      <xs:extension base="xs:nonNegativeInteger">
+        <xs:anyAttribute namespace="##other"/>
+      </xs:extension>
+    </xs:simpleContent>
+  </xs:complexType>
+  <xs:simpleType name="FaultSubcodeValues">
+    <xs:restriction base="xs:QName">
+      <xs:enumeration value="wsa:InvalidMessageInformationHeader"/>
+      <xs:enumeration value="wsa:MessageInformationHeaderRequired"/>
+      <xs:enumeration value="wsa:DestinationUnreachable"/>
+      <xs:enumeration value="wsa:ActionNotSupported"/>
+      <xs:enumeration value="wsa:EndpointUnavailable"/>
+    </xs:restriction>
+  </xs:simpleType>
+  <xs:attribute name="Action" type="xs:anyURI"/>
+  <!-- Common declarations and definitions -->
+  <xs:complexType name="AttributedQName">
+    <xs:simpleContent>
+      <xs:extension base="xs:QName">
+        <xs:anyAttribute namespace="##other" processContents="lax"/>
+      </xs:extension>
+    </xs:simpleContent>
+  </xs:complexType>
+  <xs:complexType name="AttributedURI">
+    <xs:simpleContent>
+      <xs:extension base="xs:anyURI">
+        <xs:anyAttribute namespace="##other" processContents="lax"/>
+      </xs:extension>
+    </xs:simpleContent>
+  </xs:complexType>
+</xs:schema>

File diff suppressed because it is too large
+ 1628 - 0
resource/wsdl/advancedsecurity.wsdl


File diff suppressed because it is too large
+ 528 - 0
resource/wsdl/analytics.wsdl


File diff suppressed because it is too large
+ 714 - 0
resource/wsdl/analyticsdevice.wsdl


File diff suppressed because it is too large
+ 580 - 0
resource/wsdl/b-2.xsd


File diff suppressed because it is too large
+ 83 - 0
resource/wsdl/bf-2.xsd


File diff suppressed because it is too large
+ 448 - 0
resource/wsdl/bw-2.wsdl


File diff suppressed because it is too large
+ 1311 - 0
resource/wsdl/deviceio.wsdl


File diff suppressed because it is too large
+ 3783 - 0
resource/wsdl/devicemgmt.wsdl


File diff suppressed because it is too large
+ 522 - 0
resource/wsdl/display.wsdl


File diff suppressed because it is too large
+ 1069 - 0
resource/wsdl/doorcontrol.wsdl


+ 126 - 0
resource/wsdl/envelope

@@ -0,0 +1,126 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!-- Schema for the SOAP/1.1 envelope
+
+Portions © 2001 DevelopMentor. 
+© 2001 W3C (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved.  
+ 
+This document is governed by the W3C Software License [1] as described in the FAQ [2].
+[1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
+[2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD 
+By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions:
+
+Permission to use, copy, modify, and distribute this software and its documentation, with or without modification,  for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications, that you make:
+
+1.  The full text of this NOTICE in a location viewable to users of the redistributed or derivative work. 
+
+2.  Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, a short notice of the following form (hypertext is preferred, text is permitted) should be used within the body of any redistributed or derivative code: "Copyright © 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/" 
+
+3.  Notice of any changes or modifications to the W3C files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)   
+
+Original W3C files; http://www.w3.org/2001/06/soap-envelope
+Changes made: 
+     - reverted namespace to http://schemas.xmlsoap.org/soap/envelope/
+     - reverted mustUnderstand to only allow 0 and 1 as lexical values
+	 - made encodingStyle a global attribute 20020825
+	 - removed default value from mustUnderstand attribute declaration
+
+THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
+
+The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
+
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+           xmlns:tns="http://schemas.xmlsoap.org/soap/envelope/"
+           targetNamespace="http://schemas.xmlsoap.org/soap/envelope/" >
+
+     
+  <!-- Envelope, header and body -->
+  <xs:element name="Envelope" type="tns:Envelope" />
+  <xs:complexType name="Envelope" >
+    <xs:sequence>
+      <xs:element ref="tns:Header" minOccurs="0" />
+      <xs:element ref="tns:Body" minOccurs="1" />
+      <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax" />
+    </xs:sequence>
+    <xs:anyAttribute namespace="##other" processContents="lax" />
+  </xs:complexType>
+
+  <xs:element name="Header" type="tns:Header" />
+  <xs:complexType name="Header" >
+    <xs:sequence>
+      <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax" />
+    </xs:sequence>
+    <xs:anyAttribute namespace="##other" processContents="lax" />
+  </xs:complexType>
+  
+  <xs:element name="Body" type="tns:Body" />
+  <xs:complexType name="Body" >
+    <xs:sequence>
+      <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax" />
+    </xs:sequence>
+    <xs:anyAttribute namespace="##any" processContents="lax" >
+	  <xs:annotation>
+	    <xs:documentation>
+		  Prose in the spec does not specify that attributes are allowed on the Body element
+		</xs:documentation>
+	  </xs:annotation>
+	</xs:anyAttribute>
+  </xs:complexType>
+
+       
+  <!-- Global Attributes.  The following attributes are intended to be usable via qualified attribute names on any complex type referencing them.  -->
+  <xs:attribute name="mustUnderstand" >	
+     <xs:simpleType>
+     <xs:restriction base='xs:boolean'>
+	   <xs:pattern value='0|1' />
+	 </xs:restriction>
+   </xs:simpleType>
+  </xs:attribute>
+  <xs:attribute name="actor" type="xs:anyURI" />
+
+  <xs:simpleType name="encodingStyle" >
+    <xs:annotation>
+	  <xs:documentation>
+	    'encodingStyle' indicates any canonicalization conventions followed in the contents of the containing element.  For example, the value 'http://schemas.xmlsoap.org/soap/encoding/' indicates the pattern described in SOAP specification
+	  </xs:documentation>
+	</xs:annotation>
+    <xs:list itemType="xs:anyURI" />
+  </xs:simpleType>
+
+  <xs:attribute name="encodingStyle" type="tns:encodingStyle" />
+  <xs:attributeGroup name="encodingStyle" >
+    <xs:attribute ref="tns:encodingStyle" />
+  </xs:attributeGroup>
+
+  <xs:element name="Fault" type="tns:Fault" />
+  <xs:complexType name="Fault" final="extension" >
+    <xs:annotation>
+	  <xs:documentation>
+	    Fault reporting structure
+	  </xs:documentation>
+	</xs:annotation>
+    <xs:sequence>
+      <xs:element name="faultcode" type="xs:QName" />
+      <xs:element name="faultstring" type="xs:string" />
+      <xs:element name="faultactor" type="xs:anyURI" minOccurs="0" />
+      <xs:element name="detail" type="tns:detail" minOccurs="0" />      
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="detail">
+    <xs:sequence>
+      <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax" />
+    </xs:sequence>
+    <xs:anyAttribute namespace="##any" processContents="lax" /> 
+  </xs:complexType>
+
+</xs:schema>
+
+
+
+
+
+

File diff suppressed because it is too large
+ 736 - 0
resource/wsdl/events.wsdl


File diff suppressed because it is too large
+ 400 - 0
resource/wsdl/imaging.wsdl


+ 13 - 0
resource/wsdl/include

@@ -0,0 +1,13 @@
+<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>

File diff suppressed because it is too large
+ 3687 - 0
resource/wsdl/media.wsdl


File diff suppressed because it is too large
+ 8551 - 0
resource/wsdl/onvif.xsd


File diff suppressed because it is too large
+ 1297 - 0
resource/wsdl/ptz.wsdl


File diff suppressed because it is too large
+ 50 - 0
resource/wsdl/r-2.xsd


File diff suppressed because it is too large
+ 403 - 0
resource/wsdl/receiver.wsdl


File diff suppressed because it is too large
+ 934 - 0
resource/wsdl/recording.wsdl


File diff suppressed because it is too large
+ 93 - 0
resource/wsdl/remotediscovery.wsdl


File diff suppressed because it is too large
+ 221 - 0
resource/wsdl/replay.wsdl


File diff suppressed because it is too large
+ 54 - 0
resource/wsdl/rw-2.wsdl


File diff suppressed because it is too large
+ 887 - 0
resource/wsdl/search.wsdl


File diff suppressed because it is too large
+ 185 - 0
resource/wsdl/t-1.xsd


+ 82 - 0
resource/wsdl/types.xsd

@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (c) 2010-2013 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.0">
+      <!--====== 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:schema>

+ 144 - 0
resource/wsdl/ws-addr.xsd

@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    W3C XML Schema defined in the Web Services Addressing 1.0 specification
+    http://www.w3.org/TR/ws-addr-core
+
+   Copyright © 2005 World Wide Web Consortium,
+
+   (Massachusetts Institute of Technology, European Research Consortium for
+   Informatics and Mathematics, Keio University). All Rights Reserved. This
+   work is distributed under the W3C® Software License [1] in the hope that
+   it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+   [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+
+   $Id: ws-addr.xsd,v 1.4 2008/07/14 18:48:47 plehegar Exp $
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.w3.org/2005/08/addressing" targetNamespace="http://www.w3.org/2005/08/addressing" blockDefault="#all" elementFormDefault="qualified" finalDefault="" attributeFormDefault="unqualified">
+	
+	<!-- Constructs from the WS-Addressing Core -->
+
+	<xs:element name="EndpointReference" type="tns:EndpointReferenceType"/>
+	<xs:complexType name="EndpointReferenceType" mixed="false">
+		<xs:sequence>
+			<xs:element name="Address" type="tns:AttributedURIType"/>
+			<xs:element name="ReferenceParameters" type="tns:ReferenceParametersType" minOccurs="0"/>
+			<xs:element ref="tns:Metadata" minOccurs="0"/>
+			<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+		</xs:sequence>
+		<xs:anyAttribute namespace="##other" processContents="lax"/>
+	</xs:complexType>
+	
+	<xs:complexType name="ReferenceParametersType" mixed="false">
+		<xs:sequence>
+			<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+		</xs:sequence>
+		<xs:anyAttribute namespace="##other" processContents="lax"/>
+	</xs:complexType>
+	
+	<xs:element name="Metadata" type="tns:MetadataType"/>
+	<xs:complexType name="MetadataType" mixed="false">
+		<xs:sequence>
+			<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+		</xs:sequence>
+		<xs:anyAttribute namespace="##other" processContents="lax"/>
+	</xs:complexType>
+	
+	<xs:element name="MessageID" type="tns:AttributedURIType"/>
+	<xs:element name="RelatesTo" type="tns:RelatesToType"/>
+	<xs:complexType name="RelatesToType" mixed="false">
+		<xs:simpleContent>
+			<xs:extension base="xs:anyURI">
+				<xs:attribute name="RelationshipType" type="tns:RelationshipTypeOpenEnum" use="optional" default="http://www.w3.org/2005/08/addressing/reply"/>
+				<xs:anyAttribute namespace="##other" processContents="lax"/>
+			</xs:extension>
+		</xs:simpleContent>
+	</xs:complexType>
+	
+	<xs:simpleType name="RelationshipTypeOpenEnum">
+		<xs:union memberTypes="tns:RelationshipType xs:anyURI"/>
+	</xs:simpleType>
+	
+	<xs:simpleType name="RelationshipType">
+		<xs:restriction base="xs:anyURI">
+			<xs:enumeration value="http://www.w3.org/2005/08/addressing/reply"/>
+		</xs:restriction>
+	</xs:simpleType>
+	
+	<xs:element name="ReplyTo" type="tns:EndpointReferenceType"/>
+	<xs:element name="From" type="tns:EndpointReferenceType"/>
+	<xs:element name="FaultTo" type="tns:EndpointReferenceType"/>
+	<xs:element name="To" type="tns:AttributedURIType"/>
+	<xs:element name="Action" type="tns:AttributedURIType"/>
+
+	<xs:complexType name="AttributedURIType" mixed="false">
+		<xs:simpleContent>
+			<xs:extension base="xs:anyURI">
+				<xs:anyAttribute namespace="##other" processContents="lax"/>
+			</xs:extension>
+		</xs:simpleContent>
+	</xs:complexType>
+	
+	<!-- Constructs from the WS-Addressing SOAP binding -->
+
+	<xs:attribute name="IsReferenceParameter" type="xs:boolean"/>
+	
+	<xs:simpleType name="FaultCodesOpenEnumType">
+		<xs:union memberTypes="tns:FaultCodesType xs:QName"/>
+	</xs:simpleType>
+	
+	<xs:simpleType name="FaultCodesType">
+		<xs:restriction base="xs:QName">
+			<xs:enumeration value="tns:InvalidAddressingHeader"/>
+			<xs:enumeration value="tns:InvalidAddress"/>
+			<xs:enumeration value="tns:InvalidEPR"/>
+			<xs:enumeration value="tns:InvalidCardinality"/>
+			<xs:enumeration value="tns:MissingAddressInEPR"/>
+			<xs:enumeration value="tns:DuplicateMessageID"/>
+			<xs:enumeration value="tns:ActionMismatch"/>
+			<xs:enumeration value="tns:MessageAddressingHeaderRequired"/>
+			<xs:enumeration value="tns:DestinationUnreachable"/>
+			<xs:enumeration value="tns:ActionNotSupported"/>
+			<xs:enumeration value="tns:EndpointUnavailable"/>
+		</xs:restriction>
+	</xs:simpleType>
+	
+	<xs:element name="RetryAfter" type="tns:AttributedUnsignedLongType"/>
+	<xs:complexType name="AttributedUnsignedLongType" mixed="false">
+		<xs:simpleContent>
+			<xs:extension base="xs:unsignedLong">
+				<xs:anyAttribute namespace="##other" processContents="lax"/>
+			</xs:extension>
+		</xs:simpleContent>
+	</xs:complexType>
+	
+	<xs:element name="ProblemHeaderQName" type="tns:AttributedQNameType"/>
+	<xs:complexType name="AttributedQNameType" mixed="false">
+		<xs:simpleContent>
+			<xs:extension base="xs:QName">
+				<xs:anyAttribute namespace="##other" processContents="lax"/>
+			</xs:extension>
+		</xs:simpleContent>
+	</xs:complexType>
+	
+	<xs:element name="ProblemHeader" type="tns:AttributedAnyType"/>
+	<xs:complexType name="AttributedAnyType" mixed="false">
+		<xs:sequence>
+			<xs:any namespace="##any" processContents="lax" minOccurs="1" maxOccurs="1"/>
+		</xs:sequence>
+		<xs:anyAttribute namespace="##other" processContents="lax"/>
+	</xs:complexType>
+	
+	<xs:element name="ProblemIRI" type="tns:AttributedURIType"/>
+	
+	<xs:element name="ProblemAction" type="tns:ProblemActionType"/>
+	<xs:complexType name="ProblemActionType" mixed="false">
+		<xs:sequence>
+			<xs:element ref="tns:Action" minOccurs="0"/>
+			<xs:element name="SoapAction" minOccurs="0" type="xs:anyURI"/>
+		</xs:sequence>
+		<xs:anyAttribute namespace="##other" processContents="lax"/>
+	</xs:complexType>
+	
+</xs:schema>

+ 272 - 0
resource/wsdl/ws-discovery.xsd

@@ -0,0 +1,272 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Copyright Notice
+
+(c) 2004-2005 Microsoft Corporation, Inc. All rights reserved.
+
+Permission to copy, display, perform, modify and distribute the 
+WS-Discovery Specification (the "Specification", which includes 
+WSDL and schema documents), and to authorize others to do the 
+foregoing, in any medium without fee or royalty is hereby granted 
+for the purpose of developing and evaluating the Specification.
+
+BEA Systems, Canon, Intel, Microsoft, and webMethods, Inc. 
+(collectively, the "Co-Developers") each agree to grant a license 
+to third parties, under royalty-free and other reasonable, 
+non-discriminatory terms and conditions, to their respective 
+essential Licensed Claims, which reasonable, non-discriminatory 
+terms and conditions may include, for example, but are not limited 
+to, an affirmation  of the obligation to grant reciprocal licenses 
+under any of the licensee's patents that are necessary to implement 
+the Specification.  
+
+DISCLAIMERS:
+
+THE SPECIFICATION IS PROVIDED "AS IS," AND THE CO-DEVELOPERS 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 THE SPECIFICATION ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE 
+IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY 
+PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+THE CO-DEVELOPERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, 
+SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY 
+USE OF THE SPECIFICATION OR THE PERFORMANCE OR IMPLEMENTATION OF 
+THE CONTENTS THEREOF.
+
+You may remove these disclaimers from your modified versions of the 
+Specification provided that you effectively disclaim all warranties 
+and liabilities on behalf of all Co-developers and any copyright 
+holders in the copies of any such modified versions you distribute.
+
+The name and trademarks of the Co-developers may NOT be used in any 
+manner, including advertising or publicity pertaining to the 
+Specification or its contents without specific, written prior 
+permission. Title to copyright in the Specification will at all 
+times remain with Microsoft.
+
+No other rights are granted by implication, estoppel or otherwise.
+
+-->
+<xs:schema
+    targetNamespace="http://schemas.xmlsoap.org/ws/2005/04/discovery"
+    xmlns:tns="http://schemas.xmlsoap.org/ws/2005/04/discovery"
+    xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    elementFormDefault="qualified"
+    blockDefault="#all" >
+
+  <xs:import
+      namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"
+      schemaLocation="http://schemas.xmlsoap.org/ws/2004/08/addressing" />
+
+  <!-- //////////////////// Discovery Messages //////////////////// -->
+
+  <xs:element name="Hello" type="tns:HelloType" />
+  <xs:complexType name="HelloType" >
+    <xs:sequence>
+      <xs:element ref="wsa:EndpointReference" />
+      <xs:element ref="tns:Types" minOccurs="0" />
+      <xs:element ref="tns:Scopes" minOccurs="0" />
+      <xs:element ref="tns:XAddrs" minOccurs="0" />
+      <xs:element ref="tns:MetadataVersion" />
+      <xs:any namespace="##other"
+              processContents="lax"
+              minOccurs="0"
+              maxOccurs="unbounded" />
+    </xs:sequence>
+    <xs:anyAttribute namespace="##other" processContents="lax" />
+  </xs:complexType>
+
+  <xs:simpleType name="RelationshipType" >
+	<xs:restriction base="xs:QName" >
+	  <xs:enumeration value="tns:Suppression" />
+	</xs:restriction>
+  </xs:simpleType>
+
+  <xs:simpleType name="OpenRelationshipType" >
+    <xs:union memberTypes="tns:RelationshipType xs:QName" />
+  </xs:simpleType>
+    
+  <xs:element name="Bye" type="tns:ByeType" />
+  <xs:complexType name="ByeType" >
+    <xs:sequence>
+      <xs:element ref="wsa:EndpointReference" />
+      <xs:element ref="tns:Types" minOccurs="0" />
+      <xs:element ref="tns:Scopes" minOccurs="0" />
+      <xs:element ref="tns:XAddrs" minOccurs="0" />
+      <xs:element ref="tns:MetadataVersion" minOccurs="0" />
+      <xs:any namespace="##other"
+              processContents="lax"
+              minOccurs="0"
+              maxOccurs="unbounded" />
+    </xs:sequence>
+    <xs:anyAttribute namespace="##other" processContents="lax" />
+  </xs:complexType>
+
+  <xs:element name="Probe" type="tns:ProbeType" />
+  <xs:complexType name="ProbeType" >
+    <xs:sequence>
+      <xs:element ref="tns:Types" minOccurs="0" />
+      <xs:element ref="tns:Scopes" minOccurs="0" />
+      <xs:any namespace="##other"
+              processContents="lax"
+              minOccurs="0"
+              maxOccurs="unbounded" />
+    </xs:sequence>
+    <xs:anyAttribute namespace="##other" processContents="lax" />
+  </xs:complexType>
+
+  <xs:element name="ProbeMatches" type="tns:ProbeMatchesType" />
+  <xs:complexType name="ProbeMatchesType" >
+    <xs:sequence>
+      <xs:element name="ProbeMatch"
+                  type="tns:ProbeMatchType"
+                  minOccurs="0"
+                  maxOccurs="unbounded" >
+      </xs:element>
+      <xs:any namespace="##other"
+              processContents="lax"
+              minOccurs="0"
+              maxOccurs="unbounded" />
+    </xs:sequence>
+    <xs:anyAttribute namespace="##other" processContents="lax" />
+  </xs:complexType>
+  <xs:complexType name="ProbeMatchType" >
+    <xs:sequence>
+      <xs:element ref="wsa:EndpointReference" />
+      <xs:element ref="tns:Types" minOccurs="0" />
+      <xs:element ref="tns:Scopes" minOccurs="0" />
+      <xs:element ref="tns:XAddrs" minOccurs="0" />
+      <xs:element ref="tns:MetadataVersion" />
+      <xs:any namespace="##other"
+              processContents="lax"
+              minOccurs="0"
+              maxOccurs="unbounded" />
+    </xs:sequence>
+    <xs:anyAttribute namespace="##other" processContents="lax" />
+  </xs:complexType>
+
+  <xs:element name="Resolve" type="tns:ResolveType" />
+  <xs:complexType name="ResolveType" >
+    <xs:sequence>
+      <xs:element ref="wsa:EndpointReference" />
+      <xs:any namespace="##other"
+              processContents="lax"
+              minOccurs="0"
+              maxOccurs="unbounded" />
+    </xs:sequence>
+    <xs:anyAttribute namespace="##other" processContents="lax" />
+  </xs:complexType>
+
+  <xs:element name="ResolveMatches" type="tns:ResolveMatchesType" />
+  <xs:complexType name="ResolveMatchesType" >
+    <xs:sequence>
+      <xs:element name="ResolveMatch" 
+                  type="tns:ResolveMatchType"
+                  minOccurs="0" />
+      <xs:any namespace="##other"
+              processContents="lax"
+              minOccurs="0"
+              maxOccurs="unbounded" />
+    </xs:sequence>
+    <xs:anyAttribute namespace="##other" processContents="lax" />
+  </xs:complexType>
+  <xs:complexType name="ResolveMatchType" >
+    <xs:sequence>
+      <xs:element ref="wsa:EndpointReference" />
+      <xs:element ref="tns:Types" minOccurs="0" />
+      <xs:element ref="tns:Scopes" minOccurs="0" />
+      <xs:element ref="tns:XAddrs" />
+      <xs:element ref="tns:MetadataVersion" />
+      <xs:any namespace="##other"
+              processContents="lax"
+              minOccurs="0"
+              maxOccurs="unbounded" />
+    </xs:sequence>
+    <xs:anyAttribute namespace="##other" processContents="lax" />
+  </xs:complexType>
+
+  <xs:element name="Types" type="tns:QNameListType" />
+  <xs:simpleType name="QNameListType" >
+    <xs:list itemType="xs:QName" />
+  </xs:simpleType>
+
+  <xs:element name="Scopes" type="tns:ScopesType" />
+  <xs:complexType name="ScopesType" >
+    <xs:simpleContent>
+      <xs:extension base="tns:UriListType" >
+        <xs:attribute name="MatchBy" type="xs:anyURI" />
+        <xs:anyAttribute namespace="##other" processContents="lax" />
+      </xs:extension>
+    </xs:simpleContent>
+  </xs:complexType>
+
+  <xs:element name="XAddrs" type="tns:UriListType" />
+  <xs:simpleType name="UriListType" >
+    <xs:list itemType="xs:anyURI" />
+  </xs:simpleType>
+
+  <xs:element name="MetadataVersion" type="xs:unsignedInt" />
+
+  <!-- //////////////////// Faults //////////////////// -->
+
+  <xs:simpleType name="FaultCodeType" >
+	<xs:restriction base="xs:QName" >
+	  <xs:enumeration value="tns:MatchingRuleNotSupported" />
+	</xs:restriction>
+  </xs:simpleType>
+  <xs:simpleType name="FaultCodeOpenType" >
+    <xs:union memberTypes="tns:FaultCodeType xs:QName" />
+  </xs:simpleType>
+
+  <xs:element name="SupportedMatchingRules" type="tns:UriListType" />
+
+  <!-- //////////////////// Compact Signature //////////////////// -->
+
+  <xs:attribute name="Id" type="xs:ID"/>
+
+  <xs:element name="Security" type="tns:SecurityType" />
+  <xs:complexType name="SecurityType" >
+    <xs:sequence>
+      <xs:element ref="tns:Sig" minOccurs="0" />
+    </xs:sequence>
+    <xs:anyAttribute namespace="##other" processContents="lax" />
+  </xs:complexType> 
+
+  <xs:element name="Sig" type="tns:SigType" />
+  <xs:complexType name="SigType" >
+    <xs:sequence>
+      <xs:any namespace="##other"
+              processContents="lax"
+              minOccurs="0"
+              maxOccurs="unbounded" />
+    </xs:sequence>
+    <xs:attribute name="Scheme" type="xs:anyURI" use="required" />
+    <xs:attribute name="KeyId" type="xs:base64Binary" />
+    <xs:attribute name="Refs" type="xs:IDREFS" use="required" />
+    <xs:attribute name="Sig" type="xs:base64Binary" use="required" />
+    <xs:anyAttribute namespace="##other" processContents="lax" />
+  </xs:complexType> 
+
+  <!-- //////////////////// General Headers //////////////////// -->
+
+  <xs:element name="AppSequence" type="tns:AppSequenceType" />
+  <xs:complexType name="AppSequenceType" >
+    <xs:complexContent>
+      <xs:restriction base="xs:anyType" >
+        <xs:attribute name="InstanceId"
+                      type="xs:unsignedInt"
+                      use="required" />
+        <xs:attribute name="SequenceId" type="xs:anyURI" />
+        <xs:attribute name="MessageNumber"
+                      type="xs:unsignedInt"
+                      use="required" />
+        <xs:anyAttribute namespace="##other" processContents="lax" />
+      </xs:restriction>
+    </xs:complexContent>
+  </xs:complexType>
+
+</xs:schema>

+ 287 - 0
resource/wsdl/xml.xsd

@@ -0,0 +1,287 @@
+<?xml version='1.0'?>
+<?xml-stylesheet href="../2008/09/xsd.xsl" type="text/xsl"?>
+<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" 
+  xmlns:xs="http://www.w3.org/2001/XMLSchema" 
+  xmlns   ="http://www.w3.org/1999/xhtml"
+  xml:lang="en">
+
+ <xs:annotation>
+  <xs:documentation>
+   <div>
+    <h1>About the XML namespace</h1>
+
+    <div class="bodytext">
+     <p>
+      This schema document describes the XML namespace, in a form
+      suitable for import by other schema documents.
+     </p>
+     <p>
+      See <a href="http://www.w3.org/XML/1998/namespace.html">
+      http://www.w3.org/XML/1998/namespace.html</a> and
+      <a href="http://www.w3.org/TR/REC-xml">
+      http://www.w3.org/TR/REC-xml</a> for information 
+      about this namespace.
+     </p>
+     <p>
+      Note that local names in this namespace are intended to be
+      defined only by the World Wide Web Consortium or its subgroups.
+      The names currently defined in this namespace are listed below.
+      They should not be used with conflicting semantics by any Working
+      Group, specification, or document instance.
+     </p>
+     <p>   
+      See further below in this document for more information about <a
+      href="#usage">how to refer to this schema document from your own
+      XSD schema documents</a> and about <a href="#nsversioning">the
+      namespace-versioning policy governing this schema document</a>.
+     </p>
+    </div>
+   </div>
+  </xs:documentation>
+ </xs:annotation>
+
+ <xs:attribute name="lang">
+  <xs:annotation>
+   <xs:documentation>
+    <div>
+     
+      <h3>lang (as an attribute name)</h3>
+      <p>
+       denotes an attribute whose value
+       is a language code for the natural language of the content of
+       any element; its value is inherited.  This name is reserved
+       by virtue of its definition in the XML specification.</p>
+     
+    </div>
+    <div>
+     <h4>Notes</h4>
+     <p>
+      Attempting to install the relevant ISO 2- and 3-letter
+      codes as the enumerated possible values is probably never
+      going to be a realistic possibility.  
+     </p>
+     <p>
+      See BCP 47 at <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt">
+       http://www.rfc-editor.org/rfc/bcp/bcp47.txt</a>
+      and the IANA language subtag registry at
+      <a href="http://www.iana.org/assignments/language-subtag-registry">
+       http://www.iana.org/assignments/language-subtag-registry</a>
+      for further information.
+     </p>
+     <p>
+      The union allows for the 'un-declaration' of xml:lang with
+      the empty string.
+     </p>
+    </div>
+   </xs:documentation>
+  </xs:annotation>
+  <xs:simpleType>
+   <xs:union memberTypes="xs:language">
+    <xs:simpleType>    
+     <xs:restriction base="xs:string">
+      <xs:enumeration value=""/>
+     </xs:restriction>
+    </xs:simpleType>
+   </xs:union>
+  </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="space">
+  <xs:annotation>
+   <xs:documentation>
+    <div>
+     
+      <h3>space (as an attribute name)</h3>
+      <p>
+       denotes an attribute whose
+       value is a keyword indicating what whitespace processing
+       discipline is intended for the content of the element; its
+       value is inherited.  This name is reserved by virtue of its
+       definition in the XML specification.</p>
+     
+    </div>
+   </xs:documentation>
+  </xs:annotation>
+  <xs:simpleType>
+   <xs:restriction base="xs:NCName">
+    <xs:enumeration value="default"/>
+    <xs:enumeration value="preserve"/>
+   </xs:restriction>
+  </xs:simpleType>
+ </xs:attribute>
+ 
+ <xs:attribute name="base" type="xs:anyURI"> <xs:annotation>
+   <xs:documentation>
+    <div>
+     
+      <h3>base (as an attribute name)</h3>
+      <p>
+       denotes an attribute whose value
+       provides a URI to be used as the base for interpreting any
+       relative URIs in the scope of the element on which it
+       appears; its value is inherited.  This name is reserved
+       by virtue of its definition in the XML Base specification.</p>
+     
+     <p>
+      See <a
+      href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a>
+      for information about this attribute.
+     </p>
+    </div>
+   </xs:documentation>
+  </xs:annotation>
+ </xs:attribute>
+ 
+ <xs:attribute name="id" type="xs:ID">
+  <xs:annotation>
+   <xs:documentation>
+    <div>
+     
+      <h3>id (as an attribute name)</h3> 
+      <p>
+       denotes an attribute whose value
+       should be interpreted as if declared to be of type ID.
+       This name is reserved by virtue of its definition in the
+       xml:id specification.</p>
+     
+     <p>
+      See <a
+      href="http://www.w3.org/TR/xml-id/">http://www.w3.org/TR/xml-id/</a>
+      for information about this attribute.
+     </p>
+    </div>
+   </xs:documentation>
+  </xs:annotation>
+ </xs:attribute>
+
+ <xs:attributeGroup name="specialAttrs">
+  <xs:attribute ref="xml:base"/>
+  <xs:attribute ref="xml:lang"/>
+  <xs:attribute ref="xml:space"/>
+  <xs:attribute ref="xml:id"/>
+ </xs:attributeGroup>
+
+ <xs:annotation>
+  <xs:documentation>
+   <div>
+   
+    <h3>Father (in any context at all)</h3> 
+
+    <div class="bodytext">
+     <p>
+      denotes Jon Bosak, the chair of 
+      the original XML Working Group.  This name is reserved by 
+      the following decision of the W3C XML Plenary and 
+      XML Coordination groups:
+     </p>
+     <blockquote>
+       <p>
+	In appreciation for his vision, leadership and
+	dedication the W3C XML Plenary on this 10th day of
+	February, 2000, reserves for Jon Bosak in perpetuity
+	the XML name "xml:Father".
+       </p>
+     </blockquote>
+    </div>
+   </div>
+  </xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+  <xs:documentation>
+   <div xml:id="usage" id="usage">
+    <h2><a name="usage">About this schema document</a></h2>
+
+    <div class="bodytext">
+     <p>
+      This schema defines attributes and an attribute group suitable
+      for use by schemas wishing to allow <code>xml:base</code>,
+      <code>xml:lang</code>, <code>xml:space</code> or
+      <code>xml:id</code> attributes on elements they define.
+     </p>
+     <p>
+      To enable this, such a schema must import this schema for
+      the XML namespace, e.g. as follows:
+     </p>
+     <pre>
+          &lt;schema . . .>
+           . . .
+           &lt;import namespace="http://www.w3.org/XML/1998/namespace"
+                      schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+     </pre>
+     <p>
+      or
+     </p>
+     <pre>
+           &lt;import namespace="http://www.w3.org/XML/1998/namespace"
+                      schemaLocation="http://www.w3.org/2009/01/xml.xsd"/>
+     </pre>
+     <p>
+      Subsequently, qualified reference to any of the attributes or the
+      group defined below will have the desired effect, e.g.
+     </p>
+     <pre>
+          &lt;type . . .>
+           . . .
+           &lt;attributeGroup ref="xml:specialAttrs"/>
+     </pre>
+     <p>
+      will define a type which will schema-validate an instance element
+      with any of those attributes.
+     </p>
+    </div>
+   </div>
+  </xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+  <xs:documentation>
+   <div id="nsversioning" xml:id="nsversioning">
+    <h2><a name="nsversioning">Versioning policy for this schema document</a></h2>
+    <div class="bodytext">
+     <p>
+      In keeping with the XML Schema WG's standard versioning
+      policy, this schema document will persist at
+      <a href="http://www.w3.org/2009/01/xml.xsd">
+       http://www.w3.org/2009/01/xml.xsd</a>.
+     </p>
+     <p>
+      At the date of issue it can also be found at
+      <a href="http://www.w3.org/2001/xml.xsd">
+       http://www.w3.org/2001/xml.xsd</a>.
+     </p>
+     <p>
+      The schema document at that URI may however change in the future,
+      in order to remain compatible with the latest version of XML
+      Schema itself, or with the XML namespace itself.  In other words,
+      if the XML Schema or XML namespaces change, the version of this
+      document at <a href="http://www.w3.org/2001/xml.xsd">
+       http://www.w3.org/2001/xml.xsd 
+      </a> 
+      will change accordingly; the version at 
+      <a href="http://www.w3.org/2009/01/xml.xsd">
+       http://www.w3.org/2009/01/xml.xsd 
+      </a> 
+      will not change.
+     </p>
+     <p>
+      Previous dated (and unchanging) versions of this schema 
+      document are at:
+     </p>
+     <ul>
+      <li><a href="http://www.w3.org/2009/01/xml.xsd">
+	http://www.w3.org/2009/01/xml.xsd</a></li>
+      <li><a href="http://www.w3.org/2007/08/xml.xsd">
+	http://www.w3.org/2007/08/xml.xsd</a></li>
+      <li><a href="http://www.w3.org/2004/10/xml.xsd">
+	http://www.w3.org/2004/10/xml.xsd</a></li>
+      <li><a href="http://www.w3.org/2001/03/xml.xsd">
+	http://www.w3.org/2001/03/xml.xsd</a></li>
+     </ul>
+    </div>
+   </div>
+  </xs:documentation>
+ </xs:annotation>
+
+</xs:schema>
+

+ 49 - 0
resource/wsdl/xmlmime

@@ -0,0 +1,49 @@
+<?xml version="1.0" ?>
+<!-- 
+   W3C XML Schema defined in the Describing Media Content of Binary Data in XML
+   specification
+     http://www.w3.org/TR/xml-media-types
+
+   Copyright © 2005 World Wide Web Consortium,
+  
+   (Massachusetts Institute of Technology, European Research Consortium for
+   Informatics and Mathematics, Keio University). All Rights Reserved. This
+   work is distributed under the W3C® Software License [1] in the hope that
+   it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+  
+   [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+
+   $Id: xmlmime.xsd,v 1.1 2005/04/25 17:08:35 hugo Exp $
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+           xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
+           targetNamespace="http://www.w3.org/2005/05/xmlmime" >
+
+  <xs:attribute name="contentType">
+    <xs:simpleType>
+      <xs:restriction base="xs:string" >
+      <xs:minLength value="3" />
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:attribute>
+
+  <xs:attribute name="expectedContentTypes" type="xs:string" />
+
+  <xs:complexType name="base64Binary" >
+    <xs:simpleContent>
+        <xs:extension base="xs:base64Binary" >
+            <xs:attribute ref="xmime:contentType" />
+        </xs:extension>
+    </xs:simpleContent>
+  </xs:complexType>
+
+  <xs:complexType name="hexBinary" >
+    <xs:simpleContent>
+        <xs:extension base="xs:hexBinary" >
+            <xs:attribute ref="xmime:contentType" />
+        </xs:extension>
+    </xs:simpleContent>
+  </xs:complexType>
+
+</xs:schema>

+ 8 - 8
schedule.py

@@ -7,7 +7,7 @@ import threading
 
 from plugins import ipc
 
-global_schedule_config = {}
+global_schedule_config = None
 
 
 class Schedule:
@@ -26,11 +26,11 @@ class Schedule:
 
     def deliver(self):
         if self.monitor_config is None:
-            logging.debug('[SCHEDULE] deliver get monitor config but None')
+            logging.error('[SCHEDULE] deliver get monitor config but None')
             return
 
         if not self.monitor_config.__contains__('data'):
-            logging.debug('[SCHEDULE] deliver get config but no field "data"')
+            logging.error('[SCHEDULE] deliver get config but no field "data"')
             return
 
         data = self.monitor_config['data']
@@ -50,8 +50,8 @@ class Schedule:
                 logging.error('[SCHEDULE] deliver parse item but received invalid plugin type: %s', plugin_type)
                 continue
 
-            plugin = self.plugins[plugin_type]()
-            thread = threading.Thread(target=plugin.exec, kwargs=item)
+            plugin = self.plugins[plugin_type](**item)
+            thread = threading.Thread(target=plugin.exec)
             thread.setDaemon(True)
             thread.start()
 
@@ -61,7 +61,7 @@ class Schedule:
         disable = []
         for item in data_list:
             # filter if item is disable
-            if not isinstance(item, object):
+            if not isinstance(item, dict):
                 disable.append(item)
                 continue
             if not item.__contains__('host'):
@@ -88,9 +88,9 @@ class Schedule:
 
             # set default value if item doesn't contain the key
             if not item.__contains__('expr'):
-                item.expr = 0
+                item['expr'] = 0
             if not item.__contains__('kpi'):
-                item.kpi = {}
+                item['kpi'] = {}
 
             enable.append(item)
 

+ 268 - 0
schedule_test.py

@@ -0,0 +1,268 @@
+#!/usr/bin/env python
+# -*- coding:utf-8 -*-
+
+import unittest
+from plugins import base
+import uuid
+import logging
+from threading import Lock
+import datetime
+import schedule
+import time
+
+mock_lock = Lock()
+fail_num = success_num = 0
+
+
+class MockPlugin(base.Base):
+    def __init__(self, *args, **kwargs):
+        super(MockPlugin, self).__init__(*args, **kwargs)
+        if kwargs.__contains__('name'):
+            self.name = kwargs['name']
+        else:
+            self.name = 'ipc' + uuid.uuid1().hex[0:10]
+
+        self.host = kwargs['host']
+        self.port = kwargs['port']
+        self.user = kwargs['username']
+        self.password = kwargs['pwd']
+        self.args = args
+        self.kwargs = kwargs
+
+    def name(self):
+        return self.name
+
+    def config_check(self, *args, **kwargs):
+        if kwargs.__contains__('error'):
+            return kwargs['error']
+        return None
+
+    @staticmethod
+    def record(is_success):
+        global success_num, fail_num
+        mock_lock.acquire()
+        if is_success:
+            success_num += 1
+        else:
+            fail_num += 1
+        mock_lock.release()
+
+    def exec(self):
+        err = self.config_check(**self.kwargs)
+        if err is not None:
+            logging.error('[MockPlugin] check config error: %s', err)
+            self.record(False)
+            return
+        self.record(True)
+
+
+class ScheduleTest(unittest.TestCase):
+    @staticmethod
+    def generate_valid_config(success_count, fail_count):
+        config = {
+            'id': int(datetime.datetime.now().timestamp())
+        }
+        data = []
+        for i in range(success_count):
+            item = {
+                'host': 'local.pc',
+                'port': 2000,
+                'dev_id': uuid.uuid1(),
+                'type': 'mock_plugin',
+                'schema': 'onvif',
+                'username': 'admin',
+                'pwd': '123456',
+                'expr': 10,
+                'kpi': {
+                    'key1': 1
+                }
+            }
+            data.append(item)
+        for i in range(fail_count):
+            item = {
+                'host': 'local.pc',
+                'port': 2000,
+                'dev_id': uuid.uuid1(),
+                'type': 'mock_plugin',
+                'schema': 'onvif',
+                'username': 'admin',
+                'pwd': '123456',
+                'expr': 10,
+                'kpi': {
+                    'key1': 1
+                },
+                'error': 'data error'
+            }
+            data.append(item)
+        config['data'] = data
+        return config
+
+    @staticmethod
+    def generate_invalid_config(count):
+        config = {
+            'id': int(datetime.datetime.now().timestamp())
+        }
+        keys = ['host', 'port', 'dev_id', 'type', 'schema', 'username', 'pwd']
+        data = []
+        for count_index in range(count):
+            item = {}
+            index = count_index % len(keys)
+            for i, k in enumerate(keys):
+                if index == i:
+                    continue
+                if k == 'port':
+                    item['port'] = 2000
+                if k == 'type':
+                    item['type'] = 'invalid_type'
+                else:
+                    item[k] = k
+            data.append(item)
+        config['data'] = data
+        return config
+
+    @staticmethod
+    def generate_non_object(count):
+        config = {
+            'id': int(datetime.datetime.now().timestamp())
+        }
+        data = []
+        for index in range(count):
+            data.append(index)
+        config['data'] = data
+        return config
+
+    @staticmethod
+    def reset():
+        global success_num, fail_num
+        success_num = 0
+        fail_num = 0
+
+    def test_schedule_serial(self):
+        # config is None
+        scheduler = schedule.Schedule(None)
+        scheduler.plugins = {
+            'mock_plugin': MockPlugin
+        }
+        scheduler.deliver()
+        time.sleep(1)
+        self.assertEqual(0, success_num)
+        self.assertEqual(0, fail_num)
+        self.reset()
+
+        # config have no field data
+        scheduler = schedule.Schedule({'id': int(datetime.datetime.now().timestamp())})
+        scheduler.plugins = {
+            'mock_plugin': MockPlugin
+        }
+        scheduler.deliver()
+        time.sleep(1)
+        self.assertEqual(0, success_num)
+        self.assertEqual(0, fail_num)
+        self.reset()
+
+        # config.data is not list
+        scheduler = schedule.Schedule({
+            'id': int(datetime.datetime.now().timestamp()),
+            'data': 10
+        })
+        scheduler.plugins = {
+            'mock_plugin': MockPlugin
+        }
+        scheduler.deliver()
+        time.sleep(1)
+        self.assertEqual(0, success_num)
+        self.assertEqual(0, fail_num)
+        self.reset()
+
+        # valid config, 10 success, 10 fail.
+        config = self.generate_valid_config(10, 10)
+        scheduler = schedule.Schedule(config)
+        scheduler.plugins = {
+            'mock_plugin': MockPlugin
+        }
+        scheduler.deliver()
+        time.sleep(1)
+        self.assertEqual(10, success_num)
+        self.assertEqual(10, fail_num)
+        self.reset()
+
+        # invalid config, 0 success, 0 fail.
+        config = self.generate_invalid_config(10)
+        scheduler = schedule.Schedule(config)
+        scheduler.plugins = {
+            'mock_plugin': MockPlugin
+        }
+        scheduler.deliver()
+        time.sleep(1)
+        # As invalid config, plugin won't be execute.
+        self.assertEqual(0, success_num)
+        self.assertEqual(0, fail_num)
+        self.reset()
+
+        # non-object config, 0 success, 0 fail.
+        config = self.generate_non_object(10)
+        scheduler = schedule.Schedule(config)
+        scheduler.plugins = {
+            'mock_plugin': MockPlugin
+        }
+        scheduler.deliver()
+        time.sleep(1)
+        self.assertEqual(0, success_num)
+        self.assertEqual(0, fail_num)
+        self.reset()
+
+        # invalid plugin type, 5 success, 0 fail
+        config = self.generate_valid_config(10, 0)
+        config_data = config['data']
+        for index, item in enumerate(config_data):
+            if index == 5:
+                break
+            config_data[index]['type'] = 'mock_type'
+            del config_data[index]['expr']
+            del config_data[index]['kpi']
+        config['data'] = config_data
+        scheduler = schedule.Schedule(config)
+        scheduler.plugins = {
+            'mock_plugin': MockPlugin
+        }
+        scheduler.deliver()
+        time.sleep(1)
+        self.assertEqual(5, success_num)
+        self.assertEqual(0, fail_num)
+        self.reset()
+
+        # multi config, 10 success, 10 fail
+        config_data = [None]
+        config = self.generate_valid_config(10, 10)
+        invalid_config = self.generate_invalid_config(10)
+        non_object_config = self.generate_non_object(10)
+        invalid_type_config = self.generate_valid_config(10, 0)
+        invalid_type_data = invalid_type_config['data']
+        for index, item in enumerate(invalid_type_data):
+            invalid_type_data[index]['type'] = 'mock_type'
+
+        config_data = config_data + config['data']
+        config_data = config_data + invalid_config['data']
+        config_data = config_data + non_object_config['data']
+        config_data = config_data + invalid_type_data
+        config['data'] = config_data
+
+        # check config
+        self.assertEqual(len(config_data), 51)
+
+        scheduler = schedule.Schedule(config)
+        scheduler.plugins = {
+            'mock_plugin': MockPlugin
+        }
+        scheduler.deliver()
+        time.sleep(1)
+        self.assertEqual(10, success_num)
+        self.assertEqual(10, fail_num)
+        self.reset()
+
+    def test_schedule_concurrent(self):
+        pass
+
+
+if __name__ == '__main__':
+    unittest.main()

+ 0 - 0
test/image/README.md


+ 0 - 0
test/official/README.md


+ 4 - 4
upload.py

@@ -58,8 +58,8 @@ class Handle:
 
     @staticmethod
     def content_format(content):
-        if not content.__contains__('dev_ip'):
-            content['dev_ip'] = ''
+        if not content.__contains__('host'):
+            content['host'] = ''
         if not content.__contains__('expr'):
             content['expr'] = 1
         if not content.__contains__('dev_id'):
@@ -72,8 +72,8 @@ class Handle:
             content['schema'] = ''
         if not content.__contains__('timestamp'):
             content['timestamp'] = int(datetime.datetime.now().timestamp() * 1000)
-        if not content.__contains__('login_name'):
-            content['login_name'] = ''
+        if not content.__contains__('username'):
+            content['username'] = ''
         # if not content.__contains__('pwd'):
         #     content['pwd'] = ''
         if not content.__contains__('kpi'):