From ba95a18a33b496c139407ae7e97a076011bad723 Mon Sep 17 00:00:00 2001 From: rajmohan4 Date: Mon, 27 Jan 2025 11:39:30 +0530 Subject: [PATCH] first commit --- .gitignore | 25 + LICENSE | 201 + README.md | 37 + intellij-style.xml | 598 + onvif-java/pom.xml | 133 + .../main/java/de/onvif/beans/DeviceInfo.java | 79 + .../de/onvif/discovery/DeviceDiscovery.java | 252 + .../de/onvif/discovery/OnvifDiscovery.java | 15 + .../java/de/onvif/soap/NaiveSSLHelper.java | 92 + .../main/java/de/onvif/soap/OnvifDevice.java | 362 + .../main/java/de/onvif/soap/SSLUtilities.java | 282 + .../de/onvif/soap/SimpleSecurityHandler.java | 172 + .../main/java/de/onvif/utils/OnvifUtils.java | 68 + .../src/main/resources/log4j.properties | 7 + .../test/java/org/onvif/client/AuthTest.java | 40 + .../java/org/onvif/client/Base64Test.java | 28 + .../org/onvif/client/DiscoverAndTest.java | 74 + .../java/org/onvif/client/DiscoveryTest.java | 18 + .../java/org/onvif/client/GetTestDevice.java | 132 + .../java/org/onvif/client/ONVIFClient.java | 150 + .../org/onvif/client/OnvifCredentials.java | 55 + .../client/ReadCommandsFromStdInput.java | 96 + .../java/org/onvif/client/SimpleTest.java | 325 + .../java/org/onvif/client/SoapClient.java | 82 + .../java/org/onvif/client/TestDevice.java | 196 + .../org/onvif/client/WsNotificationTest.java | 182 + .../src/test/resources/onvif.properties | 2 + onvif-java/src/test/resources/output.xml | 3 + onvif-ws-client/pom.xml | 189 + onvif-ws-client/src/main/java/.gitignore | 1 + .../resources/wsdl/accesscontrol_1.0.wsdl | 931 ++ .../main/resources/wsdl/accessrules_1.0.wsdl | 695 ++ .../resources/wsdl/advancedsecurity_1.2.wsdl | 3236 +++++ .../main/resources/wsdl/deviceio_2.6.1.wsdl | 1589 +++ .../main/resources/wsdl/devicemgmt_2.5.wsdl | 4483 +++++++ .../main/resources/wsdl/display_2.1.1.wsdl | 579 + .../main/resources/wsdl/doorcontrol_1.0.wsdl | 1336 ++ .../src/main/resources/wsdl/event_2.6.wsdl | 878 ++ .../src/main/resources/wsdl/imaging_2.5.wsdl | 442 + .../main/resources/wsdl/jax-ws-catalog.xml | 20 + .../local/docs.oasis-open.org/wsn/b-2.xsd | 582 + .../local/docs.oasis-open.org/wsn/bw-2.wsdl | 447 + .../local/docs.oasis-open.org/wsn/t-1.xsd | 184 + .../local/docs.oasis-open.org/wsrf/bf-2.xsd | 84 + .../local/docs.oasis-open.org/wsrf/r-2.xsd | 49 + .../local/docs.oasis-open.org/wsrf/rw-2.wsdl | 53 + .../local/schemas.xmlsoap.org/soap/envelope | 126 + .../schemas.xmlsoap.org/ws/2004/08/addressing | 149 + .../ws/2005/04/discovery/ws-discovery.xsd | 272 + .../local/www.onvif.org/ver10/pacs/types.xsd | 89 + .../www.onvif.org/ver10/schema/onvif.xsd | 10136 ++++++++++++++++ .../www.onvif.org/ver10/topics/topicns.xml | 12 + .../wsdl/local/www.w3.org/2001/xml.xsd | 321 + .../local/www.w3.org/2003/05/soap-envelope | 165 + .../wsdl/local/www.w3.org/2004/08/xop/include | 13 + .../wsdl/local/www.w3.org/2005/05/xmlmime | 49 + .../wsdl/local/www.w3.org/2005/08/addressing | 144 + .../www.w3.org/2006/03/addressing/ws-addr.xsd | 141 + .../src/main/resources/wsdl/media_2.6.wsdl | 4237 +++++++ .../src/main/resources/wsdl/ptz_2.5.wsdl | 1393 +++ .../main/resources/wsdl/receiver_2.1.1.wsdl | 423 + .../main/resources/wsdl/recording_2.5.wsdl | 1239 ++ .../resources/wsdl/remotediscovery_1.0.wsdl | 112 + .../src/main/resources/wsdl/replay_2.2.1.wsdl | 243 + .../src/main/resources/wsdl/search_2.4.2.wsdl | 1038 ++ pom.xml | 82 + 66 files changed, 39868 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md create mode 100644 intellij-style.xml create mode 100644 onvif-java/pom.xml create mode 100644 onvif-java/src/main/java/de/onvif/beans/DeviceInfo.java create mode 100644 onvif-java/src/main/java/de/onvif/discovery/DeviceDiscovery.java create mode 100644 onvif-java/src/main/java/de/onvif/discovery/OnvifDiscovery.java create mode 100644 onvif-java/src/main/java/de/onvif/soap/NaiveSSLHelper.java create mode 100644 onvif-java/src/main/java/de/onvif/soap/OnvifDevice.java create mode 100644 onvif-java/src/main/java/de/onvif/soap/SSLUtilities.java create mode 100644 onvif-java/src/main/java/de/onvif/soap/SimpleSecurityHandler.java create mode 100644 onvif-java/src/main/java/de/onvif/utils/OnvifUtils.java create mode 100644 onvif-java/src/main/resources/log4j.properties create mode 100644 onvif-java/src/test/java/org/onvif/client/AuthTest.java create mode 100644 onvif-java/src/test/java/org/onvif/client/Base64Test.java create mode 100644 onvif-java/src/test/java/org/onvif/client/DiscoverAndTest.java create mode 100644 onvif-java/src/test/java/org/onvif/client/DiscoveryTest.java create mode 100644 onvif-java/src/test/java/org/onvif/client/GetTestDevice.java create mode 100644 onvif-java/src/test/java/org/onvif/client/ONVIFClient.java create mode 100644 onvif-java/src/test/java/org/onvif/client/OnvifCredentials.java create mode 100644 onvif-java/src/test/java/org/onvif/client/ReadCommandsFromStdInput.java create mode 100644 onvif-java/src/test/java/org/onvif/client/SimpleTest.java create mode 100644 onvif-java/src/test/java/org/onvif/client/SoapClient.java create mode 100644 onvif-java/src/test/java/org/onvif/client/TestDevice.java create mode 100644 onvif-java/src/test/java/org/onvif/client/WsNotificationTest.java create mode 100644 onvif-java/src/test/resources/onvif.properties create mode 100644 onvif-java/src/test/resources/output.xml create mode 100644 onvif-ws-client/pom.xml create mode 100644 onvif-ws-client/src/main/java/.gitignore create mode 100644 onvif-ws-client/src/main/resources/wsdl/accesscontrol_1.0.wsdl create mode 100644 onvif-ws-client/src/main/resources/wsdl/accessrules_1.0.wsdl create mode 100644 onvif-ws-client/src/main/resources/wsdl/advancedsecurity_1.2.wsdl create mode 100644 onvif-ws-client/src/main/resources/wsdl/deviceio_2.6.1.wsdl create mode 100644 onvif-ws-client/src/main/resources/wsdl/devicemgmt_2.5.wsdl create mode 100644 onvif-ws-client/src/main/resources/wsdl/display_2.1.1.wsdl create mode 100644 onvif-ws-client/src/main/resources/wsdl/doorcontrol_1.0.wsdl create mode 100644 onvif-ws-client/src/main/resources/wsdl/event_2.6.wsdl create mode 100644 onvif-ws-client/src/main/resources/wsdl/imaging_2.5.wsdl create mode 100644 onvif-ws-client/src/main/resources/wsdl/jax-ws-catalog.xml create mode 100644 onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsn/b-2.xsd create mode 100644 onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsn/bw-2.wsdl create mode 100644 onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsn/t-1.xsd create mode 100644 onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsrf/bf-2.xsd create mode 100644 onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsrf/r-2.xsd create mode 100644 onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsrf/rw-2.wsdl create mode 100644 onvif-ws-client/src/main/resources/wsdl/local/schemas.xmlsoap.org/soap/envelope create mode 100644 onvif-ws-client/src/main/resources/wsdl/local/schemas.xmlsoap.org/ws/2004/08/addressing create mode 100644 onvif-ws-client/src/main/resources/wsdl/local/schemas.xmlsoap.org/ws/2005/04/discovery/ws-discovery.xsd create mode 100644 onvif-ws-client/src/main/resources/wsdl/local/www.onvif.org/ver10/pacs/types.xsd create mode 100644 onvif-ws-client/src/main/resources/wsdl/local/www.onvif.org/ver10/schema/onvif.xsd create mode 100644 onvif-ws-client/src/main/resources/wsdl/local/www.onvif.org/ver10/topics/topicns.xml create mode 100644 onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2001/xml.xsd create mode 100644 onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2003/05/soap-envelope create mode 100644 onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2004/08/xop/include create mode 100644 onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2005/05/xmlmime create mode 100644 onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2005/08/addressing create mode 100644 onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2006/03/addressing/ws-addr.xsd create mode 100644 onvif-ws-client/src/main/resources/wsdl/media_2.6.wsdl create mode 100644 onvif-ws-client/src/main/resources/wsdl/ptz_2.5.wsdl create mode 100644 onvif-ws-client/src/main/resources/wsdl/receiver_2.1.1.wsdl create mode 100644 onvif-ws-client/src/main/resources/wsdl/recording_2.5.wsdl create mode 100644 onvif-ws-client/src/main/resources/wsdl/remotediscovery_1.0.wsdl create mode 100644 onvif-ws-client/src/main/resources/wsdl/replay_2.2.1.wsdl create mode 100644 onvif-ws-client/src/main/resources/wsdl/search_2.4.2.wsdl create mode 100644 pom.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b25ef05 --- /dev/null +++ b/.gitignore @@ -0,0 +1,25 @@ +*target* +*.jar +*.war +*.ear +*.class + +# eclipse specific git ignore +*.pydevproject +.project +.metadata +bin/** +*.tmp +*.bak +*~.nib +*~ +*.swp +*.swo + +.idea/** +.idea + +local.properties +.classpath +.settings/ +.loadpath \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md new file mode 100644 index 0000000..942c106 --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# Java ONVIF (Open Network Video Interface Forum) + +ONVIF is a community to standardize communication between IP-based security products (like cameras). + +This project aims to improve https://github.com/milg0/onvif-java-lib.
+I've tried to convice its author to use to my code but it seems we have different objectives: my goal is to create a project that focus on the funny part of the development of an ONVIF application, **keeping the interaction with the WS as simple as possible** and delege that annoying part to Apache CXF in order to not waste the developer time in writing (and MAINTAINING) code that interacts with ONVIF web services.
+My wish is to help other developers willing to contribute to an enterprise-level Java library for ONVIF devices. + +Apported improvements +============= +* Project **mavenization** and **modularization** (separation between Java stubs and application) and +* WS client generation using Apache CXF maven plugin (declaring the specific Onvif specification of each wsdl) +* maintainability and extendability of the overall code +* Separation of Test/examples from other code + +Rebuilding WS stubs +============= + +If you need to change the list of managed WSDLs (in onvif/onvif-ws-client/src/main/resources/wsdl) and thus you need to regenerate the WS Java stubs using the [Apache CXF codegen maven plugin](http://cxf.apache.org/docs/maven-cxf-codegen-plugin-wsdl-to-java.html), you need to go through the following steps: + 1. **Download Onvif WSDLs** to onvif/onvif-ws-client/src/main/resources/wsdl appending the version before the .wsdl suffix. + For example, from main dir (onvif) use you can run the following shell commmand:
+```wget http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl onvif-ws-client/src/main/resources/wsdl/devicemgmt_2.5.wsdl ``` + 1. **Update WSDLLocations constants (if needed)** within class *de.onvif.utils.WSDLLocations* (module onvif-java) + 1. **Add required url-rewriting rules (if needed)** to onvif/onvif-ws-client/src/main/resources/wsdl/jax-ws-catalog.xml + 1. Delete old Java classes in onvif/onvif-ws-client/src/main/java + 1. **Run the class generation command**: decomment goal and phase of cxf-codegen-plugin in onvif-ws-client pom.xml and run ```mvn clean install``` + 1. To see how to properly add a new ONVIF service to OnvifDevice look into OnvifDevice.init() + +TODOS +============= +My next goals are: + 1. Create an active community of enthusiastic developers (the crazier you are, the better) + 1. Write a more comprehensive examples (e.g. subscribe to an event notification, use I/O ports, etc...) + 1. Create consistent Onvif specifications tags (at least for onvif-ws-client). For example: 2.4, 2.5, etc... + 1. Fix WS-Discovery example (with my camera it doesn't work at all) + 1. Write a simple UI to test the device functionalities + 1. Fix offline mode (xml files in *local* folder) diff --git a/intellij-style.xml b/intellij-style.xml new file mode 100644 index 0000000..cf29951 --- /dev/null +++ b/intellij-style.xml @@ -0,0 +1,598 @@ + + + + + + diff --git a/onvif-java/pom.xml b/onvif-java/pom.xml new file mode 100644 index 0000000..ddb6d6c --- /dev/null +++ b/onvif-java/pom.xml @@ -0,0 +1,133 @@ + + 4.0.0 + + org.onvif + onvif + 1.0-SNAPSHOT + + onvif-java + + + + + org.apache.cxf + cxf-rt-ws-security + ${cxf.version} + + + org.apache.cxf + cxf-rt-transports-http + ${cxf.version} + + + + + + + + + + + + + + org.onvif + onvif-ws-client + ${project.version} + + + commons-io + commons-io + 2.7 + + + commons-codec + commons-codec + 1.10 + + + org.apache.commons + commons-lang3 + 3.4 + + + + + + + com.sun.xml.messaging.saaj + saaj-impl + 1.5.1 + + + + + + + + + com.sun.activation + javax.activation + ${javax.activation.version} + + + + javax.xml.bind + jaxb-api + ${jaxb.api.version} + + + + com.sun.xml.bind + jaxb-core + 2.3.0.1 + + + + com.sun.xml.bind + jaxb-impl + ${jaxb.api.version} + + + + + + + + + org.slf4j + slf4j-simple + 1.7.26 + test + + + javax.xml.soap + javax.xml.soap-api + 1.4.0 + + + + + + \ No newline at end of file diff --git a/onvif-java/src/main/java/de/onvif/beans/DeviceInfo.java b/onvif-java/src/main/java/de/onvif/beans/DeviceInfo.java new file mode 100644 index 0000000..a067a74 --- /dev/null +++ b/onvif-java/src/main/java/de/onvif/beans/DeviceInfo.java @@ -0,0 +1,79 @@ +package de.onvif.beans; + +public class DeviceInfo { + + private String manufacturer; + private String model; + private String firmwareVersion; + private String serialNumber; + private String hardwareId; + + public DeviceInfo( + String manufacturer, + String model, + String firmwareVersion, + String serialNumber, + String hardwareId) { + super(); + this.manufacturer = manufacturer; + this.model = model; + this.firmwareVersion = firmwareVersion; + this.serialNumber = serialNumber; + this.hardwareId = hardwareId; + } + + @Override + public String toString() { + return "DeviceInfo [manufacturer=" + + manufacturer + + ", model=" + + model + + ", firmwareVersion=" + + firmwareVersion + + ", serialNumber=" + + serialNumber + + ", hardwareId=" + + hardwareId + + "]"; + } + + public String getManufacturer() { + return manufacturer; + } + + public void setManufacturer(String manufacturer) { + this.manufacturer = manufacturer; + } + + public String getModel() { + return model; + } + + public void setModel(String model) { + this.model = model; + } + + public String getFirmwareVersion() { + return firmwareVersion; + } + + public void setFirmwareVersion(String firmwareVersion) { + this.firmwareVersion = firmwareVersion; + } + + public String getSerialNumber() { + return serialNumber; + } + + public void setSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + } + + public String getHardwareId() { + return hardwareId; + } + + public void setHardwareId(String hardwareId) { + this.hardwareId = hardwareId; + } +} diff --git a/onvif-java/src/main/java/de/onvif/discovery/DeviceDiscovery.java b/onvif-java/src/main/java/de/onvif/discovery/DeviceDiscovery.java new file mode 100644 index 0000000..5feb566 --- /dev/null +++ b/onvif-java/src/main/java/de/onvif/discovery/DeviceDiscovery.java @@ -0,0 +1,252 @@ +package de.onvif.discovery; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.net.DatagramPacket; +import java.net.DatagramSocket; +import java.net.Inet4Address; +import java.net.Inet6Address; +import java.net.InetAddress; +import java.net.InterfaceAddress; +import java.net.MalformedURLException; +import java.net.NetworkInterface; +import java.net.SocketException; +import java.net.SocketTimeoutException; +import java.net.URL; +import java.nio.charset.StandardCharsets; +import java.security.SecureRandom; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Comparator; +import java.util.Enumeration; +import java.util.List; +import java.util.Random; +import java.util.TreeSet; +import java.util.UUID; +import java.util.concurrent.ConcurrentSkipListSet; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; +import javax.xml.soap.MessageFactory; +import javax.xml.soap.MimeHeaders; +import javax.xml.soap.SOAPBody; +import javax.xml.soap.SOAPException; +import javax.xml.soap.SOAPMessage; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +/** + * Device discovery class to list local accessible devices probed per UDP probe messages. + * + * @author th + * @version 0.1 + * @date 2015-06-18 + */ +@SuppressWarnings({"unused", "UseOfSystemOutOrSystemErr", "CallToPrintStackTrace"}) +public class DeviceDiscovery { + public static final String WS_DISCOVERY_SOAP_VERSION = "SOAP 1.2 Protocol"; + public static final String WS_DISCOVERY_CONTENT_TYPE = "application/soap+xml"; + public static final int WS_DISCOVERY_TIMEOUT = 4000; + public static final int WS_DISCOVERY_PORT = 3702; + public static final String WS_DISCOVERY_ADDRESS_IPv4 = "239.255.255.250"; + + /** IPv6 not supported yet. set enableIPv6 to true for testing if you need IP6 discovery. */ + public static final boolean enableIPv6 = false; + + public static final String WS_DISCOVERY_ADDRESS_IPv6 = "[FF02::C]"; + public static final String WS_DISCOVERY_PROBE_MESSAGE = + "http://schemas.xmlsoap.org/ws/2005/04/discovery/Probeurn:uuid:c032cfdd-c3ca-49dc-820e-ee6696ad63e2urn:schemas-xmlsoap-org:ws:2005:04:discovery"; + private static final Random random = new SecureRandom(); + + public static void main(String[] args) throws InterruptedException { + for (URL url : discoverWsDevicesAsUrls()) { + System.out.println("Device discovered: " + url.toString()); + } + } + + /** + * Discover WS device on the local network and returns Urls + * + * @return list of unique device urls + */ + public static Collection discoverWsDevicesAsUrls() { + return discoverWsDevicesAsUrls("", ""); + } + + /** + * Discover WS device on the local network with specified filter + * + * @param regexpProtocol url protocol matching regexp like "^http$", might be empty "" + * @param regexpPath url path matching regexp like "onvif", might be empty "" + * @return list of unique device urls filtered + */ + public static Collection discoverWsDevicesAsUrls(String regexpProtocol, String regexpPath) { + final Collection urls = + new TreeSet<>( + new Comparator() { + public int compare(URL o1, URL o2) { + return o1.toString().compareTo(o2.toString()); + } + }); + for (String key : discoverWsDevices()) { + try { + final URL url = new URL(key); + boolean ok = true; + if (regexpProtocol.length() > 0 && !url.getProtocol().matches(regexpProtocol)) ok = false; + if (regexpPath.length() > 0 && !url.getPath().matches(regexpPath)) ok = false; + // ignore ip6 hosts + if (ok && !enableIPv6 && url.getHost().startsWith("[")) ok = false; + if (ok) urls.add(url); + } catch (MalformedURLException e) { + e.printStackTrace(); + } + } + return urls; + } + + /** + * Discover WS device on the local network + * + * @return list of unique devices access strings which might be URLs in most cases + */ + public static Collection discoverWsDevices() { + final Collection addresses = new ConcurrentSkipListSet<>(); + final CountDownLatch serverStarted = new CountDownLatch(1); + final CountDownLatch serverFinished = new CountDownLatch(1); + final Collection addressList = new ArrayList<>(); + try { + final Enumeration interfaces = NetworkInterface.getNetworkInterfaces(); + if (interfaces != null) { + while (interfaces.hasMoreElements()) { + NetworkInterface anInterface = interfaces.nextElement(); + if (!anInterface.isLoopback()) { + final List interfaceAddresses = anInterface.getInterfaceAddresses(); + for (InterfaceAddress address : interfaceAddresses) { + Class clz = address.getAddress().getClass(); + + if (!enableIPv6 && address.getAddress() instanceof Inet6Address) continue; + addressList.add(address.getAddress()); + } + } + } + } + } catch (SocketException e) { + e.printStackTrace(); + } + + ExecutorService executorService = Executors.newCachedThreadPool(); + for (final InetAddress address : addressList) { + Runnable runnable = + new Runnable() { + public void run() { + try { + final String uuid = UUID.randomUUID().toString(); + final String probe = + WS_DISCOVERY_PROBE_MESSAGE.replaceAll( + "urn:uuid:.*", + "urn:uuid:" + uuid + ""); + final int port = random.nextInt(20000) + 40000; + @SuppressWarnings("SocketOpenedButNotSafelyClosed") + final DatagramSocket server = new DatagramSocket(port, address); + new Thread() { + public void run() { + try { + final DatagramPacket packet = new DatagramPacket(new byte[4096], 4096); + server.setSoTimeout(WS_DISCOVERY_TIMEOUT); + long timerStarted = System.currentTimeMillis(); + while (System.currentTimeMillis() - timerStarted < (WS_DISCOVERY_TIMEOUT)) { + serverStarted.countDown(); + server.receive(packet); + final Collection collection = + parseSoapResponseForUrls( + Arrays.copyOf(packet.getData(), packet.getLength())); + for (String key : collection) { + addresses.add(key); + } + } + } catch (SocketTimeoutException ignored) { + } catch (Exception e) { + e.printStackTrace(); + } finally { + serverFinished.countDown(); + server.close(); + } + } + }.start(); + try { + serverStarted.await(1000, TimeUnit.MILLISECONDS); + } catch (InterruptedException e) { + e.printStackTrace(); + } + if (address instanceof Inet4Address) { + server.send( + new DatagramPacket( + probe.getBytes(StandardCharsets.UTF_8), + probe.length(), + InetAddress.getByName(WS_DISCOVERY_ADDRESS_IPv4), + WS_DISCOVERY_PORT)); + } else { + if (address instanceof Inet6Address) { + if (enableIPv6) + server.send( + new DatagramPacket( + probe.getBytes(StandardCharsets.UTF_8), + probe.length(), + InetAddress.getByName(WS_DISCOVERY_ADDRESS_IPv6), + WS_DISCOVERY_PORT)); + } else { + assert (false); // unknown network type.. ignore or warn developer + } + } + + } catch (Exception e) { + e.printStackTrace(); + } + try { + serverFinished.await((WS_DISCOVERY_TIMEOUT), TimeUnit.MILLISECONDS); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + }; + executorService.submit(runnable); + } + try { + executorService.shutdown(); + executorService.awaitTermination(WS_DISCOVERY_TIMEOUT + 2000, TimeUnit.MILLISECONDS); + } catch (InterruptedException ignored) { + } + return addresses; + } + + private static Collection getNodeMatching(Node body, String regexp) { + final Collection nodes = new ArrayList<>(); + if (body.getNodeName().matches(regexp)) nodes.add(body); + if (body.getChildNodes().getLength() == 0) return nodes; + NodeList returnList = body.getChildNodes(); + for (int k = 0; k < returnList.getLength(); k++) { + final Node node = returnList.item(k); + nodes.addAll(getNodeMatching(node, regexp)); + } + return nodes; + } + + private static Collection parseSoapResponseForUrls(byte[] data) + throws SOAPException, IOException { + // System.out.println(new String(data)); + final Collection urls = new ArrayList<>(); + MessageFactory factory = MessageFactory.newInstance(WS_DISCOVERY_SOAP_VERSION); + final MimeHeaders headers = new MimeHeaders(); + headers.addHeader("Content-type", WS_DISCOVERY_CONTENT_TYPE); + SOAPMessage message = factory.createMessage(headers, new ByteArrayInputStream(data)); + SOAPBody body = message.getSOAPBody(); + for (Node node : getNodeMatching(body, ".*:XAddrs")) { + if (node.getTextContent().length() > 0) { + urls.addAll(Arrays.asList(node.getTextContent().split(" "))); + } + } + return urls; + } +} diff --git a/onvif-java/src/main/java/de/onvif/discovery/OnvifDiscovery.java b/onvif-java/src/main/java/de/onvif/discovery/OnvifDiscovery.java new file mode 100644 index 0000000..cda7008 --- /dev/null +++ b/onvif-java/src/main/java/de/onvif/discovery/OnvifDiscovery.java @@ -0,0 +1,15 @@ +package de.onvif.discovery; + +import java.net.URL; +import java.util.Collection; + +/** + * @author th + * @date 2015-06-18 + */ +public class OnvifDiscovery { + + public static Collection discoverOnvifURLs() { + return DeviceDiscovery.discoverWsDevicesAsUrls("^http$", ".*onvif.*"); + } +} diff --git a/onvif-java/src/main/java/de/onvif/soap/NaiveSSLHelper.java b/onvif-java/src/main/java/de/onvif/soap/NaiveSSLHelper.java new file mode 100644 index 0000000..ad946e1 --- /dev/null +++ b/onvif-java/src/main/java/de/onvif/soap/NaiveSSLHelper.java @@ -0,0 +1,92 @@ +package de.onvif.soap; + +import java.security.GeneralSecurityException; +import java.security.SecureRandom; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import java.util.Map; +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.KeyManager; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSession; +import javax.net.ssl.SSLSocketFactory; +import javax.net.ssl.TrustManager; +import javax.net.ssl.X509TrustManager; +import javax.xml.ws.BindingProvider; +import org.apache.cxf.configuration.jsse.TLSClientParameters; +import org.apache.cxf.transport.http.HTTPConduit; + +public class NaiveSSLHelper { + public static void makeWebServiceClientTrustEveryone(Object webServicePort) { + if (webServicePort instanceof BindingProvider) { + BindingProvider bp = (BindingProvider) webServicePort; + Map requestContext = bp.getRequestContext(); + requestContext.put(JAXWS_SSL_SOCKET_FACTORY, getTrustingSSLSocketFactory()); + requestContext.put(JAXWS_HOSTNAME_VERIFIER, new NaiveHostnameVerifier()); + } else { + throw new IllegalArgumentException( + "Web service port " + + webServicePort.getClass().getName() + + " does not implement " + + BindingProvider.class.getName()); + } + } + + public static SSLSocketFactory getTrustingSSLSocketFactory() { + return SSLSocketFactoryHolder.INSTANCE; + } + + private static SSLSocketFactory createSSLSocketFactory() { + TrustManager[] trustManagers = new TrustManager[] {new NaiveTrustManager()}; + SSLContext sslContext; + try { + sslContext = SSLContext.getInstance("TLS"); + sslContext.init(new KeyManager[0], trustManagers, new SecureRandom()); + return sslContext.getSocketFactory(); + } catch (GeneralSecurityException e) { + return null; + } + } + + public static void makeCxfWebServiceClientTrustEveryone(HTTPConduit http) { + TrustManager[] trustManagers = new TrustManager[] {new NaiveTrustManager()}; + TLSClientParameters tlsParams = new TLSClientParameters(); + tlsParams.setSecureSocketProtocol("TLS"); + tlsParams.setKeyManagers(new KeyManager[0]); + tlsParams.setTrustManagers(trustManagers); + tlsParams.setDisableCNCheck(true); + http.setTlsClientParameters(tlsParams); + } + + private interface SSLSocketFactoryHolder { + SSLSocketFactory INSTANCE = createSSLSocketFactory(); + } + + private static class NaiveHostnameVerifier implements HostnameVerifier { + @Override + public boolean verify(String hostName, SSLSession session) { + return true; + } + } + + private static class NaiveTrustManager implements X509TrustManager { + + @Override + public void checkClientTrusted(X509Certificate[] certs, String authType) + throws CertificateException {} + + @Override + public void checkServerTrusted(X509Certificate[] certs, String authType) + throws CertificateException {} + + @Override + public X509Certificate[] getAcceptedIssuers() { + return new X509Certificate[0]; + } + } + + private static final java.lang.String JAXWS_HOSTNAME_VERIFIER = + "com.sun.xml.internal.ws.transport.https.client.hostname.verifier"; + private static final java.lang.String JAXWS_SSL_SOCKET_FACTORY = + "com.sun.xml.internal.ws.transport.https.client.SSLSocketFactory"; +} diff --git a/onvif-java/src/main/java/de/onvif/soap/OnvifDevice.java b/onvif-java/src/main/java/de/onvif/soap/OnvifDevice.java new file mode 100644 index 0000000..82836bf --- /dev/null +++ b/onvif-java/src/main/java/de/onvif/soap/OnvifDevice.java @@ -0,0 +1,362 @@ +package de.onvif.soap; + +import de.onvif.beans.DeviceInfo; +import java.net.ConnectException; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.Arrays; +import java.util.Calendar; +import java.util.Date; +import java.util.TimeZone; +import java.util.concurrent.TimeUnit; +import javax.xml.soap.SOAPException; + +import javax.xml.ws.BindingProvider; +import javax.xml.ws.Holder; +import org.apache.cxf.binding.soap.Soap12; +import org.apache.cxf.binding.soap.SoapBindingConfiguration; +import org.apache.cxf.endpoint.Client; +import org.apache.cxf.frontend.ClientProxy; +import org.apache.cxf.interceptor.LoggingInInterceptor; +import org.apache.cxf.interceptor.LoggingOutInterceptor; +import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; +import org.apache.cxf.transport.http.HTTPConduit; +import org.apache.cxf.transports.http.configuration.HTTPClientPolicy; +import org.onvif.ver10.device.wsdl.Device; +import org.onvif.ver10.device.wsdl.DeviceService; +import org.onvif.ver10.events.wsdl.EventPortType; +import org.onvif.ver10.events.wsdl.EventService; +import org.onvif.ver10.media.wsdl.Media; +import org.onvif.ver10.media.wsdl.MediaService; +import org.onvif.ver10.recording.wsdl.RecordingPort; +import org.onvif.ver10.recording.wsdl.RecordingService; +import org.onvif.ver10.replay.wsdl.ReplayPort; +import org.onvif.ver10.replay.wsdl.ReplayService; +import org.onvif.ver10.schema.Capabilities; +import org.onvif.ver10.schema.CapabilityCategory; +import org.onvif.ver10.schema.DateTime; +import org.onvif.ver10.schema.MediaUri; +import org.onvif.ver10.schema.SetDateTimeType; +import org.onvif.ver10.schema.StreamSetup; +import org.onvif.ver10.schema.StreamType; +import org.onvif.ver10.schema.Transport; +import org.onvif.ver10.schema.TransportProtocol; +import org.onvif.ver20.imaging.wsdl.ImagingPort; +import org.onvif.ver20.imaging.wsdl.ImagingService; +import org.onvif.ver20.ptz.wsdl.PTZ; +import org.onvif.ver20.ptz.wsdl.PtzService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.onvif.ver10.device.wsdl.GetNetworkProtocolsResponse; +import org.onvif.ver10.schema.NetworkProtocol; + +/** + * @author Robin Dick + * @author Modified by Brad Lowe + */ +public class OnvifDevice { + private static final Logger logger = LoggerFactory.getLogger(OnvifDevice.class); + private static final String DEVICE_SERVICE = "/onvif/device_service"; + private static final String RECORDING_SERVICE = "/onvif/recording_service"; + private static final String REPLAY_SERVICE = "/onvif/replay_service"; + + private final URL url; // Example http://host:port, https://host, http://host, http://ip_address + + private Device device; + private Media media; + private RecordingPort recordings; + private ReplayPort replay; + private PTZ ptz; + private ImagingPort imaging; + private EventPortType events; + + private static boolean verbose = false; // enable/disable logging of SOAP messages + final SimpleSecurityHandler securityHandler; + + private static URL cleanURL(URL u) throws ConnectException { + if (u == null) throw new ConnectException("null url not allowed"); + String f = u.getFile(); + if (!f.isEmpty()) { + String out = u.toString().replace(f, ""); + try { + return new URL(out); + } catch (MalformedURLException e) { + throw new ConnectException("MalformedURLException " + u); + } + } + + return u; + } + /* + * @param url is http://host or http://host:port or https://host or https://host:port + * @param user Username you need to login, or "" for none + * @param password User's password to login, or "" for none + */ + public OnvifDevice(URL url, String user, String password) throws ConnectException, SOAPException { + this.url = cleanURL(url); + securityHandler = + !user.isEmpty() && !password.isEmpty() ? new SimpleSecurityHandler(user, password) : null; + init(); + } + + /** + * Initializes an Onvif device, e.g. a Network Video Transmitter (NVT) with logindata. + * + * @param deviceIp The IP address or host name of your device, you can also add a port + * @param user Username you need to login + * @param password User's password to login + * @throws ConnectException Exception gets thrown, if device isn't accessible or invalid and + * doesn't answer to SOAP messages + * @throws SOAPException + */ + public OnvifDevice(String deviceIp, String user, String password) + throws ConnectException, SOAPException, MalformedURLException { + this( + deviceIp.startsWith("http") ? new URL(deviceIp) : new URL("http://" + deviceIp), + user, + password); + } + + /** + * Initializes an Onvif device, e.g. a Network Video Transmitter (NVT) with logindata. + * + * @param hostIp The IP address of your device, you can also add a port but noch protocol (e.g. + * http://) + * @throws ConnectException Exception gets thrown, if device isn't accessible or invalid and + * doesn't answer to SOAP messages + * @throws SOAPException + */ + public OnvifDevice(String hostIp) throws ConnectException, SOAPException, MalformedURLException { + this(hostIp, null, null); + } + + /** + * Initalizes the addresses used for SOAP messages and to get the internal IP, if given IP is a + * proxy. + * + * @throws ConnectException Get thrown if device doesn't give answers to GetCapabilities() + * @throws SOAPException + */ + protected void init() throws ConnectException, SOAPException { + + DeviceService deviceService = new DeviceService(null, DeviceService.SERVICE); + + BindingProvider deviceServicePort = (BindingProvider) deviceService.getDevicePort(); + this.device = + getServiceProxy(deviceServicePort, url.toString() + DEVICE_SERVICE).create(Device.class); + + RecordingService recordingService = new RecordingService(); + BindingProvider recServicePort = (BindingProvider) recordingService.getRecordingPort(); + this.recordings = getServiceProxy(recServicePort,url.toString() + RECORDING_SERVICE).create(RecordingPort.class); + + ReplayService replayService = new ReplayService(); + BindingProvider replayServicePort = (BindingProvider) replayService.getReplayPort(); + this.replay = getServiceProxy(replayServicePort,url.toString() + REPLAY_SERVICE).create(ReplayPort.class); + + + Capabilities capabilities = this.device.getCapabilities(Arrays.asList(CapabilityCategory.ALL)); + + if (capabilities == null) { + throw new ConnectException("Capabilities not reachable."); + } + + if (capabilities.getMedia() != null && capabilities.getMedia().getXAddr() != null) { + this.media = new MediaService().getMediaPort(); + this.media = + getServiceProxy((BindingProvider) media, capabilities.getMedia().getXAddr()) + .create(Media.class); + } + + if (capabilities.getPTZ() != null && capabilities.getPTZ().getXAddr() != null) { + this.ptz = new PtzService().getPtzPort(); + this.ptz = + getServiceProxy((BindingProvider) ptz, capabilities.getPTZ().getXAddr()) + .create(PTZ.class); + } + + if (capabilities.getImaging() != null && capabilities.getImaging().getXAddr() != null) { + this.imaging = new ImagingService().getImagingPort(); + this.imaging = + getServiceProxy((BindingProvider) imaging, capabilities.getImaging().getXAddr()) + .create(ImagingPort.class); + } + + if (capabilities.getEvents() != null && capabilities.getEvents().getXAddr() != null) { + this.events = new EventService().getEventPort(); + this.events = + getServiceProxy((BindingProvider) events, capabilities.getEvents().getXAddr()) + .create(EventPortType.class); + } + } + + public JaxWsProxyFactoryBean getServiceProxy(BindingProvider servicePort, String serviceAddr) { + + JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean(); + proxyFactory.getHandlers(); + + if (serviceAddr != null) proxyFactory.setAddress(serviceAddr); + proxyFactory.setServiceClass(servicePort.getClass()); + + SoapBindingConfiguration config = new SoapBindingConfiguration(); + + config.setVersion(Soap12.getInstance()); + proxyFactory.setBindingConfig(config); + Client deviceClient = ClientProxy.getClient(servicePort); + + if (verbose) { + // these logging interceptors are depreciated, but should be fine for debugging/development + // use. + proxyFactory.getOutInterceptors().add(new LoggingOutInterceptor()); + proxyFactory.getInInterceptors().add(new LoggingInInterceptor()); + } + + HTTPConduit http = (HTTPConduit) deviceClient.getConduit(); + if (securityHandler != null) proxyFactory.getHandlers().add(securityHandler); + HTTPClientPolicy httpClientPolicy = http.getClient(); + httpClientPolicy.setConnectionTimeout(36000); + httpClientPolicy.setReceiveTimeout(32000); + httpClientPolicy.setAllowChunking(false); + + return proxyFactory; + } + + public void resetSystemDateAndTime() { + Calendar calendar = Calendar.getInstance(); + Date currentDate = new Date(); + boolean daylightSavings = calendar.getTimeZone().inDaylightTime(currentDate); + org.onvif.ver10.schema.TimeZone timeZone = new org.onvif.ver10.schema.TimeZone(); + timeZone.setTZ(displayTimeZone(calendar.getTimeZone())); + org.onvif.ver10.schema.Time time = new org.onvif.ver10.schema.Time(); + time.setHour(calendar.get(Calendar.HOUR_OF_DAY)); + time.setMinute(calendar.get(Calendar.MINUTE)); + time.setSecond(calendar.get(Calendar.SECOND)); + org.onvif.ver10.schema.Date date = new org.onvif.ver10.schema.Date(); + date.setYear(calendar.get(Calendar.YEAR)); + date.setMonth(calendar.get(Calendar.MONTH) + 1); + date.setDay(calendar.get(Calendar.DAY_OF_MONTH)); + org.onvif.ver10.schema.DateTime utcDateTime = new org.onvif.ver10.schema.DateTime(); + utcDateTime.setDate(date); + utcDateTime.setTime(time); + device.setSystemDateAndTime(SetDateTimeType.MANUAL, daylightSavings, timeZone, utcDateTime); + } + + private static String displayTimeZone(TimeZone tz) { + + long hours = TimeUnit.MILLISECONDS.toHours(tz.getRawOffset()); + long minutes = + TimeUnit.MILLISECONDS.toMinutes(tz.getRawOffset()) - TimeUnit.HOURS.toMinutes(hours); + // avoid -4:-30 issue + minutes = Math.abs(minutes); + + String result = ""; + if (hours > 0) { + result = String.format("GMT+%02d:%02d", hours, minutes); + } else { + result = String.format("GMT%02d:%02d", hours, minutes); + } + + return result; + } + + /** Is used for basic devices and requests of given Onvif Device */ + public Device getDevice() { + return device; + } + +public RecordingPort getRecording(){ + return recordings; +} + + public ReplayPort getReplay(){ + return replay; + } + public PTZ getPtz() { + return ptz; + } + + public Media getMedia() { + return media; + } +// public RecordingPort getRecording(){return recordings;} + public ImagingPort getImaging() { + return imaging; + } + + public EventPortType getEvents() { + return events; + } + + public DateTime getDate() { + return device.getSystemDateAndTime().getLocalDateTime(); + } + + public DeviceInfo getDeviceInfo() { + Holder manufacturer = new Holder<>(); + Holder model = new Holder<>(); + Holder firmwareVersion = new Holder<>(); + Holder serialNumber = new Holder<>(); + Holder hardwareId = new Holder<>(); + device.getDeviceInformation(manufacturer, model, firmwareVersion, serialNumber, hardwareId); + return new DeviceInfo( + manufacturer.value, + model.value, + firmwareVersion.value, + serialNumber.value, + hardwareId.value); + } + + public String getHostname() { + return device.getHostname().getName(); + } + + public String reboot() throws ConnectException, SOAPException { + return device.systemReboot(); + } + + // returns http://host[:port]/path_for_snapshot + public String getSnapshotUri(String profileToken) { + MediaUri sceenshotUri = media.getSnapshotUri(profileToken); + if (sceenshotUri != null) { + return sceenshotUri.getUri(); + } + return ""; + } + + public String getSnapshotUri() { + return getSnapshotUri(0); + } + + public String getStreamUri() { + return getStreamUri(0); + } + + // Get snapshot uri for profile with index + public String getSnapshotUri(int index) { + if (media.getProfiles().size() >= index) + return getSnapshotUri(media.getProfiles().get(index).getToken()); + return ""; + } + + public String getStreamUri(int index) { + return getStreamUri(media.getProfiles().get(index).getToken()); + } + + // returns rtsp://host[:port]/path_for_rtsp + public String getStreamUri(String profileToken) { + StreamSetup streamSetup = new StreamSetup(); + Transport t = new Transport(); + t.setProtocol(TransportProtocol.RTSP); + streamSetup.setTransport(t); + streamSetup.setStream(StreamType.RTP_UNICAST); + MediaUri rtsp = media.getStreamUri(streamSetup, profileToken); + return rtsp != null ? rtsp.getUri() : ""; + } + + public static boolean isVerbose() { + return verbose; + } + + public static void setVerbose(boolean verbose) { + OnvifDevice.verbose = verbose; + } +} diff --git a/onvif-java/src/main/java/de/onvif/soap/SSLUtilities.java b/onvif-java/src/main/java/de/onvif/soap/SSLUtilities.java new file mode 100644 index 0000000..f580fde --- /dev/null +++ b/onvif-java/src/main/java/de/onvif/soap/SSLUtilities.java @@ -0,0 +1,282 @@ +package de.onvif.soap; + +/** @author schrepfler */ +import java.security.GeneralSecurityException; +import java.security.SecureRandom; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.HttpsURLConnection; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSession; +import javax.net.ssl.TrustManager; +import javax.net.ssl.X509TrustManager; + +/** + * This class provide various static methods that relax X509 certificate and hostname verification + * while using the SSL over the HTTP protocol. + * + * @author Francis Labrie + */ +public final class SSLUtilities { + + /** + * Hostname verifier for the Sun's deprecated API. + * + * @deprecated see {@link #_hostnameVerifier}. + */ + private static HostnameVerifier __hostnameVerifier; + /** + * Thrust managers for the Sun's deprecated API. + * + * @deprecated see {@link #_trustManagers}. + */ + private static TrustManager[] __trustManagers; + /** Hostname verifier. */ + private static HostnameVerifier _hostnameVerifier; + /** Thrust managers. */ + private static TrustManager[] _trustManagers; + + /** + * Set the default Hostname Verifier to an instance of a fake class that trust all hostnames. This + * method uses the old deprecated API from the com.sun.ssl package. + * + * @deprecated see {@link #_trustAllHostnames()}. + */ + private static void __trustAllHostnames() { + // Create a trust manager that does not validate certificate chains + if (__hostnameVerifier == null) { + __hostnameVerifier = new _FakeHostnameVerifier(); + } // if + // Install the all-trusting host name verifier + HttpsURLConnection.setDefaultHostnameVerifier(__hostnameVerifier); + } // __trustAllHttpsCertificates + + /** + * Set the default X509 Trust Manager to an instance of a fake class that trust all certificates, + * even the self-signed ones. This method uses the old deprecated API from the com.sun.ssl + * package. + * + * @deprecated see {@link #_trustAllHttpsCertificates()}. + */ + private static void __trustAllHttpsCertificates() { + SSLContext context; + + // Create a trust manager that does not validate certificate chains + if (__trustManagers == null) { + __trustManagers = new TrustManager[] {new _FakeX509TrustManager()}; + } // if + // Install the all-trusting trust manager + try { + context = SSLContext.getInstance("SSL"); + context.init(null, __trustManagers, new SecureRandom()); + } catch (GeneralSecurityException gse) { + throw new IllegalStateException(gse.getMessage()); + } // catch + HttpsURLConnection.setDefaultSSLSocketFactory(context.getSocketFactory()); + } // __trustAllHttpsCertificates + + /** + * Return true if the protocol handler property java. protocol.handler.pkgs is set to the Sun's + * com.sun.net.ssl. internal.www.protocol deprecated one, false otherwise. + * + * @return true if the protocol handler property is set to the Sun's deprecated one, false + * otherwise. + */ + private static boolean isDeprecatedSSLProtocol() { + return ("com.sun.net.ssl.internal.www.protocol" + .equals(System.getProperty("java.protocol.handler.pkgs"))); + } // isDeprecatedSSLProtocol + + /** Set the default Hostname Verifier to an instance of a fake class that trust all hostnames. */ + private static void _trustAllHostnames() { + // Create a trust manager that does not validate certificate chains + if (_hostnameVerifier == null) { + _hostnameVerifier = new FakeHostnameVerifier(); + } // if + // Install the all-trusting host name verifier: + HttpsURLConnection.setDefaultHostnameVerifier(_hostnameVerifier); + } // _trustAllHttpsCertificates + + /** + * Set the default X509 Trust Manager to an instance of a fake class that trust all certificates, + * even the self-signed ones. + */ + private static void _trustAllHttpsCertificates() { + SSLContext context; + + // Create a trust manager that does not validate certificate chains + if (_trustManagers == null) { + _trustManagers = new TrustManager[] {new FakeX509TrustManager()}; + } // if + // Install the all-trusting trust manager: + try { + context = SSLContext.getInstance("SSL"); + context.init(null, _trustManagers, new SecureRandom()); + } catch (GeneralSecurityException gse) { + throw new IllegalStateException(gse.getMessage()); + } // catch + HttpsURLConnection.setDefaultSSLSocketFactory(context.getSocketFactory()); + } // _trustAllHttpsCertificates + + /** Set the default Hostname Verifier to an instance of a fake class that trust all hostnames. */ + public static void trustAllHostnames() { + // Is the deprecated protocol setted? + if (isDeprecatedSSLProtocol()) { + __trustAllHostnames(); + } else { + _trustAllHostnames(); + } // else + } // trustAllHostnames + + /** + * Set the default X509 Trust Manager to an instance of a fake class that trust all certificates, + * even the self-signed ones. + */ + public static void trustAllHttpsCertificates() { + // Is the deprecated protocol setted? + if (isDeprecatedSSLProtocol()) { + __trustAllHttpsCertificates(); + } else { + _trustAllHttpsCertificates(); + } // else + } // trustAllHttpsCertificates + + /** + * This class implements a fake hostname verificator, trusting any host name. This class uses the + * old deprecated API from the com.sun. ssl package. + * + * @author Francis Labrie + * @deprecated see {@link SSLUtilities.FakeHostnameVerifier}. + */ + public static class _FakeHostnameVerifier implements HostnameVerifier { + + /** + * Always return true, indicating that the host name is an acceptable match with the server's + * authentication scheme. + * + * @param hostname the host name. + * @param session the SSL session used on the connection to host. + * @return the true boolean value indicating the host name is trusted. + */ + public boolean verify(String hostname, SSLSession session) { + return (true); + } + } // _FakeHostnameVerifier + + /** + * This class allow any X509 certificates to be used to authenticate the remote side of a secure + * socket, including self-signed certificates. This class uses the old deprecated API from the + * com.sun.ssl package. + * + * @author Francis Labrie + * @deprecated see {@link SSLUtilities.FakeX509TrustManager}. + */ + public static class _FakeX509TrustManager implements X509TrustManager { + + /** Empty array of certificate authority certificates. */ + private static final X509Certificate[] _AcceptedIssuers = new X509Certificate[] {}; + + /** + * Always return true, trusting for client SSL chain peer certificate chain. + * + * @param chain the peer certificate chain. + * @return the true boolean value indicating the chain is trusted. + */ + public boolean isClientTrusted(X509Certificate[] chain) { + return (true); + } // checkClientTrusted + + /** + * Always return true, trusting for server SSL chain peer certificate chain. + * + * @param chain the peer certificate chain. + * @return the true boolean value indicating the chain is trusted. + */ + public boolean isServerTrusted(X509Certificate[] chain) { + return (true); + } // checkServerTrusted + + /** + * Return an empty array of certificate authority certificates which are trusted for + * authenticating peers. + * + * @return a empty array of issuer certificates. + */ + public X509Certificate[] getAcceptedIssuers() { + return (_AcceptedIssuers); + } // getAcceptedIssuers + + public void checkClientTrusted(X509Certificate[] arg0, String arg1) + throws CertificateException { + throw new UnsupportedOperationException("Not supported yet."); + } + + public void checkServerTrusted(X509Certificate[] arg0, String arg1) + throws CertificateException { + throw new UnsupportedOperationException("Not supported yet."); + } + } // _FakeX509TrustManager + + /** + * This class implements a fake hostname verificator, trusting any host name. + * + * @author Francis Labrie + */ + public static class FakeHostnameVerifier implements HostnameVerifier { + + /** + * Always return true, indicating that the host name is an acceptable match with the server's + * authentication scheme. + * + * @param hostname the host name. + * @param session the SSL session used on the connection to host. + * @return the true boolean value indicating the host name is trusted. + */ + public boolean verify(String hostname, SSLSession session) { + return (true); + } // verify + } // FakeHostnameVerifier + + /** + * This class allow any X509 certificates to be used to authenticate the remote side of a secure + * socket, including self-signed certificates. + * + * @author Francis Labrie + */ + public static class FakeX509TrustManager implements X509TrustManager { + + /** Empty array of certificate authority certificates. */ + private static final X509Certificate[] _AcceptedIssuers = new X509Certificate[] {}; + + /** + * Always trust for client SSL chain peer certificate chain with any authType authentication + * types. + * + * @param chain the peer certificate chain. + * @param authType the authentication type based on the client certificate. + */ + public void checkClientTrusted( + X509Certificate[] chain, String authType) {} // checkClientTrusted + + /** + * Always trust for server SSL chain peer certificate chain with any authType exchange algorithm + * types. + * + * @param chain the peer certificate chain. + * @param authType the key exchange algorithm used. + */ + public void checkServerTrusted( + X509Certificate[] chain, String authType) {} // checkServerTrusted + + /** + * Return an empty array of certificate authority certificates which are trusted for + * authenticating peers. + * + * @return a empty array of issuer certificates. + */ + public X509Certificate[] getAcceptedIssuers() { + return (_AcceptedIssuers); + } // getAcceptedIssuers + } // FakeX509TrustManager +} // SSLUtilities diff --git a/onvif-java/src/main/java/de/onvif/soap/SimpleSecurityHandler.java b/onvif-java/src/main/java/de/onvif/soap/SimpleSecurityHandler.java new file mode 100644 index 0000000..eef6d2d --- /dev/null +++ b/onvif-java/src/main/java/de/onvif/soap/SimpleSecurityHandler.java @@ -0,0 +1,172 @@ +package de.onvif.soap; + +import static org.apache.wss4j.common.WSS4JConstants.BASE64_ENCODING; +import static org.apache.wss4j.common.WSS4JConstants.CREATED_LN; +import static org.apache.wss4j.common.WSS4JConstants.NONCE_LN; +import static org.apache.wss4j.common.WSS4JConstants.PASSWORD_DIGEST; +import static org.apache.wss4j.common.WSS4JConstants.PASSWORD_LN; +import static org.apache.wss4j.common.WSS4JConstants.PASSWORD_TYPE_ATTR; +import static org.apache.wss4j.common.WSS4JConstants.USERNAME_LN; +import static org.apache.wss4j.common.WSS4JConstants.USERNAME_TOKEN_LN; +import static org.apache.wss4j.common.WSS4JConstants.WSSE_LN; +import static org.apache.wss4j.common.WSS4JConstants.WSSE_NS; +import static org.apache.wss4j.common.WSS4JConstants.WSSE_PREFIX; +import static org.apache.wss4j.common.WSS4JConstants.WSU_NS; +import static org.apache.wss4j.common.WSS4JConstants.WSU_PREFIX; + +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.GregorianCalendar; +import java.util.Random; +import java.util.Set; +import java.util.SimpleTimeZone; +import java.util.TimeZone; +import javax.xml.namespace.QName; +import javax.xml.soap.SOAPElement; +import javax.xml.soap.SOAPEnvelope; +import javax.xml.soap.SOAPHeader; +import javax.xml.soap.SOAPMessage; +import javax.xml.soap.SOAPPart; +import javax.xml.ws.handler.MessageContext; +import javax.xml.ws.handler.soap.SOAPHandler; +import javax.xml.ws.handler.soap.SOAPMessageContext; + +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.codec.digest.MessageDigestAlgorithms; + +/* + Utility class to add user/password onvif credentials to SOAP communications +*/ +public class SimpleSecurityHandler implements SOAPHandler { + + private final String username; + private final String password; + private String utcTime; + private static Random rnd = new SecureRandom(); + + public SimpleSecurityHandler(String username, String password) { + this.username = username; + this.password = password; + } + + public byte[] generateNonce(int length) { + byte[] nonceBytes = new byte[length]; + + // fill byte[] + rnd.nextBytes(nonceBytes); + return nonceBytes; + } + + public String encryptPassword(String password, byte[] nonceBytes) { + String digestBase64 = ""; + + try { + // 1. Base64 decode the nonce + byte[] decodedNonce = nonceBytes; + + // 2. Concatenate decodedNonce, date, and password + byte[] dateBytes = getUTCTime().getBytes(); + byte[] passwordBytes = password.getBytes(); + byte[] toBeHashed = new byte[decodedNonce.length + dateBytes.length + passwordBytes.length]; + + System.arraycopy(decodedNonce, 0, toBeHashed, 0, decodedNonce.length); + System.arraycopy(dateBytes, 0, toBeHashed, decodedNonce.length, dateBytes.length); + System.arraycopy(passwordBytes, 0, toBeHashed, decodedNonce.length + dateBytes.length, passwordBytes.length); + + // 3. SHA-1 hash the concatenated bytes + MessageDigest digest = MessageDigest.getInstance("SHA-1"); + byte[] sha1Hash = digest.digest(toBeHashed); + + // 4. Base64 encode the SHA-1 hash + digestBase64 = java.util.Base64.getEncoder().encodeToString(sha1Hash); + + } catch (NoSuchAlgorithmException e) { + e.printStackTrace(); + } + return digestBase64; + } + + @Override + public boolean handleMessage(final SOAPMessageContext msgCtx) { + byte[] nonceBytes = generateNonce(16); + // Indicator telling us which direction this message is going in + final Boolean outInd = (Boolean) msgCtx.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY); + + // Handler must only add security headers to outbound messages + if (outInd.booleanValue()) { + try { + // Create the xml + SOAPMessage soapMessage = msgCtx.getMessage(); + SOAPEnvelope envelope = soapMessage.getSOAPPart().getEnvelope(); + SOAPHeader header = envelope.getHeader(); + if (header == null) { + header = envelope.addHeader(); + } + + SOAPPart sp = soapMessage.getSOAPPart(); + SOAPEnvelope se = sp.getEnvelope(); + se.addNamespaceDeclaration(WSSE_PREFIX, WSSE_NS); + se.addNamespaceDeclaration(WSU_PREFIX, WSU_NS); + + SOAPElement securityElem = header.addChildElement(WSSE_LN, WSSE_PREFIX); + // securityElem.setAttribute("SOAP-ENV:mustUnderstand", "1"); + + SOAPElement usernameTokenElem = + securityElem.addChildElement(USERNAME_TOKEN_LN, WSSE_PREFIX); + + SOAPElement usernameElem = usernameTokenElem.addChildElement(USERNAME_LN, WSSE_PREFIX); + usernameElem.setTextContent(username); + + SOAPElement passwordElem = usernameTokenElem.addChildElement(PASSWORD_LN, WSSE_PREFIX); + passwordElem.setAttribute(PASSWORD_TYPE_ATTR, PASSWORD_DIGEST); + passwordElem.setTextContent(encryptPassword(password, nonceBytes)); + + SOAPElement nonceElem = usernameTokenElem.addChildElement(NONCE_LN, WSSE_PREFIX); + nonceElem.setAttribute("EncodingType", BASE64_ENCODING); + nonceElem.setTextContent(Base64.encodeBase64String(nonceBytes)); + + SOAPElement createdElem = usernameTokenElem.addChildElement(CREATED_LN, WSU_PREFIX); + createdElem.setTextContent(getLastUTCTime()); + } catch (final Exception e) { + e.printStackTrace(); + return false; + } + } + return true; + } + + public String getLastUTCTime() { + return utcTime; + } + + public String getUTCTime() { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-d'T'HH:mm:ss'Z'"); + sdf.setTimeZone(new SimpleTimeZone(SimpleTimeZone.UTC_TIME, "UTC")); + Calendar cal = new GregorianCalendar(TimeZone.getTimeZone("UTC")); + String utcTime = sdf.format(cal.getTime()); + this.utcTime = utcTime; + return utcTime; + } + + + @Override + public boolean handleFault(SOAPMessageContext context) { + // TODO Auto-generated method stub + return false; + } + + @Override + public void close(MessageContext context) { + // TODO Auto-generated method stub + + } + + @Override + public Set getHeaders() { + // TODO Auto-generated method stub + return null; + } +} diff --git a/onvif-java/src/main/java/de/onvif/utils/OnvifUtils.java b/onvif-java/src/main/java/de/onvif/utils/OnvifUtils.java new file mode 100644 index 0000000..1d88872 --- /dev/null +++ b/onvif-java/src/main/java/de/onvif/utils/OnvifUtils.java @@ -0,0 +1,68 @@ +package de.onvif.utils; + +import org.onvif.ver10.schema.PTZPreset; +import org.onvif.ver10.schema.PTZStatus; +import org.onvif.ver10.schema.PTZVector; + +public class OnvifUtils { + + public static String format(PTZVector vector) { + String out = ""; + if (vector != null) { + out += "[" + vector.getPanTilt().getX() + "," + vector.getPanTilt().getY(); + if (vector.getZoom() != null) out += "," + vector.getZoom().getX(); + out += "]"; + } + return out; + } + + public static String format(PTZPreset preset) { + String out = ""; + if (preset != null) { + out += preset.getToken() + "/" + preset.getName() + ":" + format(preset.getPTZPosition()); + } + return out; + } + + public static String format(PTZStatus status) { + String out = ""; + if (status != null) { + out += + "moveStatus=" + + format(status.getMoveStatus()) + + " position=" + + format(status.getPosition()) + + " time=" + + status.getUtcTime(); + } + return out; + } + + public static String format(Object o) { + String out = ""; + if (o != null) { + out = o.toString(); + for (; ; ) { + int ch = out.indexOf("org.onvif.ver"); + if (ch == -1) break; + int end = out.indexOf("[", ch); + if (end == -1) { + assert (false); + break; + } // + int at = out.indexOf("@", ch); + if (at == -1 || at > end) { + assert (false); + break; + } + + out = out.substring(0, ch) + out.substring(end); + } + + out = out.replaceAll("", ""); // speed=,foo=bar to just speed=,foo=bar + + // out += preset.getToken()+"/"+preset.getName()+":"+format(preset.getPTZPosition()); + } + return out; + } +} diff --git a/onvif-java/src/main/resources/log4j.properties b/onvif-java/src/main/resources/log4j.properties new file mode 100644 index 0000000..bbefa38 --- /dev/null +++ b/onvif-java/src/main/resources/log4j.properties @@ -0,0 +1,7 @@ +# Root logger option +log4j.rootLogger=INFO, stdout +# Direct log messages to stdout +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.Target=System.out +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n \ No newline at end of file diff --git a/onvif-java/src/test/java/org/onvif/client/AuthTest.java b/onvif-java/src/test/java/org/onvif/client/AuthTest.java new file mode 100644 index 0000000..c8c5bfa --- /dev/null +++ b/onvif-java/src/test/java/org/onvif/client/AuthTest.java @@ -0,0 +1,40 @@ +package org.onvif.client; + +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.Base64; + +public class AuthTest { + + public static void main(String[] args) throws Exception { + + String date = "2024-03-06T06:04:30Z"; + String nonce = "gHV4Y/cV8KE7OSY7+qGv0g=="; + String password = "abcd1234"; + + try { + // 1. Base64 decode the nonce + byte[] decodedNonce = Base64.getDecoder().decode(nonce); + + // 2. Concatenate decodedNonce, date, and password + byte[] dateBytes = date.getBytes(); + byte[] passwordBytes = password.getBytes(); + byte[] toBeHashed = new byte[decodedNonce.length + dateBytes.length + passwordBytes.length]; + + System.arraycopy(decodedNonce, 0, toBeHashed, 0, decodedNonce.length); + System.arraycopy(dateBytes, 0, toBeHashed, decodedNonce.length, dateBytes.length); + System.arraycopy(passwordBytes, 0, toBeHashed, decodedNonce.length + dateBytes.length, passwordBytes.length); + + // 3. SHA-1 hash the concatenated bytes + MessageDigest digest = MessageDigest.getInstance("SHA-1"); + byte[] sha1Hash = digest.digest(toBeHashed); + + // 4. Base64 encode the SHA-1 hash + String digestBase64 = Base64.getEncoder().encodeToString(sha1Hash); + + System.out.println("Digest: " + digestBase64); + } catch (NoSuchAlgorithmException e) { + e.printStackTrace(); + } + } +} diff --git a/onvif-java/src/test/java/org/onvif/client/Base64Test.java b/onvif-java/src/test/java/org/onvif/client/Base64Test.java new file mode 100644 index 0000000..51a9a95 --- /dev/null +++ b/onvif-java/src/test/java/org/onvif/client/Base64Test.java @@ -0,0 +1,28 @@ +package org.onvif.client; + +import java.util.Base64; + +public class Base64Test { + + + public static void main(String[] args) { + String base64String = "4AUTXXJ214OBnsdeYBXatQ=="; + + // decode Base64 + byte[] decodedBytes = Base64.getDecoder().decode(base64String); + + // turn byte[] to hex + StringBuilder hexStringBuilder = new StringBuilder(); + for (byte b : decodedBytes) { + String hex = Integer.toHexString(0xff & b); + if (hex.length() == 1) { + hexStringBuilder.append('0'); + } + hexStringBuilder.append(hex); + } + String hexString = hexStringBuilder.toString(); + + System.out.println("hex:" + hexString); + } + +} diff --git a/onvif-java/src/test/java/org/onvif/client/DiscoverAndTest.java b/onvif-java/src/test/java/org/onvif/client/DiscoverAndTest.java new file mode 100644 index 0000000..f770cb3 --- /dev/null +++ b/onvif-java/src/test/java/org/onvif/client/DiscoverAndTest.java @@ -0,0 +1,74 @@ +package org.onvif.client; + +import de.onvif.discovery.OnvifDiscovery; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.net.URL; +import java.util.ArrayList; +import java.util.Collection; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Class calls OnvifDiscovery and for each device URL found, calls TestDevice This assumes all onvif + * devices on your network use the same username and password. + * + * @author Brad Lowe + */ +public class DiscoverAndTest { + private static final Logger LOG = LoggerFactory.getLogger(TestDevice.class); + + public static String discoverAndTest(String user, String password) { + String sep = "\n"; + StringBuffer out = new StringBuffer(); + + Collection urls = OnvifDiscovery.discoverOnvifURLs(); + for (URL u : urls) { + out.append("Discovered URL:" + u.toString() + sep); + } + ArrayList results = new ArrayList<>(); + + int good = 0, bad = 0; + + for (URL u : urls) { + + try { + String result = TestDevice.testCamera(u, user, password); + LOG.info(u + "->" + result); + good++; + results.add(u.toString() + ":" + result); + } catch (Throwable e) { + bad++; + LOG.error("error:" + u, e); + // This is a bit of a hack. When a camera is password protected (it should be!) + // and the password is not provided or wrong, a "Unable to Send Message" exception + // may be thrown. This is not clear-- buried in the stack track is the real cause. + StringWriter sw = new StringWriter(); + PrintWriter pw = new PrintWriter(sw); + e.printStackTrace(pw); + String trace = sw.getBuffer().toString(); + if (trace.contains("Unauthorized")) results.add(u + ":Unauthorized:"); + else results.add(u + ":" + trace); + } + } + out.append("RESULTS: " + sep); + for (String s : results) out.append(s + sep); + out.append("cameras found:" + urls.size() + " good=" + good + ", bad=" + bad + sep); + return out.toString(); + } + + public static void main(String[] args) { + // get user and password.. we will ignore device host + String user = ""; + String password = ""; + if (args.length > 0) user = args[0]; + if (args.length > 1) password = args[1]; + + if (password.isEmpty()) { + LOG.warn( + "Warning: No password for discover and test... run with common user password as arguments"); + } + // OnvifDevice.setVerbose(true); + LOG.info(discoverAndTest(user, password)); + } +} diff --git a/onvif-java/src/test/java/org/onvif/client/DiscoveryTest.java b/onvif-java/src/test/java/org/onvif/client/DiscoveryTest.java new file mode 100644 index 0000000..13fc326 --- /dev/null +++ b/onvif-java/src/test/java/org/onvif/client/DiscoveryTest.java @@ -0,0 +1,18 @@ +package org.onvif.client; + +import de.onvif.discovery.OnvifDiscovery; +import java.net.URL; +import java.util.Collection; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class DiscoveryTest { + private static final Logger LOG = LoggerFactory.getLogger(DiscoveryTest.class); + + public static void main(String[] args) { + Collection urls = OnvifDiscovery.discoverOnvifURLs(); + for (URL u : urls) { + LOG.info(u.toString()); + } + } +} diff --git a/onvif-java/src/test/java/org/onvif/client/GetTestDevice.java b/onvif-java/src/test/java/org/onvif/client/GetTestDevice.java new file mode 100644 index 0000000..ba1626d --- /dev/null +++ b/onvif-java/src/test/java/org/onvif/client/GetTestDevice.java @@ -0,0 +1,132 @@ +package org.onvif.client; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; +import java.util.Scanner; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class GetTestDevice { + + static String PROPERTY_NAME = "ONVIF_HOST"; + private static final Logger LOG = LoggerFactory.getLogger(GetTestDevice.class); + + // Get a camera host, user name, and password for tests. + // Add an environment variable or java Property called "TEST_CAM" and set to + // host,user,password,profile + // or modify resource/onvif.properties + + public static OnvifCredentials getOnvifCredentials(String[] args) { + + OnvifCredentials creds = getFromArgs(args); + if (creds != null) + return creds; + + creds = getFromProperties(); + if (creds != null) + return creds; + try { + creds = getFirstFromResource("/onvif.properties"); + if (creds != null) + return creds; + } catch (IOException ioe) { + LOG.error("Error", ioe); + } + try { + creds = getFromStandardInput(); + if (creds != null) + return creds; + } catch (IOException ioe) { + LOG.error("Error", ioe); + } + + LOG.info("Unable to get default test onvif credentials"); + return new OnvifCredentials("", "", "", ""); + } + + // arguments to any test app can be host user password profilename + // if no arguments passed, returns null. + // All arguments optional. + public static OnvifCredentials getFromArgs(String[] args) { + if (args == null || args.length == 0) + return null; + String host = "", user = "", password = "", profile = ""; + host = args[0]; + if (args.length > 1) + user = args[1]; + if (args.length > 2) + password = args[2]; + if (args.length > 3) + profile = args[3]; + return new OnvifCredentials(host, user, password, profile); + } + + public static OnvifCredentials getFromProperties() { + String test = null; + if (test == null) + test = System.getProperty(PROPERTY_NAME); + if (test == null) + test = System.getenv(PROPERTY_NAME); + + if (test != null) { + return parse(test); + } + return null; + } + + private static OnvifCredentials getFromStandardInput() throws IOException { + + System.out.println("Getting camera credentials from standard input"); + InputStreamReader inputStream = new InputStreamReader(System.in, StandardCharsets.UTF_8); + BufferedReader keyboardInput = new BufferedReader(inputStream); + System.out.println("Please enter camera IP (with port if not 80):"); + String cameraAddress = keyboardInput.readLine(); + System.out.println("Please enter camera username:"); + String user = keyboardInput.readLine(); + System.out.println("Please enter camera password:"); + String password = keyboardInput.readLine(); + System.out.println("Please enter camera profile [or enter to use first]:"); + String profile = keyboardInput.readLine(); + OnvifCredentials creds = new OnvifCredentials(cameraAddress, user, password, profile); + return creds; + } + + private static OnvifCredentials getFirstFromResource(String resource) throws IOException { + InputStream res = GetTestDevice.class.getResourceAsStream(resource); + if (res != null) { + try (Scanner s = new Scanner(res, StandardCharsets.UTF_8.name());) { + s.useDelimiter("\\A"); + while (s.hasNextLine()) { + String line = s.nextLine(); + if (!line.isEmpty() && !line.startsWith("#")) + return parse(line.substring(line.indexOf("=") + 1)); + } + } + } + return null; + } + + // warning, this breaks if password contains a comma. + public static OnvifCredentials parse(String i) { + String host = "", user = "", password = "", profile = ""; + if (i != null) { + if (i.contains(",")) { + String[] sp = i.split(","); + if (sp.length > 0) + host = sp[0]; + if (sp.length > 1) + user = sp[1]; + if (sp.length > 2) + password = sp[2]; + if (sp.length > 3) + profile = sp[3]; + + } else + host = i; + } + return new OnvifCredentials(host, user, password, profile); + } +} diff --git a/onvif-java/src/test/java/org/onvif/client/ONVIFClient.java b/onvif-java/src/test/java/org/onvif/client/ONVIFClient.java new file mode 100644 index 0000000..0b93888 --- /dev/null +++ b/onvif-java/src/test/java/org/onvif/client/ONVIFClient.java @@ -0,0 +1,150 @@ +package org.onvif.client; + +import javax.xml.soap.*; +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.URL; +import java.security.MessageDigest; +import java.util.Base64; + +public class ONVIFClient { + private String deviceUrl; + private String username; + private String password; + private String realm; + private String nonce; + private String uri; + + public ONVIFClient(String deviceUrl, String username, String password) { + this.deviceUrl = deviceUrl; + this.username = username; + this.password = password; + this.uri = "/onvif/device_service"; // Set to your ONVIF service URI + } + + public void getDeviceInfo() { + try { + // Step 1: Send initial request to get authentication details + URL url = new URL(deviceUrl + uri); + HttpURLConnection connection = (HttpURLConnection) url.openConnection(); + connection.setRequestMethod("POST"); + connection.setDoOutput(true); + connection.setRequestProperty("Content-Type", "text/xml;charset=UTF-8"); + + // Get response and parse WWW-Authenticate header + int responseCode = connection.getResponseCode(); + if (responseCode == HttpURLConnection.HTTP_UNAUTHORIZED) { + String authHeader = connection.getHeaderField("WWW-Authenticate"); + parseAuthHeader(authHeader); + + // Step 2: Calculate the digest + String digest = calculateDigest(); + + // Step 3: Send the actual request with Digest Auth + connection = (HttpURLConnection) url.openConnection(); + connection.setRequestMethod("POST"); + connection.setDoOutput(true); + connection.setRequestProperty("Content-Type", "text/xml;charset=UTF-8"); + connection.setRequestProperty("Authorization", "Digest " + digest); + + // Create SOAP Request + SOAPMessage soapMessage = createSOAPRequest(); + soapMessage.saveChanges(); + soapMessage.writeTo(connection.getOutputStream()); + + // Get the response + responseCode = connection.getResponseCode(); + System.out.println("Response Code: " + responseCode); + if (responseCode == HttpURLConnection.HTTP_OK) { + SOAPMessage responseMessage = MessageFactory.newInstance().createMessage(null, connection.getInputStream()); + System.out.println("Response SOAP Message:"); + responseMessage.writeTo(System.out); + } else { + System.out.println("Error in SOAP request: " + connection.getResponseMessage()); + } + } else { + System.out.println("Unexpected response: " + responseCode); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + private void parseAuthHeader(String authHeader) { + String[] params = authHeader.split(", "); + for (String param : params) { + String[] keyValue = param.split("="); + if (keyValue.length == 2) { + switch (keyValue[0].trim()) { + case "realm": + this.realm = keyValue[1].replace("\"", ""); + break; + case "nonce": + this.nonce = keyValue[1].replace("\"", ""); + break; + } + } + } + } + + private String calculateDigest() throws Exception { + String method = "POST"; + String uri = this.uri; + String nc = "00000001"; // nonce count + String cnonce = "abc123"; // client nonce + String qop = "auth"; + + // Hashing required values + MessageDigest md = MessageDigest.getInstance("MD5"); + + // A1 = MD5(username:realm:password) + String A1 = username + ":" + realm + ":" + password; + String ha1 = bytesToHex(md.digest(A1.getBytes())); + + // A2 = MD5(method:uri) + String A2 = method + ":" + uri; + String ha2 = bytesToHex(md.digest(A2.getBytes())); + + // Response = MD5(ha1:nonce:nc:cnonce:qop:ha2) + String response = ha1 + ":" + nonce + ":" + nc + ":" + cnonce + ":" + qop + ":" + ha2; + String digest = bytesToHex(md.digest(response.getBytes())); + + return String.format("username=\"%s\", realm=\"%s\", nonce=\"%s\", uri=\"%s\", response=\"%s\", qop=%s, nc=%s, cnonce=\"%s\"", + username, realm, nonce, uri, digest, qop, nc, cnonce); + } + + private String bytesToHex(byte[] bytes) { + StringBuilder sb = new StringBuilder(); + for (byte b : bytes) { + sb.append(String.format("%02x", b)); + } + return sb.toString(); + } + + private SOAPMessage createSOAPRequest() throws SOAPException { + // Create SOAP Message + MessageFactory messageFactory = MessageFactory.newInstance(); + SOAPMessage soapMessage = messageFactory.createMessage(); + SOAPPart soapPart = soapMessage.getSOAPPart(); + + // Create SOAP Envelope + SOAPEnvelope envelope = soapPart.getEnvelope(); + envelope.addNamespaceDeclaration("tns", "http://www.onvif.org/ver10/device/wsdl"); + + // Create SOAP Body + SOAPBody soapBody = envelope.getBody(); + soapBody.addChildElement("GetDeviceInformation", "tns"); + + return soapMessage; + } + + public static void main(String[] args) { + String deviceUrl = "http://192.168.51.137"; // Replace with your device URL + String username = "onvif1"; // Replace with your username + String password = "godspeed123"; // Replace with your password + + ONVIFClient client = new ONVIFClient(deviceUrl, username, password); + client.getDeviceInfo(); + } +} diff --git a/onvif-java/src/test/java/org/onvif/client/OnvifCredentials.java b/onvif-java/src/test/java/org/onvif/client/OnvifCredentials.java new file mode 100644 index 0000000..0708ce6 --- /dev/null +++ b/onvif-java/src/test/java/org/onvif/client/OnvifCredentials.java @@ -0,0 +1,55 @@ +package org.onvif.client; + +public class OnvifCredentials { + private String host; // 92.168.xx.yy, or http://host[:port] + private String user; // admin + private String password; // secret + private String profile; // "MediaProfile000" If empty, will use first profile. + + public OnvifCredentials(String host, String user, String password, String profile) { + this.host = host; + this.user = user; + this.password = password; + this.profile = profile; + } + + public String getHost() { + return host; + } + + public void setHost(String host) { + this.host = host; + } + + public String getUser() { + return user; + } + + public void setUser(String user) { + this.user = user; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getProfile() { + return profile; + } + + public void setProfile(String profile) { + this.profile = profile; + } + + public String toString() { + return host; // + "," + user+ "," + "****,"++ "#" + profile; + } + + public String details() { + return host + "," + user + "," + password + "," + profile; + } +} diff --git a/onvif-java/src/test/java/org/onvif/client/ReadCommandsFromStdInput.java b/onvif-java/src/test/java/org/onvif/client/ReadCommandsFromStdInput.java new file mode 100644 index 0000000..7fb12be --- /dev/null +++ b/onvif-java/src/test/java/org/onvif/client/ReadCommandsFromStdInput.java @@ -0,0 +1,96 @@ +package org.onvif.client; + +import de.onvif.soap.OnvifDevice; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.ConnectException; +import java.net.MalformedURLException; +import java.util.List; +import javax.xml.soap.SOAPException; +import org.onvif.ver10.schema.Profile; + +public class ReadCommandsFromStdInput { + + private static final String INFO = + "Commands:\n \n url: Get snapshort URL.\n info: Get information about each valid command.\n profiles: Get all profiles.\n inspect: Get device details.\n exit: Exit this application."; + + public static void main(String[] args) { + InputStreamReader inputStream = new InputStreamReader(System.in); + BufferedReader keyboardInput = new BufferedReader(inputStream); + String input, cameraAddress, user, password; + + try { + System.out.println("Please enter camera IP (with port if not 80):"); + cameraAddress = keyboardInput.readLine(); + System.out.println("Please enter camera username:"); + user = keyboardInput.readLine(); + System.out.println("Please enter camera password:"); + password = keyboardInput.readLine(); + if (cameraAddress == null || user == null || password == null) + throw new IOException("No input"); + } catch (IOException e1) { + e1.printStackTrace(); + return; + } + + System.out.println("Connect to camera, please wait ..."); + OnvifDevice cam; + try { + cam = new OnvifDevice(cameraAddress, user, password); + } catch (MalformedURLException | ConnectException | SOAPException e1) { + System.err.println("No connection to camera, please try again."); + return; + } + + System.out.println("Connection to camera successful!"); + + while (true) { + try { + System.out.println(); + System.out.println("Enter a command (type \"info\" to get commands):"); + input = keyboardInput.readLine(); + if (input == null) break; + switch (input) { + case "url": + { + List profiles = cam.getMedia().getProfiles(); + for (Profile p : profiles) { + System.out.println( + "URL from Profile \'" + + p.getName() + + "\': " + + cam.getMedia().getSnapshotUri(p.getToken())); + } + break; + } + case "profiles": + List profiles = cam.getMedia().getProfiles(); + System.out.println("Number of profiles: " + profiles.size()); + for (Profile p : profiles) { + System.out.println(" Profile " + p.getName() + " token is: " + p.getToken()); + } + break; + case "info": + System.out.println(INFO); + break; + case "inspect": + System.out.println(TestDevice.inspect(cam)); + break; + + case "quit": + case "exit": + case "end": + return; + default: + System.out.println("Unknown command!"); + System.out.println(); + System.out.println(INFO); + break; + } + } catch (IOException e) { + e.printStackTrace(); + } + } + } +} diff --git a/onvif-java/src/test/java/org/onvif/client/SimpleTest.java b/onvif-java/src/test/java/org/onvif/client/SimpleTest.java new file mode 100644 index 0000000..fe903d2 --- /dev/null +++ b/onvif-java/src/test/java/org/onvif/client/SimpleTest.java @@ -0,0 +1,325 @@ +package org.onvif.client; + + + +import org.onvif.ver10.recording.wsdl.*; +import de.onvif.soap.OnvifDevice; +import org.onvif.ver10.schema.*; +import org.onvif.ver10.schema.ImagingSettings; + +import java.io.*; +import java.lang.Object; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; +import java.util.Properties; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class SimpleTest { + private RecordingService recordingService; + + + + public static String getCameraDetailsPayload(String propFileRelativePath) throws Exception { + final Properties config = new Properties(); + final File f = new File(propFileRelativePath); + if (!f.exists()) throw new Exception("File not found: " + f.getAbsolutePath()); + config.load(new FileInputStream(f)); + + StringBuilder output = new StringBuilder(); + + for (Object k : config.keySet()) { + String line = config.get(k.toString()).toString(); + output.append(line).append("\n"); + OnvifCredentials credentials = GetTestDevice.parse(line); + output.append("credentials: ").append(credentials.getUser()).append("\n"); + if (credentials != null) { + try { + output.append("Connect to camera, please wait ...\n"); + OnvifDevice cam = new OnvifDevice( + credentials.getHost(), credentials.getUser(), credentials.getPassword()); + + System.out.println("Connected to device "); + + + printProfiles(cam); + + } catch (Throwable th) { + output.append("Error on device: ").append(k).append("\n"); + th.printStackTrace(); + } + } + } + return output.toString(); // Return the collected output as a string + } + // Add this method to print profiles + private static void printProfiles(OnvifDevice cam) { + +// imagingSettings20.setBrightness(80.0F); +// System.out.println(cam.getImaging().getImagingSettings(cam.getMedia().getVideoSources().get(0).getToken())); +// cam.getImaging().setImagingSettings(cam.getMedia().getVideoSources().get(0).getToken(),imagingSettings20,false); +// +// ImagingSettings20 imagingSettings=new ImagingSettings20(); +// imagingSettings.setBrightness(50.0F); +// cam.getImaging().setImagingSettings(cam.getMedia().getVideoSources().get(0).getToken(),imagingSettings,false); + System.out.println(cam.getReplay()); + + } + + private static String printNetworkInterfaces(OnvifDevice cam) { + StringBuilder output = new StringBuilder(); + try { + List interfaces = cam.getDevice().getNetworkInterfaces(); + output.append("Network Interfaces:\n"); + for (NetworkInterface iface : interfaces) { + output.append(iface).append("\n"); + } + } catch (Throwable th) { + output.append("Error getting network interfaces: ").append(th.getMessage()).append("\n"); + } + return output.toString(); + } + + private static String printNetworkDefaultGateway(OnvifDevice cam) { + StringBuilder output = new StringBuilder(); + try { + NetworkGateway defaultGateway = cam.getDevice().getNetworkDefaultGateway(); + output.append("Network Default Gateway:\n"); + output.append(defaultGateway).append("\n"); + } catch (Throwable th) { + output.append("Error getting network default gateway: ").append(th.getMessage()).append("\n"); + } + return output.toString(); + } + + private static String printSystemDateAndTime(OnvifDevice cam) { + StringBuilder output = new StringBuilder(); + try { + SystemDateTime dateTime = cam.getDevice().getSystemDateAndTime(); + output.append("System Date and Time:\n"); + output.append(dateTime).append("\n"); + } catch (Throwable th) { + output.append("Error getting system date and time: ").append(th.getMessage()).append("\n"); + } + return output.toString(); + } + + + + private static String setosd(OnvifDevice cam,String user,String pass) { +// try { +// List osdConfigurations = cam.getMedia().getOSDs(null); +// // Assuming you want to update the second OSD configuration +// OSDConfiguration osdConfiguration = osdConfigurations.get(1); +// +//// Create the SetOSD object +// SetOSD setOSD = new SetOSD(); +// +//// Set the OSDConfiguration in the SetOSD object +// setOSD.setOSD(osdConfiguration); +// +//// Retrieve the current token +// String osdToken = osdConfiguration.getToken(); +//// Set the token explicitly (optional if already set) +// osdConfiguration.setToken(osdToken); +// +//// Set the VideoSourceConfigurationToken (ensure it's correct) +// osdConfiguration.setVideoSourceConfigurationToken(osdConfiguration.getVideoSourceConfigurationToken()); +// +//// Set the OSD type (if necessary) +// osdConfiguration.setType(osdConfiguration.getType()); +// +//// Set the position (create and set a new position if needed) +// OSDPosConfiguration position = new OSDPosConfiguration(); +// position.setType("Custom"); +// Vector positionVector = new Vector(); +// positionVector.setX(0.5F); // Example x coordinate +// positionVector.setY(0.5F); // Example y coordinate +// position.setPos(positionVector); +// osdConfiguration.setPosition(position); +// +//// Set the text string +// OSDTextConfiguration textString = osdConfiguration.getTextString(); +// textString.setType("Plain"); +// textString.setPlainText("cam111"); +// +//// Print the modified OSD configuration for debugging +// System.out.println(osdConfiguration); +// +//// Set the OSD configuration in the SetOSD object +// setOSD.setOSD(osdConfiguration); +// +// int port = extractPortFromUrl("rtsp://192.168.50.44:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif"); +// Utility method to extract port from RTSP URL + +// List profiles = cam.getMedia().getProfiles(); +// System.out.println(cam.getMedia().getProfiles()); +// +// // Print the profiles' name and token in the format "{name, token}" +// List profileStrings = profiles.stream() +// .map(profile -> String.format("{%s, %s}", profile.getName(), profile.getToken())) +// .collect(Collectors.toList()); +// +// profileStrings.forEach(System.out::println); // Printing profile details +// +// // Get and print the stream URIs for each profile +// profiles.forEach(profile -> { +// String streamUri = cam.getStreamUri(profile.getToken()); +// System.out.println("Stream URI for profile " + profile.getName() + ": " + streamUri); +// }); + + + +// // Create a GetReplayUri request +// GetReplayUri getReplayUri = new GetReplayUri(); +// +// StreamSetup streamSetup = new StreamSetup(); +// StreamType streamType = StreamType.RTP_UNICAST; // Or RTP-Multicast +// Transport transport = new Transport(); +// transport.setProtocol(TransportProtocol.HTTP); // Or TCP, UDP +// +// streamSetup.setStream(streamType); +// streamSetup.setTransport(transport); +// +// +// // Calculate start and end times (last 10 minutes) +// Date endTime = new Date(); // Current UTC time +// Date startTime = new Date(endTime.getTime() - 10 * 60 * 200); // Subtract 10 minutes +// +// // Format timestamps for ONVIF (UTC, ISO 8601 format) +// SimpleDateFormat iso8601 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); +// iso8601.setTimeZone(TimeZone.getTimeZone("UTC")); +// +// // Fetch the Replay URI +// String replayUri = cam.getReplay().getReplayUri(streamSetup,"RecordMediaProfile00000"); +// +//// Modify the Replay URI +// replayUri = modifyReplayUri(replayUri); +// System.out.println("Replay URI: " + startTime); +//// Save video segment using FFmpeg +// saveVideoSegment(replayUri, startTime, endTime,user,pass); + + + + + // Device device = cam.getDevice(); + // List networkProtocols = device.getNetworkProtocols(); +// +// final String[] httpPort = {null}; // Use an array to store the port +// +// networkProtocols.stream() +// .filter(protocol -> "HTTP".equals(protocol.getName().value())) // Filter for HTTP protocol +// .findFirst() // Find the first match +// .ifPresent(protocol -> httpPort[0] = protocol.getPort().get(0).toString()); +////System.out.println(cam.getReplay().getReplayUri(streamSetup,cam.getRecordings1().getRecordings().get(0).getRecordingToken())); +// System.out.println(networkProtocols); +// } catch (Exception e) { +// System.out.println("Failed to update OSD: " + e.getMessage()); +// e.printStackTrace(); +// } +// return null; +//System.out.println(cam.getRecordings1().getRecordings().get(0).getTracks()); + + return ""; + } + private static String modifyReplayUri(String replayUri) { + if (replayUri == null || replayUri.isEmpty()) { + throw new IllegalArgumentException("Replay URI is null or empty"); + } + + try { + // Replace "http" with "rtsp" and change port from 80 to 554 + replayUri = replayUri.replaceFirst("http://", "rtsp://") + .replace(":80/", ":554/"); + System.out.println("Modified Replay URI: " + replayUri); + } catch (Exception e) { + System.err.println("Error modifying replay URI: " + e.getMessage()); + } + return replayUri; + } + + private static int extractPortFromUrl(String url) { + Pattern pattern = Pattern.compile(":(\\d+)/"); + Matcher matcher = pattern.matcher(url); + if (matcher.find()) { + return Integer.parseInt(matcher.group(1)); + } + throw new IllegalArgumentException("Port not found in URL: " + url); + } + + private static void saveVideoSegment(String replayUri, Date startTime, Date endTime,String username,String password) { + try { + // Calculate duration in seconds + long durationInSeconds = (endTime.getTime() - startTime.getTime()) / 1000; + + // Generate output file name with timestamp + SimpleDateFormat timestampFormat = new SimpleDateFormat("yyyyMMddHHmmss"); + String outputFileName = "video_last_10_mins_" + timestampFormat.format(startTime) + ".mp4"; + String authenticatedReplayUri = replayUri.replaceFirst("rtsp://", "rtsp://" + username + ":" + password + "@"); + SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm:ss"); + String startTimeFormatted = timeFormat.format(startTime); +System.out.println(startTimeFormatted); + + String[] command = { + "ffmpeg", + "-rtsp_transport", "tcp", // Ensure reliable RTSP transport + "-ss", startTimeFormatted, // Start time for the segment (before -i for faster seeking) + "-i", authenticatedReplayUri, + "-t", String.valueOf(durationInSeconds), // Duration in seconds + "-copyts", // Preserve input timestamps to avoid shifting the video + "-c:v", "copy", // Copy video stream without re-encoding + "-c:a", "aac", // Transcode audio stream to AAC + outputFileName + }; + + // Execute FFmpeg command + ProcessBuilder processBuilder = new ProcessBuilder(command); + processBuilder.redirectErrorStream(true); // Merge error stream with output + Process process = processBuilder.start(); + + // Read FFmpeg output (optional, for debugging) + try (BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()))) { + String line; + while ((line = reader.readLine()) != null) { + System.out.println(line); + } + } + + // Wait for FFmpeg to complete + int exitCode = process.waitFor(); + if (exitCode == 0) { + System.out.println("Video saved successfully as " + outputFileName); + } else { + System.err.println("FFmpeg process failed with exit code " + exitCode); + } + + } catch (Exception e) { + e.printStackTrace(); + System.err.println("Error saving video segment: " + e.getMessage()); + } + } + + public static void main(String[] args) { + final String propFileRelativePath = "C:/rajmohan/onvif/onvif-java/src/test/resources/onvif.properties"; + final String outputFilePath = "C:/rajmohan/onvif/onvif-java/src/test/resources/output.xml"; + + try { + // Get the payload + String payload = getCameraDetailsPayload(propFileRelativePath); + if (payload != null) { + // Write payload to XML file + try (FileWriter fileWriter = new FileWriter(new File(outputFilePath))) { + fileWriter.write(payload); +// System.out.println("Payload written to " + outputFilePath); + } catch (IOException e) { + System.out.println("Error writing to file: " + e.getMessage()); + } + } else { + System.out.println("No payload created."); + } + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/onvif-java/src/test/java/org/onvif/client/SoapClient.java b/onvif-java/src/test/java/org/onvif/client/SoapClient.java new file mode 100644 index 0000000..535bc20 --- /dev/null +++ b/onvif-java/src/test/java/org/onvif/client/SoapClient.java @@ -0,0 +1,82 @@ +package org.onvif.client; + +import java.io.*; +import java.net.HttpURLConnection; +import java.net.URL; +import java.util.Base64; + +public class SoapClient { + private static final String SOAP_ENDPOINT_URL = "http://192.168.51.137/onvif/device_service"; // Replace with actual device IP and port + private static final String SOAP_ACTION = "http://www.onvif.org/ver10/device/wsdl/GetGeoLocation"; + private static final String USERNAME = "onvif1"; // Replace with your username + private static final String PASSWORD = "godspeed123"; // Replace with your password + + public static void main(String[] args) { + try { + // Construct the SOAP request XML + String soapRequest = "" + + "" + + "" + + "" + + "" + + "" + + ""; + + // Create a connection to the SOAP endpoint + URL url = new URL(SOAP_ENDPOINT_URL); + HttpURLConnection connection = (HttpURLConnection) url.openConnection(); + connection.setRequestMethod("POST"); + connection.setRequestProperty("Content-Type", "text/xml; charset=utf-8"); + connection.setRequestProperty("SOAPAction", SOAP_ACTION); + connection.setDoOutput(true); + + // Add Basic Authentication + String auth = USERNAME + ":" + PASSWORD; + String encodedAuth = Base64.getEncoder().encodeToString(auth.getBytes("UTF-8")); + connection.setRequestProperty("Authorization", "Basic " + encodedAuth); + + // Send the SOAP request + OutputStream os = connection.getOutputStream(); + os.write(soapRequest.getBytes("UTF-8")); + os.flush(); + os.close(); + + // Check the response code + int responseCode = connection.getResponseCode(); + if (responseCode == HttpURLConnection.HTTP_OK) { + // Read the SOAP response + BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream())); + String inputLine; + StringBuilder response = new StringBuilder(); + + while ((inputLine = in.readLine()) != null) { + response.append(inputLine); + } + in.close(); + + // Print the SOAP response + System.out.println("Response:"); + System.out.println(response.toString()); + } else { + // Handle errors + System.out.println("Error: " + responseCode); + BufferedReader in = new BufferedReader(new InputStreamReader(connection.getErrorStream())); + String inputLine; + StringBuilder errorResponse = new StringBuilder(); + + while ((inputLine = in.readLine()) != null) { + errorResponse.append(inputLine); + } + in.close(); + + // Print the error response + System.out.println("Error Response:"); + System.out.println(errorResponse.toString()); + } + + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/onvif-java/src/test/java/org/onvif/client/TestDevice.java b/onvif-java/src/test/java/org/onvif/client/TestDevice.java new file mode 100644 index 0000000..cdf0a53 --- /dev/null +++ b/onvif-java/src/test/java/org/onvif/client/TestDevice.java @@ -0,0 +1,196 @@ +package org.onvif.client; + +import de.onvif.beans.DeviceInfo; +import de.onvif.soap.OnvifDevice; +import de.onvif.utils.OnvifUtils; +import java.io.IOException; +import java.net.URL; +import java.util.List; +import javax.xml.soap.SOAPException; +import org.onvif.ver10.device.wsdl.DeviceServiceCapabilities; +import org.onvif.ver10.events.wsdl.EventPortType; +import org.onvif.ver10.events.wsdl.GetEventProperties; +import org.onvif.ver10.events.wsdl.GetEventPropertiesResponse; +import org.onvif.ver10.media.wsdl.Media; +import org.onvif.ver10.schema.AudioSource; +import org.onvif.ver10.schema.PTZPreset; +import org.onvif.ver10.schema.PTZStatus; +import org.onvif.ver10.schema.Profile; +import org.onvif.ver10.schema.VideoSource; +import org.onvif.ver20.imaging.wsdl.ImagingPort; +import org.onvif.ver20.ptz.wsdl.Capabilities; +import org.onvif.ver20.ptz.wsdl.PTZ; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +/** @author Brad Lowe */ +public class TestDevice { + private static final Logger LOG = LoggerFactory.getLogger(TestDevice.class); + + public static String testCamera(OnvifCredentials creds) throws SOAPException, IOException { + URL u = + creds.getHost().startsWith("http") + ? new URL(creds.getHost()) + : new URL("http://" + creds.getHost()); + return testCamera(u, creds.getUser(), creds.getPassword()); + } + + static String sep = "\n"; + + // This method returns information about an initialized OnvifDevice. + // This could throw an uncaught SOAP or other error on some cameras... + // Would accept Pull Requests on printing out additional information about devices. + public static String inspect(OnvifDevice device) { + String out = ""; + DeviceInfo info = device.getDeviceInfo(); + out += "DeviceInfo:" + sep + "\t" + info + sep; + DeviceServiceCapabilities caps = device.getDevice().getServiceCapabilities(); + String sysCaps = OnvifUtils.format(caps); + sysCaps = sysCaps.replace("],", "],\t\n"); + + out += "\tgetServiceCapabilities: " + sysCaps + sep; + // out += "\tgetServiceCapabilities.getSystem: " + OnvifUtils.format(caps.getSystem()) + sep; + + Media media = device.getMedia(); + + media.getVideoSources(); + List profiles = media.getProfiles(); + out += "Media Profiles: " + profiles.size() + sep; + for (Profile profile : profiles) { + String profileToken = profile.getToken(); + String rtsp = device.getStreamUri(profileToken); + out += "\tProfile: " + profile.getName() + " token=" + profile.getToken() + sep; + out += "\t\tstream: " + rtsp + sep; + out += "\t\tsnapshot: " + device.getSnapshotUri(profileToken) + sep; + out += "\t\tdetails:" + OnvifUtils.format(profile) + sep; + } + + try { + List videoSources = media.getVideoSources(); + out += "VideoSources: " + videoSources.size() + sep; + for (VideoSource v : videoSources) out += "\t" + OnvifUtils.format(v) + sep; + + ImagingPort imaging = device.getImaging(); + if (imaging != null && videoSources.size() > 0) { + String token = videoSources.get(0).getToken(); + + out += "Imaging:" + token + sep; + try { + org.onvif.ver20.imaging.wsdl.Capabilities image_caps = imaging.getServiceCapabilities(); + out += "\tgetServiceCapabilities=" + OnvifUtils.format(image_caps) + sep; + + if (token != null) { + out += + "\tgetImagingSettings=" + + OnvifUtils.format(imaging.getImagingSettings(token)) + + sep; + out += "\tgetMoveOptions=" + OnvifUtils.format(imaging.getMoveOptions(token)) + sep; + out += "\tgetStatus=" + OnvifUtils.format(imaging.getStatus(token)) + sep; + out += "\tgetOptions=" + OnvifUtils.format(imaging.getOptions(token)) + sep; + } + } catch (Throwable th) { + out += "Imaging unavailable:" + th.getMessage() + sep; + } + } + } catch (Throwable th) { + // this can fail if the device doesn't support video sources. + out += "VideoSources: " + th.getMessage() + sep; + } + try { + // This may throw a SoapFaultException with the message "This device does not support audio" + List audioSources = media.getAudioSources(); + out += "AudioSources: " + audioSources.size() + sep; + for (AudioSource a : audioSources) out += "\t" + OnvifUtils.format(a) + sep; + } catch (Throwable th) { + out += "AudioSources Unavailable: " + th.getMessage() + sep; + } + + try { + EventPortType events = device.getEvents(); + if (events != null) { + out += "Events:" + sep; + out += + "\tgetServiceCapabilities=" + OnvifUtils.format(events.getServiceCapabilities()) + sep; + + GetEventProperties getEventProperties = new GetEventProperties(); + GetEventPropertiesResponse getEventPropertiesResp = + events.getEventProperties(getEventProperties); + out += "\tMessageContentFilterDialects:" + sep; + for (String f : getEventPropertiesResp.getMessageContentFilterDialect()) + out += ("\t\t" + f + sep); + out += "\tTopicExpressionDialects:" + sep; + for (String f : getEventPropertiesResp.getTopicExpressionDialect()) + out += ("\t\t" + f + sep); + + out += "\tTopics:" + sep; + StringBuffer tree = new StringBuffer(); + for (Object object : getEventPropertiesResp.getTopicSet().getAny()) { + Element e = (Element) object; + printTree(e, e.getNodeName(), tree); + // WsNotificationTest.printTree(e, e.getNodeName()); + } + out += tree; + } + } catch (Throwable th) { + out += "Events Unavailable: " + th.getMessage() + sep; + } + PTZ ptz = device.getPtz(); + if (ptz != null) { + + String profileToken = profiles.get(0).getToken(); + try { + Capabilities ptz_caps = ptz.getServiceCapabilities(); + out += "PTZ:" + sep; + out += "\tgetServiceCapabilities=" + OnvifUtils.format(ptz_caps) + sep; + PTZStatus s = ptz.getStatus(profileToken); + out += "\tgetStatus=" + OnvifUtils.format(s) + sep; + // out += "ptz.getConfiguration=" + ptz.getConfiguration(profileToken) + sep; + List presets = ptz.getPresets(profileToken); + if (presets != null && !presets.isEmpty()) { + out += "\tPresets:" + presets.size() + sep; + for (PTZPreset p : presets) out += "\t\t" + OnvifUtils.format(p) + sep; + } + } catch (Throwable th) { + out += "PTZ: Unavailable" + th.getMessage() + sep; + } + } + + return out; + } + + public static void printTree(Node node, String name, StringBuffer buffer) { + + if (node.hasChildNodes()) { + NodeList nodes = node.getChildNodes(); + for (int i = 0; i < nodes.getLength(); i++) { + Node n = nodes.item(i); + printTree(n, name + " - " + n.getNodeName(), buffer); + } + } else { + buffer.append("\t\t" + name + " - " + node.getNodeName() + "\n"); + } + } + + public static String testCamera(URL url, String user, String password) + throws SOAPException, IOException { + LOG.info("Testing camera:" + url); + OnvifDevice device = new OnvifDevice(url, user, password); + return inspect(device); + } + + public static void main(String[] args) { + OnvifCredentials creds = GetTestDevice.getOnvifCredentials(args); + try { + // OnvifDevice.setVerbose(true); + String out = testCamera(creds); + + LOG.info("\n" + out + "\n"); + } catch (Throwable th) { + LOG.error("Failed for " + creds, th); + th.printStackTrace(); + } + } +} diff --git a/onvif-java/src/test/java/org/onvif/client/WsNotificationTest.java b/onvif-java/src/test/java/org/onvif/client/WsNotificationTest.java new file mode 100644 index 0000000..78715ce --- /dev/null +++ b/onvif-java/src/test/java/org/onvif/client/WsNotificationTest.java @@ -0,0 +1,182 @@ +package org.onvif.client; + +import de.onvif.soap.OnvifDevice; +import java.io.File; +import java.io.IOException; +import java.net.ConnectException; +import java.net.URL; +import java.util.Arrays; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.soap.SOAPException; +import org.apache.activemq.ActiveMQConnectionFactory; +import org.apache.commons.io.FileUtils; +import org.apache.cxf.wsn.client.Consumer; +import org.apache.cxf.wsn.client.NotificationBroker; +import org.apache.cxf.wsn.client.Subscription; +import org.apache.cxf.wsn.services.JaxwsNotificationBroker; +import org.oasis_open.docs.wsn.b_2.FilterType; +import org.oasis_open.docs.wsn.b_2.NotificationMessageHolderType; +import org.oasis_open.docs.wsn.b_2.TopicExpressionType; +import org.oasis_open.docs.wsn.bw_2.InvalidFilterFault; +import org.oasis_open.docs.wsn.bw_2.InvalidMessageContentExpressionFault; +import org.oasis_open.docs.wsn.bw_2.InvalidProducerPropertiesExpressionFault; +import org.oasis_open.docs.wsn.bw_2.InvalidTopicExpressionFault; +import org.oasis_open.docs.wsn.bw_2.NotifyMessageNotSupportedFault; +import org.oasis_open.docs.wsn.bw_2.SubscribeCreationFailedFault; +import org.oasis_open.docs.wsn.bw_2.TopicExpressionDialectUnknownFault; +import org.oasis_open.docs.wsn.bw_2.TopicNotSupportedFault; +import org.oasis_open.docs.wsn.bw_2.UnacceptableInitialTerminationTimeFault; +import org.oasis_open.docs.wsn.bw_2.UnrecognizedPolicyRequestFault; +import org.oasis_open.docs.wsn.bw_2.UnsupportedPolicyRequestFault; +import org.oasis_open.docs.wsrf.rw_2.ResourceUnknownFault; +import org.onvif.ver10.events.wsdl.CreatePullPointSubscription; +import org.onvif.ver10.events.wsdl.CreatePullPointSubscription.SubscriptionPolicy; +import org.onvif.ver10.events.wsdl.CreatePullPointSubscriptionResponse; +import org.onvif.ver10.events.wsdl.EventPortType; +import org.onvif.ver10.events.wsdl.GetEventProperties; +import org.onvif.ver10.events.wsdl.GetEventPropertiesResponse; +import org.onvif.ver10.schema.Capabilities; +import org.onvif.ver10.schema.CapabilityCategory; +import org.onvif.ver10.schema.MediaUri; +import org.onvif.ver10.schema.Profile; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +public class WsNotificationTest { + + public static void main(String[] args) throws IOException { + OnvifCredentials creds = GetTestDevice.getOnvifCredentials(args); + System.out.println("Connect to camera, please wait ..."); + + OnvifDevice cam = null; + try { + cam = new OnvifDevice(creds.getHost(), creds.getUser(), creds.getPassword()); + } catch (ConnectException | SOAPException e1) { + System.err.println("No connection to device with IP " + creds + ", please try again."); + System.exit(0); + } + System.out.println("Connected to device " + cam.getDeviceInfo()); + + // Get device capabilities + Capabilities cap = cam.getDevice().getCapabilities(Arrays.asList(CapabilityCategory.ALL)); + System.out.println(cap.getDevice().toString()); + + // Print profiles + printProfiles(cam); + + EventPortType eventWs = cam.getEvents(); + GetEventProperties getEventProperties = new GetEventProperties(); + GetEventPropertiesResponse getEventPropertiesResp = + eventWs.getEventProperties(getEventProperties); + getEventPropertiesResp.getMessageContentFilterDialect().forEach(System.out::println); + getEventPropertiesResp.getTopicExpressionDialect().forEach(System.out::println); + for (Object object : getEventPropertiesResp.getTopicSet().getAny()) { + Element e = (Element) object; + printTree(e, e.getNodeName()); + } + + // Subscribe to all events by using the root topic or no topic at all + org.oasis_open.docs.wsn.b_2.ObjectFactory objectFactory = + new org.oasis_open.docs.wsn.b_2.ObjectFactory(); + CreatePullPointSubscription pullPointSubscription = new CreatePullPointSubscription(); + FilterType filter = new FilterType(); + TopicExpressionType topicExp = new TopicExpressionType(); + + // Subscribe to all events by using the root topic or no specific topic filter + topicExp.getContent().add("tns1:Device"); // Root topic expression for all device events + topicExp.setDialect("http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"); + JAXBElement topicExpElem = objectFactory.createTopicExpression(topicExp); + filter.getAny().add(topicExpElem); // This filters for all device events + pullPointSubscription.setFilter(filter); + + org.onvif.ver10.events.wsdl.ObjectFactory eventObjFactory = + new org.onvif.ver10.events.wsdl.ObjectFactory(); + SubscriptionPolicy subscriptionPolicy = + eventObjFactory.createCreatePullPointSubscriptionSubscriptionPolicy(); + pullPointSubscription.setSubscriptionPolicy(subscriptionPolicy); + String timespan = "PT10S"; // Poll every 10 seconds + pullPointSubscription.setInitialTerminationTime( + objectFactory.createSubscribeInitialTerminationTime(timespan)); + + try { + CreatePullPointSubscriptionResponse resp = + eventWs.createPullPointSubscription(pullPointSubscription); +System.out.println(resp); + // Start a consumer that will listen for notification messages + String eventConsumerAddress = "http://localhost:9001/MyConsumer"; + Consumer consumer = + new Consumer( + message -> { + Object o = message.getMessage().getAny(); + System.out.println("Received notification:"); + if (o instanceof Element) { + System.out.println(((Element) o).getTextContent()); + } + }, + eventConsumerAddress); + + String queuePort = "8182"; + String brokerPort = "8181"; + String brokerAddress = "http://localhost:" + brokerPort + "/wsn/NotificationBroker"; + ActiveMQConnectionFactory activemq = + new ActiveMQConnectionFactory( + "vm:(broker:(tcp://localhost:" + queuePort + ")?persistent=false)"); + JaxwsNotificationBroker notificationBrokerServer = + new JaxwsNotificationBroker("WSNotificationBroker", activemq); + notificationBrokerServer.setAddress(brokerAddress); + notificationBrokerServer.init(); + + // Create a subscription for a Topic on the broker + NotificationBroker notificationBroker = new NotificationBroker(brokerAddress); + Subscription subscription = notificationBroker.subscribe(consumer, "tns1:Device"); + + // Wait for some messages to accumulate in the pull point + Thread.sleep(50_000); + + // Cleanup and exit + subscription.unsubscribe(); + consumer.stop(); + + } catch (TopicNotSupportedFault + | TopicExpressionDialectUnknownFault + | InvalidTopicExpressionFault + | InvalidMessageContentExpressionFault + | InvalidProducerPropertiesExpressionFault + | UnacceptableInitialTerminationTimeFault + | NotifyMessageNotSupportedFault + | ResourceUnknownFault + | UnsupportedPolicyRequestFault + | InvalidFilterFault + | SubscribeCreationFailedFault + | UnrecognizedPolicyRequestFault e) { + e.printStackTrace(); + } catch (InterruptedException e) { + e.printStackTrace(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + public static void printTree(Node node, String name) { + if (node.hasChildNodes()) { + NodeList nodes = node.getChildNodes(); + for (int i = 0; i < nodes.getLength(); i++) { + Node n = nodes.item(i); + printTree(n, name + " - " + n.getNodeName()); + } + } else { + System.out.println(name + " - " + node.getNodeName()); + } + } + + private static void printProfiles(OnvifDevice cam) { + List profiles = cam.getMedia().getProfiles(); + for (Profile p : profiles) { + System.out.printf( + "Profile: [token=%s,name=%s,snapshotUri=%s]%n", + p.getToken(), p.getName(), cam.getMedia().getSnapshotUri(p.getToken()).getUri()); + } + } +} diff --git a/onvif-java/src/test/resources/onvif.properties b/onvif-java/src/test/resources/onvif.properties new file mode 100644 index 0000000..c34dea9 --- /dev/null +++ b/onvif-java/src/test/resources/onvif.properties @@ -0,0 +1,2 @@ +#device name,IP address,username,password,profile-token +mycam1=10.197.171.5,admin,keltron@123,MediaProfile000 \ No newline at end of file diff --git a/onvif-java/src/test/resources/output.xml b/onvif-java/src/test/resources/output.xml new file mode 100644 index 0000000..91e5f18 --- /dev/null +++ b/onvif-java/src/test/resources/output.xml @@ -0,0 +1,3 @@ +10.197.171.5,admin,keltron@123,MediaProfile000 +credentials: admin +Connect to camera, please wait ... diff --git a/onvif-ws-client/pom.xml b/onvif-ws-client/pom.xml new file mode 100644 index 0000000..c8b560b --- /dev/null +++ b/onvif-ws-client/pom.xml @@ -0,0 +1,189 @@ + + 4.0.0 + + org.onvif + onvif + 1.0-SNAPSHOT + + onvif-ws-client + + + + org.apache.cxf + cxf-rt-frontend-jaxws + ${cxf.version} + + + + + + + + org.apache.cxf + cxf-rt-transports-http-jetty + ${cxf.version} + + + + + + javax.xml.ws + jaxws-api + 2.3.1 + + + + javax.jws + javax.jws-api + 1.1 + + + + org.apache.cxf.services.wsn + cxf-services-wsn-core + ${cxf.version} + + + + + org.apache.commons + commons-lang3 + 3.8.1 + compile + + + + org.apache.cxf.xjc-utils + cxf-xjc-runtime + 3.3.0 + + + + org.apache.maven + maven-model-builder + 3.6.1 + + + + + + + + org.apache.cxf + cxf-codegen-plugin + 3.3.2 + + + generate-ws-stubs + generate-sources + + wsdl2java + + + ${basedir}/src/main/resources/wsdl + ${basedir}/src/main/java + + + *.wsdl + + + + + -xjc-Xbg + -xjc-Xts + -verbose + -suppress-generated-date + -wsdlLocation + null + + -catalog + ${basedir}/src/main/resources/wsdl/jax-ws-catalog.xml + + + + + + + + + org.apache.cxf + cxf-rt-bindings-soap + 3.1.0 + + + + org.apache.cxf.xjcplugins + cxf-xjc-boolean + 3.1.0 + + + + org.apache.cxf.xjcplugins + cxf-xjc-ts + 3.1.0 + + + org.apache.cxf.xjc-utils + cxf-xjc-runtime + 3.3.0 + + + + org.apache.maven + maven-model-builder + 3.6.1 + + + + + com.sun.activation + javax.activation + ${javax.activation.version} + + + + javax.xml.bind + jaxb-api + ${jaxb.api.version} + + + + com.sun.xml.bind + jaxb-core + 2.3.0.1 + + + + com.sun.xml.bind + jaxb-impl + ${jaxb.api.version} + + + + javax.annotation + javax.annotation-api + 1.3.1 + + + javax.xml.ws + jaxws-api + 2.3.0 + + + javax.activation + activation + 1.1.1 + + + + + + + + \ No newline at end of file diff --git a/onvif-ws-client/src/main/java/.gitignore b/onvif-ws-client/src/main/java/.gitignore new file mode 100644 index 0000000..cf1db2e --- /dev/null +++ b/onvif-ws-client/src/main/java/.gitignore @@ -0,0 +1 @@ +/org/ diff --git a/onvif-ws-client/src/main/resources/wsdl/accesscontrol_1.0.wsdl b/onvif-ws-client/src/main/resources/wsdl/accesscontrol_1.0.wsdl new file mode 100644 index 0000000..f19357a --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/accesscontrol_1.0.wsdl @@ -0,0 +1,931 @@ + + + + + + + + + + + + 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: + + + + + + + + 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. + + + + + + + + + + Used as extension base for AccessPointInfo. + + + + + + + + A user readable name. It shall be up to 64 characters. + + + + + + Optional user readable description for the AccessPoint. It shall + be up to 1024 characters. + + + + + + Optional reference to the Area from which access is requested. + + + + + + Optional reference to the Area to which access is requested. + + + + + + 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: + "http://www.onvif.org/ver10/doorcontrol/wsdl". This field is provided + for future extensions; it will allow an AccessPoint being extended to cover + entity types other than Doors as well. + + + + + + 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. + + + + + + + + + + + + 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). + </p><p> + 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. + </p><p> + + An ONVIF compliant device shall provide the following fields for each AccessPoint + instance: + + + + + + + + The capabilities for the AccessPoint. + + + + + + + + + + + + + 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: + + + + + + + + Indicates whether or not this AccessPoint instance supports + EnableAccessPoint and DisableAccessPoint commands. + + + + + + Indicates whether or not this AccessPoint instance supports generation + of duress events. + + + + + + Indicates whether or not this AccessPoint has a REX switch or other + input that allows anonymous access. + + + + + + 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. + + + + + + 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. + + + + + + + + + + Basic information about an Area. Used as extension base. + + + + + + + + User readable name. It shall be up to 64 characters. + + + + + + User readable description for the Area. It shall be up to 1024 + characters. + + + + + + + + + + + + The AreaInfo structure contains basic information about an Area. + An ONVIF compliant device shall provide the following fields for each Area: + + + + + + + + + + + + + + + The AccessPointState contains state information for an AccessPoint. + An ONVIF compliant device shall provide the following fields for each AccessPoint + instance: + + + + + + Indicates that the AccessPoint is enabled. By default this field + value shall be True, if the DisableAccessPoint capabilities is not supported. + + + + + + + + + + + + The Decision enumeration represents a choice of two available options for an access + request: + + + + + + The decision is to grant access. + + + + + The decision is to deny access. + + + + + + + + + Non-normative enum that describes the various reasons for denying access. + The following strings shall be used for the reason field: + + + + + + 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. + + + + + + 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. + + + + + + The device shall provide the following event, whenever a valid + credential was presented after its expiry date. + + + + + + The device shall provide the following event, whenever an entered + PIN code does not match the credential. + + + + + + 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. + + + + + + The device shall provide the following event, whenever the presented + credential is not authorized. + + + + + + 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. + + + + + + + + + + + + + + + + + + + + The capability response message contains the requested Access + Control service capabilities using a hierarchical XML capability structure. + + + + + + + + + + + + + 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. + + + + + + Start returning entries from this start reference. If not + specified, entries shall start from the beginning of the dataset. + + + + + + + + + + + + + StartReference to use in next call to get the following items. If + absent, no more items to get. + + + + + + List of AccessPointInfo items. + + + + + + + + + + + + Tokens of AccessPointInfo items to get. + + + + + + + + + + + + List of AccessPointInfo items. + + + + + + + + + + + + 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. + + + + + + Start returning entries from this start reference. If not + specified, entries shall start from the beginning of the dataset. + + + + + + + + + + + + + StartReference to use in next call to get the following items. If + absent, no more items to get. + + + + + + List of AreaInfo items. + + + + + + + + + + + + Tokens of AreaInfo items to get. + + + + + + + + + + + + List of AreaInfo items. + + + + + + + + + + + + Token of AccessPoint instance to get AccessPointState for. + + + + + + + + + + + + + AccessPointState item. + + + + + + + + + + + + Token of the AccessPoint instance to enable. + + + + + + + + + + + + + + + + + + + Token of the AccessPoint instance to disable. + + + + + + + + + + + + + + + + + + + Token of the Access Point instance. + + + + + Optional token of the Credential involved. + + + + + Optional reason for decision. + + + + + Decision - Granted or Denied. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This operation returns the capabilities of the Access Control service. + </p><p> + An ONVIF compliant device which provides the Access Control service shall + implement this method. + + + + + + + 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. + </p><p> + 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. + </p><p> + The number of items returned shall not be greater than Limit parameter. + </p><p> + + + + + + + This operation requests a list of AccessPointInfo items matching the given tokens. + </p><p> + An ONVIF compliant device which provides Access Control service shall implement this method. + </p><p> + 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. + </p><p> + If the number of requested items is greater than MaxLimit, a TooManyItems + fault shall be returned. + </p><p> + + + + + + + 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. + </p><p> + 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. + </p><p> + The number of items returned shall not be greater than Limit parameter. + </p><p> + + + + + + + + This operation requests a list of AreaInfo items matching the given tokens. + </p><p> + An ONVIF compliant device which provides Access Control service shall implement this method. + </p><p> + 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. + </p><p> + If the number of requested items is greater than MaxLimit, a TooManyItems + fault shall be returned. + </p><p> + + + + + + + This operation requests the AccessPointState for the AccessPoint instance specified by + Token. + </p><p> + An ONVIF compliant device that provides Access Control service shall implement this method. + + + + + + + This operation allows enabling an access point. + </p><p> + A device that signals support for DisableAccessPoint capability for a particular AccessPoint + instance shall implement this command. + </p><p> + + + + + + + This operation allows disabling an access point. + </p><p> + A device that signals support for DisableAccessPoint capability for a particular AccessPoint + instance shall implement this command. + </p><p> + + + + + + + This operation allows to Deny or Grant decision at an AccessPoint instance. + </p><p> + A device that signals support for ExternalAuthorization capability for a particular + AccessPoint instance shall implement this method. + + + + + + + + + Copyright (c) 2010-2013 by ONVIF: Open Network Video Interface Forum. All rights reserved. +
+ This is the initial minimized version of the Access Control service + aimed at the first PACS Profile C. +
+ + + 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. +
+ + + The basic data structures used by the service are: + + * CredentialInfo holding basic information of a credential. +
+ * 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. +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
diff --git a/onvif-ws-client/src/main/resources/wsdl/accessrules_1.0.wsdl b/onvif-ws-client/src/main/resources/wsdl/accessrules_1.0.wsdl new file mode 100644 index 0000000..e256359 --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/accessrules_1.0.wsdl @@ -0,0 +1,695 @@ + + + + + + + + + + + + + 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: + + + + + + + + + The maximum number of entries returned by a single Get<Entity>List or Get<Entity> + request. The device shall never return more than this number of entities in a single + response. + + + + + + + + + + + + Indicates the maximum number of access profiles supported by the device. + + + + + + + + + + + + Indicates the maximum number of access policies per access profile supported by the + device. + + + + + + + + + + + + Indicates whether or not several access policies can refer to the same access point in + an + access profile. + + + + + + + + + + + The access policy is an association of an access point and a schedule. It defines when + an access + point can be accessed using an access profile which contains this access policy. If an + access + profile contains several access policies specifying different schedules for the same + access + point will result in a union of the schedules. + + + + + + Reference to the schedule used by the access policy + + + + + + + Reference to the entity used by the rule engine, the entity type may be specified by + the + optional EntityType field explained below but is typically an access point. + + + + + + + Optional entity type; if missing, an access point type as defined by the ONVIF + Access + Control service should be assumed. This can also be represented by the QName value + “tac:AccessPoint” where tac is the namespace of Access Control Service + Specification. + This field is provided for future extensions; it will allow an access policy being + extended to cover entity types other than access points as well. + + + + + + + + + + + + + + + + + + The AccessProfileInfo structure contains basic information about an access profile. The + device + shall provide the following fields for each AccessProfileInfo. + + + + + + + + A user readable name. It shall be up to 64 characters. + + + + + + User readable description for the access profile. It shall be up + to 1024 characters. + + + + + + + + + + + + + The access profile structure contains information about the collection of access + policies. The + device shall include all properties of the AccessProfileInfo structure and also a list + of access + policies. + + + + + + + + A list of access policy structures, where each access policy + defines during which schedule an access point can be accessed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The capability response message contains the requested access + rules + service capabilities using a hierarchical XML capability structure. + + + + + + + + + + + + + Tokens of AccessProfileInfo items to get. + + + + + + + + + + + + List of AccessProfileInfo items. + + + + + + + + + + + + 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. + + + + + + Start returning entries from this start reference. If not + specified, + entries shall start from the beginning of the dataset. + + + + + + + + + + + + + StartReference to use in next call to get the following items. If + absent, no more items to get. + + + + + + List of AccessProfileInfo items. + + + + + + + + + + + + Tokens of AccessProfile items to get. + + + + + + + + + + + + List of Access Profile items. + + + + + + + + + + + + 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. + + + + + + Start returning entries from this start reference. If not + specified, + entries shall start from the beginning of the dataset. + + + + + + + + + + + + + StartReference to use in next call to get the following items. If + absent, no more items to get. + + + + + + List of Access Profile items. + + + + + + + + + + + + The AccessProfile to create. + + + + + + + + + + + + The Token of created AccessProfile. + + + + + + + + + + + + The details of Access Profile + + + + + + + + + + + + + + + + + + + The token of the access profile to delete. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This operation returns the capabilities of the access rules service. + + + + + + + This operation requests a list of AccessProfileInfo items matching the given tokens. 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. + If the number of requested items is greater than MaxLimit, a TooManyItems fault shall be + returned. + + + + + + + This operation requests a list of all of AccessProfileInfo items provided by the device. + 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 + Access Control + Service Specification for more details. + The number of items returned shall not be greater than Limit parameter. + + + + + + + This operation returns the specified access profile item matching the given tokens. + 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. + + + + + + + This operation requests a list of all of access profile items provided by the device. + 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 + Access Control + Service Specification for more details. + The number of items returned shall not be greater the Limit parameter. + + + + + + + This operation creates the specified access profile. The token field of the access profile + shall be + empty, the service shall allocate a token for the access profile. The allocated token shall + be returned + in the response. If the client sends any value in the token field, the device shall return + InvalidArgVal + as generic fault code. + In an access profile, if several access policies specifying different schedules for the same + access + point will result in a union of the schedule. + + + + + + + This operation will modify the access profile for the specified access profile token. If + several access + policies specifying different schedules for the same access point will result in a union of + the + schedule. + If the device could not store the access profile information then a fault will be generated. + + + + + + + This operation will delete the specified access profile. + If it is associated with one or more entities some devices may not be able to delete the + access profile, + and consequently a ReferenceInUse fault shall be generated. + If the access profile is deleted, all access policies associated to the access profile will + also be + deleted. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/onvif-ws-client/src/main/resources/wsdl/advancedsecurity_1.2.wsdl b/onvif-ws-client/src/main/resources/wsdl/advancedsecurity_1.2.wsdl new file mode 100644 index 0000000..ba9a3eb --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/advancedsecurity_1.2.wsdl @@ -0,0 +1,3236 @@ + + + + + + + + + + + + Unique identifier for keys in the keystore. + + + + + + + + + Unique identifier for certificates in the keystore. + + + + + + + + + Unique identifier for certification paths in the keystore. + + + + + + + + + + Unique identifier for passphrases in the keystore. + + + + + + + + + The status of a key in the keystore. + + + + + Key is ready for use + + + + + Key is being generated + + + + + Key has not been successfully generated and cannot be used. + + + + + + + + + An object identifier (OID) in dot-decimal form as specified in + RFC4512. + + + + + + + + + + The distinguished name attribute type encoded as specified in RFC + 4514. + + + + + + + + + The distinguished name attribute values are encoded in UTF-8 or in + hexadecimal form as specified in RFC 4514. + + + + + + + + The attributes of a key in the keystore. + + + + + The ID of the key. + + + + + The client-defined alias of the key. + + + + + Absent if the key is not a key pair. True if and only if the key is + a key pair and contains a private key. False if and only if the key is a key pair + and does not contain a private key. + + + + + + The status of the key. The value should be one of the values in the + tas:KeyStatus enumeration. + + + + + + + True if and only if the key was generated outside the device. + + + + + + True if and only if the key is stored in a specially protected + hardware component inside the device. + + + + + + + + + + + + + + + + + A distinguished name attribute type and value pair. + + + + + The attribute type. + + + + + The value of the attribute. + + + + + + + + + + A multi-valued RDN + + + + + A list of types and values defining a multi-valued RDN + + + + + + + + + + + A country name as specified in + X.500. + + + + + + An organization name as specified in + X.500. + + + + + + An organizational unit name as specified in + X.500. + + + + + + A distinguished name qualifier as specified in + X.500. + + + + + + A state or province name as specified in + X.500. + + + + + + A common name as specified in + X.500. + + + + + + A serial number as specified in + X.500. + + + + + + A locality as specified in X.500. + + + + + A title as specified in X.500. + + + + + A surname as specified in X.500. + + + + + A given name as specified in X.500. + + + + + Initials as specified in X.500. + + + + + A pseudonym as specified in X.500. + + + + + A generation qualifier as specified in + X.500. + + + + + + A generic type-value pair + attribute. + + + + + + A multi-valued RDN + + + + + + Required extension point. It is recommended to not use this element, and instead use + GenericAttribute and the numeric Distinguished Name Attribute Type. + + + + + + + + + + + + + + + An identifier of an algorithm. + + + + + The OID of the algorithm in dot-decimal form. + + + + + Optional parameters of the algorithm (depending on the algorithm). + + + + + + + + + + + + + + + + + A CSR attribute as specified in RFC 2986. + + + + + The OID of the attribute. + + + + + The value of the attribute as a base64-encoded DER representation of + an ASN.1 value. + + + + + + + + + + + A CSR attribute as specified in PKCS#10. + + + + + An X.509v3 extension field. + + + + + A basic CSR attribute. + + + + + + + + + + + + + + + + A base64-encoded ASN.1 value. + + + + + + + An X.509v3 extension field as specified in RFC 5280 + + + + + The OID of the extension field. + + + + + True if and only if the extension is critical. + + + + + The value of the extension field as a base64-encoded DER + representation of an ASN.1 value. + + + + + + + + + + + An X.509 cerficiate as specified in RFC 5280. + + + + + The ID of the certificate. + + + + + The ID of the key that this certificate associates to the + certificate subject. + + + + + + The client-defined alias of the certificate. + + + + + The base64-encoded DER representation of the X.509 certificate. + + + + + + + + + + + A sequence of certificate IDs. + + + + + A certificate ID. + + + + + + + + + An X.509 certification path as defined in RFC 5280. + + + + + A certificate in the certification path. + + + + + The client-defined alias of the certification path. + + + + + + + + + + + + + + + + + + + The ID of the passphrase. + + + + + The alias of the passphrase. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True if and only if the TLS server shall not authenticate client + certificates that do not contain the TLS WWW client authentication key usage + extension as specified in RFC 5280, Sect. 4.2.1.12. + + + + + + True if and only if delta CRLs, if available, shall be applied to + CRLs. + + + + + + + + + + + + + + + + + + The certificate ID of the certificate to be used as trust anchor. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A list of RSA key lenghts in bits. + + + + + + A list of X.509 versions. + + + + + + A list of TLS versions. + + + + + + A list of password based encryption algorithms. + + + + + + A list of password based MAC algorithms. + + + + + + + The capabilities of a keystore implementation on a device. + + + + + + The signature algorithms supported by the keystore implementation. + + + + + + + + + + + + + + Indicates the maximum number of keys that the device can store + simultaneously. + + + + + + Indicates the maximum number of certificates that the device can store + simultaneously. + + + + + + Indicates the maximum number of certification paths that the device + can store simultaneously. + + + + + + Indication that the device supports on-board RSA key pair + generation. + + + + + + Indicates which RSA key lengths are supported by the device. + + + + + + Indicates support for creating PKCS#10 requests for RSA keys and + uploading the certificate obtained from a CA.. + + + + + + Indicates support for creating self-signed certificates for RSA + keys. + + + + + + Indicates which X.509 versions are supported by the device. + + + + + + Indicates the maximum number of passphrases that the device is able to + store simultaneously. + + + + + + Indicates support for uploading an RSA key pair in a PKCS#8 data + structure. + + + + + + Indicates support for uploading a certificate along with an RSA + private key in a PKCS#12 data structure. + + + + + + Indicates which password-based encryption algorithms are supported by + the device. + + + + + + Indicates which password-based MAC algorithms are supported by the + device. + + + + + + Indicates the maximum number of CRLs that the device is able to store + simultaneously. + + + + + + Indicates the maximum number of certification path validation policies + that the device is able to store simultaneously. + + + + + + Indicates whether a device supports checking for the TLS WWW client + auth extended key usage extension while validating certification paths. + + + + + + + + + The capabilities of a TLS server implementation on a device. + + + + + + + + Indicates which TLS versions are supported by the device. + + + + + + Indicates the maximum number of certification paths that may be + assigned to the TLS server simultaneously. + + + + + + Indicates whether the device supports TLS client authentication. + + + + + + Indicates the maximum number of certification path validation policies + that may be assigned to the TLS server simultaneously. + + + + + + + + + The capabilities of an Advanced Security Service implementation on a + device. + + + + + + The capabilities of the keystore implementation. + + + + + The capabilities of the TLS server implementation. + + + + + + + + + + + + + + + + + + + + + + The capabilities for the advanced secuirty service is returned in + the Capabilities element. + + + + + + + + + + + + + The length of the key to be created. + + + + + The client-defined alias of the key. + + + + + + + + + + + The key ID of the key pair being generated. + + + + + Best-effort estimate of how long the key generation will take. + + + + + + + + + + + + + The key pair to be uploaded in a PKCS#8 data structure. + + + + + + The client-defined alias of the key pair. + + + + + The ID of the passphrase to use for decrypting the uploaded key + pair. + + + + + + The passphrase to use for decrypting the uploaded key pair. + + + + + + + + + + + + The key ID of the uploaded key pair. + + + + + + + + + + + + The certificates and key pair to be uploaded in a PKCS#12 data + structure. + + + + + + The client-defined alias of the certification path. + + + + + + The client-defined alias of the key pair. + + + + + True if and only if the device shall behave as if + the client had only supplied the first certificate in the sequence of + certificates. + + + + + + The ID of the passphrase to use for integrity checking of the + uploaded PKCS#12 data structure. + + + + + + The ID of the passphrase to use for decrypting the uploaded + PKCS#12 data structure. + + + + + + The passphrase to use for integrity checking and decrypting the + uploaded PKCS#12 data structure. + + + + + + + + + + + + The certification path ID of the uploaded certification path. + + + + + + The key ID of the uploaded key pair. + + + + + + + + + + + + The ID of the key for which to return the status. + + + + + + + + + + + + Status of the requested key. The value should be one of the values + in the tas:KeyStatus enumeration. + + + + + + + + + + + + + The ID of the key pair for which to return whether it contains a + private key. + + + + + + + + + + + + True if and only if the key pair contains a private key. + + + + + + + + + + + + + + + + + + Information about a key in the keystore. + + + + + + + + + + + + The ID of the key that is to be deleted from the keystore. + + + + + + + + + + + + + + + + + + The subject to be included in the CSR. + + + + + The ID of the key for which the CSR shall be created. + + + + + + An attribute to be included in the CSR. + + + + + The signature algorithm to be used to sign the CSR. Defaults to + SHA1 with RSA Encryption. + + + + + + + + + + + + The DER encoded PKCS#10 certification request. + + + + + + + + + + + + The X.509 version that the generated certificate shall comply + to. + + + + + + Distinguished name of the entity that the certificate shall belong + to. + + + + + + The ID of the key for which the certificate shall be created. + + + + + + The client-defined alias of the certificate to be created. + + + + + + The X.509 not valid before information to be included in the + certificate. Defaults to the device's current time or a time before the device's + current time. + + + + + + The X.509 not valid after information to be included in the + certificate. Defaults to the time 99991231235959Z as specified in RFC 5280. + + + + + + The signature algorithm to be used for signing the certificate. + Defaults to SHA1 with RSA Encryption. + + + + + + An X.509v3 extension to be included in the certificate. + + + + + + + + + + + + The ID of the generated certificate. + + + + + + + + + + + + The base64-encoded DER representation of the X.509 certificate to + be uploaded. + + + + + + The client-defined alias of the certificate. + + + + + The client-defined alias of the key pair. + + + + + Indicates if the device shall verify that a matching key pair with + a private key exists in the keystore. + + + + + + + + + + + + The ID of the uploaded certificate. + + + + + The ID of the key that the uploaded certificate certifies. + + + + + + + + + + + + + The ID of the certificate to retrieve. + + + + + + + + + + + The DER representation of the certificate. + + + + + + + + + + + + + + + A list with all certificates stored in the keystore. + + + + + + A certificate stored in the keystore. + + + + + + + + + + + + The ID of the certificate to delete. + + + + + + + + + + + + + + + + + The IDs of the certificates to include in the certification path, + where each certificate signature except for the last one in the path must be + verifiable with the public key certified by the next certificate in the path. + + + + + + The client-defined alias of the certification path. + + + + + + + + + + + + The ID of the generated certification path. + + + + + + + + + + + + The ID of the certification path to retrieve. + + + + + + + + + + + The certification path that is stored under the given ID in the + keystore. + + + + + + + + + + + + + + + + + + An ID of a certification path in the keystore. + + + + + + + + + + + + The ID of the certification path to delete. + + + + + + + + + + + + + + + + + The passphrase to upload. + + + + + The alias for the passphrase to upload. + + + + + + + + + + + The PassphraseID of the uploaded passphrase. + + + + + + + + + + + + + + + + A list with information about all passphrases in the keystore. + + + + + Information about a passphrase in the keystore. + + + + + + + + + + + + The ID of the passphrase that is to be deleted from the + keystore. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The IDs of all certification paths that are assigned to the TLS + server on the device. + + + + + + + + + + + + + + + + The CRL to be uploaded to the device. + + + + + + + The alias to assign to the uploaded CRL. + + + + + + + + + + + + + + + + + + + + The ID of the uploaded CRL. + + + + + + + + + + + + + + The ID of the CRL to be returned. + + + + + + + + + + + + + The CRL with the requested ID. + + + + + + + + + + + + + + + + + + + A list of all CRLs that are stored in the keystore on the device. + + + + + + + + + + + + + + The ID of the CRL to be deleted. + + + + + + + + + + + + + + + + + + + The alias to assign to the created certification path validation policy. + + + + + + + The parameters of the certification path validation policy to be created. + + + + + + + The trust anchors of the certification path validation policy to be created. + + + + + + + + + + + + + + + + + + + + The ID of the created certification path validation policy. + + + + + + + + + + + + + + The ID of the certification path validation policy to be created. + + + + + + + + + + + + + The certification path validation policy that is stored under the requested ID. + + + + + + + + + + + + + + + + + + + A list of all certification path validation policies that are stored in the + keystore on the device. + + + + + + + + + + + + + + The ID of the certification path validation policy to be deleted. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The ID of the certification path validation policy to assign to the TLS server. + + + + + + + + + + + + + + + + + + + The ID of the certification path validation policy to de-assign from the TLS + server. + + + + + + + + + + + + + + + + + + + The ID of the certification path validation policy to be de-assigned from the TLS + server. + + + + + + + The ID of the certification path validation policy to assign to the TLS server. + + + + + + + + + + + + + + + + + + + + + + + + A list of IDs of the certification path validation policies that are assigned to + the TLS server. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Common functionality for all advanced security service parts. + + + Returns the capabilities of the advanced security service. The result is + returned in a typed answer. + + + + + + + Basic keystore functionality. + + + This operation triggers the asynchronous generation of an RSA key pair of a particular key + length (specified as the number of bits) as specified in [RFC 3447], with a suitable key + generation mechanism on the device. + Keys, especially RSA key pairs, are uniquely identified using key IDs. +
+ If the device does not have not enough storage capacity for storing the key pair to be + created, the maximum number of keys reached fault shall be produced and no key pair shall be + generated. + Otherwise, the operation generates a keyID for the new key and associates the generating + status to it. +
+ Immediately after key generation has started, the device shall return the keyID to the + client and continue to generate the key pair. + The client may query the device with the GetKeyStatus operation whether the generation has + finished. + The client may also subscribe to Key Status events to be notified about key status changes. +
+ The device also returns a best-effort estimate of how much time it requires to create the + key pair. + A client may use this information as an indication how long to wait before querying the + device whether key generation is completed. +
+ After the key has been successfully created, the device shall assign it the ok status. If + the key generation fails, the device shall assign the key the corrupt status. +
+ + +
+ + + This operation uploads a key pair in a PKCS#8 data structure as specified in [RFC 5958, RFC + 5959]. +
+ If an encryption passphrase ID is supplied in the request, the device shall assume that the + KeyPair parameter contains an EncryptedPrivateKeyInfo ASN.1 + structure that is encrypted under the passphrase in the keystore that corresponds to the + supplied ID, where the EncryptedPrivateKeyInfo structure contains + both the private key and the corresponding public key. If no encryption passphrase ID is + supplied, the device shall assume that the KeyPair parameter contains a + OneAsymmetricKey ASN.1 structure which contains both the private key and the corresponding + public key. +
+ + +
+ + + This operation uploads a certification path consisting of X.509 certificates as specified by + [RFC 5280] in DER encoding along with a private key to a device’s keystore. + Certificates and private key are supplied in the form of a PKCS#12 file as specified in + [PKCS#12]. +
+ The device shall support PKCS#12 files that contain the following safe bags: +
+ * one or more instances of CertBag [PKCS#12, Sect. 4.2.3] + * either exactly one instance of KeyBag [PKCS#12, Sect. 4.3.1] or exactly one instance of + PKCS8ShroudedKeyBag [PKCS#12, Sect. 4.2.2]. +
+ If the IgnoreAdditionalCertificates parameter has the value true, the device shall behave as + if the client had supplied only the first CertBag in the sequence of CertBag instances. + The device shall support PKCS#12 passphrase integrity mode for integrity protection of the + PKCS#12 PFX as specified in [PKCS#12, Sect. 4]. + The device shall support PKCS8ShroudedKeyBags that are encrypted with the same passphrase as + the CertBag instances. + If an integrity passphrase ID is supplied, the device shall use the corresponding passphrase + in the keystore to check the integrity of the supplied PKCS#12 PFX. + If an integrity passphrase ID is supplied, but the supplied PKCS#12 PFX has no integrity + protection, the device shall produce a BadPKCS12File fault and shall + not store the uploaded certificates nor the uploaded key pair in the keystore. + If an encryption passphrase ID is supplied, the device shall use the corresponding + passphrase in the keystore to decrypt the PKCS8ShroudedKeyBag and the CertBag instances. + If an EncryptionPassphraseID is supplied, but a CertBag is not encrypted, the device shall + ignore the supplied EncryptionPassphraseID when processing this CertBag. + If an EncryptionPassphraseID is supplied, but a KeyBag is provided instead of a + PKCS8ShroudedKeyBag, the device shall ignore the supplied EncryptionPassphraseID when + processing the KeyBag. +
+ + +
+ + + This operation returns the status of a key. +
+ Keys are uniquely identified using key IDs. If no key is stored under the requested key ID + in the keystore, an InvalidKeyID fault is produced. + Otherwise, the status of the key is returned. +
+ + +
+ + + This operation returns whether a key pair contains a private key. +
+ Keys are uniquely identified using key IDs. If no key is stored under the requested key ID + in the keystore or the key identified by the requested key ID does not identify a key pair, + the device shall produce an InvalidKeyID fault. + Otherwise, this operation returns true if the key pair identified by the key ID contains a + private key, and false otherwise. +
+ + +
+ + + This operation returns information about all keys that are stored in the device’s keystore. +
+ This operation may be used, e.g., if a client lost track of which keys are present on the + device. + If no key is stored on the device, an empty list is returned. +
+ + +
+ + + This operation deletes a key from the device’s keystore. +
+ Keys are uniquely identified using key IDs. If no key is stored under the requested key ID + in the keystore, a device shall produce an InvalidArgVal fault. + If a reference exists for the specified key, a device shall produce the corresponding fault + and shall not delete the key. + If there is a key under the requested key ID stored in the keystore and the key could not be + deleted, a device shall produce a KeyDeletion fault. + If the key has the status generating, a device shall abort the generation of the key and + delete from the keystore all data generated for this key. + After a key is successfully deleted, the device may assign its former ID to other keys. +
+ + +
+ + + This operation generates a DER-encoded PKCS#10 v1.7 certification request (sometimes also + called certificate signing request or CSR) as specified in RFC 2986 + for a public key on the device. +
+ The key pair that contains the public key for which a certification request shall be + produced is specified by its key ID. + If no key is stored under the requested KeyID or the key specified by the requested KeyID is + not an asymmetric key pair, an invalid key ID fault shall be produced and + no CSR shall be generated. +
+ + A device that supports this command shall as minimum support the sha-1WithRSAEncryption + signature algorithm as specified in RFC 3279. + If the specified signature algorithm is not supported by the device, an + UnsupportedSignatureAlgorithm fault shall be produced and no CSR shall be generated. +
+ + If the public key identified by the requested Key ID is an invalid input to the specified + signature algorithm, a KeySignatureAlgorithmMismatch fault shall be produced + and no CSR shall be generated. + If the key pair does not have status ok, a device shall produce an InvalidKeyStatus fault + and no CSR shall be generated. +
+ + +
+ + + This operation generates for a public key on the device a self-signed X.509 certificate that + complies to RFC 5280. +
+ The X509Version parameter specifies the version of X.509 that the generated certificate + shall comply to. + A device that supports this command shall support the generation of X.509v3 certificates as + specified in RFC 5280 and may additionally be able to handle other X.509 certificate formats + as indicated by the X.509Versions capability. +
+ The key pair that contains the public key for which a self-signed certificate shall be + produced is specified by its key pair ID. + The subject parameter describes the entity that the public key belongs to. + If the key pair does not have status ok, a device shall produce an InvalidKeyStatus fault + and no certificate shall be generated. + + The signature algorithm parameter determines which signature algorithm shall be used for + signing the certification request with the public key specified by the key ID parameter. + A device that supports this command shall as minimum support the sha-1WithRSAEncryption + signature algorithm as specified in RFC 3279. + The Extensions parameter specifies potential X509v3 extensions that shall be contained in + the certificate. + A device that supports this command shall support the extensions that are defined in [RFC + 5280], Sect. 4.2] as mandatory for CAs that issue self-signed certificates. +
+ + Certificates are uniquely identified using certificate IDs. If the command was successful, + the device generates a new ID for the generated certificate and returns this ID. +
+ If the device does not have not enough storage capacity for storing the certificate to be + created, the maximum number of certificates reached fault shall be produced and no + certificate shall be generated. +
+ + +
+ + + This operation uploads an X.509 certificate as specified by [RFC 5280] in DER encoding and + the public key in the certificate to a device’s keystore. +
+ A device that supports this command shall be able to handle X.509v3 certificates as + specified in RFC 5280 and may additionally be able to handle other X.509 certificate formats + as indicated by the X.509Versions capability. + A device that supports this command shall support sha1-WithRSAEncryption as certificate + signature algorithm. +
+ + Certificates are uniquely identified using certificate IDs, and key pairs are uniquely + identified using key IDs. + The device shall generate a new certificate ID for the uploaded certificate. +
+ Certain certificate usages, e.g. TLS server authentication, require the private key that + corresponds to the public key in the certificate to be present in the keystore. + In such cases, the client may indicate that it expects the device to produce a fault if the + matching private key for + the uploaded certificate is not present in the keystore by setting the PrivateKeyRequired + argument in the upload request to true. +
+ + The uploaded certificate has to be linked to a key pair in the keystore. + If no private key is required for the public key in the certificate and a key pair exists in + the keystore with a public key equal to the public key in the certificate, + the uploaded certificate is linked to the key pair identified by the supplied key ID by + adding a reference from the certificate to the key pair. + If no private key is required for the public key in the certificate and no key pair exists + with the public key equal to the public key in the certificate, + a new key pair with status ok is created with the public key from the certificate, and this + key pair is linked to the uploaded certificate by adding a reference from + the certificate to the key pair. + If a private key is required for the public key in the certificate, and a key pair exists in + the keystore with a private key that matches the public key in the certificate, + the uploaded certificate is linked to this keypair by adding a reference from the + certificate to the key pair. + If a private key is required for the public key and no such keypair exists in the keystore, + the NoMatchingPrivateKey fault shall be produced and the certificate + shall not be stored in the keystore. + If the key pair that the certificate shall be linked to does not have status ok, an + InvalidKeyID fault is produced, and the uploaded certificate is not stored in the keystore. + If the device cannot process the uploaded certificate, a BadCertificate fault is produced + and neither the uploaded certificate nor the public key are stored in the device’s keystore. + The BadCertificate fault shall not be produced based on the mere fact that the device’s + current time lies outside the interval defined by the notBefore and notAfter fields as + specified by [RFC 5280], Sect. 4.1 . + This operation shall not mark the uploaded certificate as trusted. +
+ + If the device does not have not enough storage capacity for storing the certificate to be + uploaded, the maximum number of certificates reached fault shall be produced + and no certificate shall be uploaded. + If the device does not have not enough storage capacity for storing the key pair that + eventually has to be created, the device shall generate a maximum number of keys reached + fault. + Furthermore the device shall not generate a key pair and no certificate shall be stored. +
+ + +
+ + + This operation returns a specific certificate from the device’s keystore. +
+ Certificates are uniquely identified using certificate IDs. If no certificate is stored + under the requested certificate ID in the keystore, an InvalidArgVal fault is produced. + It shall be noted that this command does not return the private key that is associated to + the public key in the certificate. +
+ + +
+ + + This operation returns the IDs of all certificates that are stored in the device’s keystore. +
+ This operation may be used, e.g., if a client lost track of which certificates are present + on the device. + If no certificate is stored in the device’s keystore, an empty list is returned. +
+ + +
+ + + This operation deletes a certificate from the device’s keystore. +
+ The operation shall not delete the public key that is contained in the certificate from the + keystore. + Certificates are uniquely identified using certificate IDs. If no certificate is stored + under the requested certificate ID in the keystore, an InvalidArgVal fault is produced. + If there is a certificate under the requested certificate ID stored in the keystore and the + certificate could not be deleted, a CertificateDeletion fault is produced. + If a reference exists for the specified certificate, the certificate shall not be deleted + and the corresponding fault shall be produced. + After a certificate has been successfully deleted, the device may assign its former ID to + other certificates. +
+ + +
+ + + This operation creates a sequence of certificates that may be used, e.g., for certification + path validation or for TLS server authentication. +
+ Certification paths are uniquely identified using certification path IDs. Certificates are + uniquely identified using certificate IDs. + A certification path contains a sequence of certificate IDs. + If there is a certificate ID in the sequence of supplied certificate IDs for which no + certificate exists in the device’s keystore, the corresponding fault shall be produced + and no certification path shall be created. +
+ + The signature of each certificate in the certification path except for the last one must be + verifiable with the public key contained in the next certificate in the path. + If there is a certificate ID in the request other than the last ID for which the + corresponding certificate cannot be verified with the public key in the certificate + identified + by the next certificate ID, an InvalidCertificateChain fault shall be produced and no + certification path shall be created. +
+ + +
+ + + This operation returns a specific certification path from the device’s keystore. +
+ Certification paths are uniquely identified using certification path IDs. + If no certification path is stored under the requested ID in the keystore, an InvalidArgVal + fault is produced. +
+ + +
+ + + This operation returns the IDs of all certification paths that are stored in the device’s + keystore. +
+ This operation may be used, e.g., if a client lost track of which certificates are present + on the device. + If no certification path is stored on the device, an empty list is returned. +
+ + +
+ + + This operation deletes a certification path from the device’s keystore. +
+ This operation shall not delete the certificates that are referenced by the certification + path. + Certification paths are uniquely identified using certification path IDs. + If no certification path is stored under the requested certification path ID in the + keystore, an InvalidArgVal fault is produced. + If there is a certification path under the requested certification path ID stored in the + keystore and the certification path could not be deleted, + a CertificationPathDeletion fault is produced. + If a reference exists for the specified certification path, the certification path shall not + be deleted and the corresponding fault shall be produced. + After a certification path is successfully deleted, the device may assign its former ID to + other certification paths. +
+ + +
+ + + This operation uploads a passphrase to the keystore of the device. + + + + + + + This operation returns information about all passphrases that are stored in the keystore of + the device. + This operation may be used, e.g., if a client lost track of which passphrases are present on + the device. + If no passphrase is stored on the device, the device shall return an empty list. + + + + + + + This operation deletes a passphrase from the keystore of the device. + + + + + + + This operation uploads a certificate revocation list (CRL) as specified in [RFC 5280] to the + keystore on the device. + If the device does not have enough storage space to store the CRL to be uploaded, the device + shall produce a MaximumNumberOfCRLsReached fault and shall not store the supplied CRL. + If the device is not able to process the supplied CRL, the device shall produce a BadCRL + fault and shall not store the supplied CRL. + If the device does not support the signature algorithm that was used to sign the supplied + CRL, the device shall produce an UnsupportedSignatureAlgorithm fault and shall not store the + supplied CRL. + + + + + + + This operation returns a specific certificate revocation list (CRL) from the keystore on the + device. + Certification revocation lists are uniquely identified using CRLIDs. If no CRL is stored + under the requested CRLID, the device shall produce a CRLID fault. + + + + + + + This operation returns all certificate revocation lists (CRLs) that are stored in the + keystore on the device. + If no certificate revocation list is stored in the device’s keystore, an empty list is + returned. + + + + + + + This operation deletes a certificate revocation list (CRL) from the keystore on the device. + Certification revocation lists are uniquely identified using CRLIDs. If no CRL is stored + under the requested CRLID, the device shall produce a CRLID fault. + If a reference exists for the specified CRL, the device shall produce a ReferenceExists + fault and shall not delete the CRL. + After a CRL has been successfully deleted, a device may assign its former ID to other CRLs. + + + + + + + This operation creates a certification path validation policy. + Certification path validation policies are uniquely identified using certification path + validation policy IDs. The device shall generate a new certification path validation policy + ID for the created certification path validation policy. + For the certification path validation parameters that are not represented in the + certPathValidationParameters data type, the device shall use the default values specified in + Sect. 3. + If the device does not have enough storage capacity for storing the certification path + validation policy to be created, the device shall produce a maximum number of certification + path validation policies reached fault and shall not create a certification path validation + policy. + If there is at least one trust anchor certificate ID in the request for which there exists + no certificate in the device’s keystore, the device shall produce a CertificateID fault and + shall not create a certification path validation policy. + If the device cannot process the supplied certification path validation parameters, the + device shall produce a CertPathValidationParameters fault and shall not create a + certification path validation policy. + + + + + + + This operation returns a certification path validation policy from the keystore on the + device. + Certification path validation policies are uniquely identified using certification path + validation policy IDs. If no certification path validation policy is stored under the + requested certification path validation policy ID, the device shall produce a + CertPathValidationPolicyID fault. + + + + + + + This operation returns all certification path validation policies that are stored in the + keystore on the device. + If no certification path validation policy is stored in the device’s keystore, an empty list + is returned. + + + + + + + This operation deletes a certification path validation policy from the keystore on the + device. + Certification path validation policies are uniquely identified using certification path + validation policy IDs. If no certification path validation policy is stored under the + requested certification path validation policy ID, the device shall produce an + InvalidCertPathValidationPolicyID fault. + If a reference exists for the requested certification path validation policy, the device + shall produce a ReferenceExists fault and shall not delete the certification path validation + policy. + After the certification path validation policy has been deleted, the device may assign its + former ID to other certification path validation policies. + + + + +
+ + TLS server functionality. + + + This operation assigns a key pair and certificate along with a certification path + (certificate chain) to the TLS server on the device. + The TLS server shall use this information for key exchange during the TLS handshake, + particularly for constructing server certificate messages as specified in RFC 4346 and RFC + 2246. +
+ + Certification paths are identified by their certification path IDs in the keystore. The + first certificate in the certification path must be the TLS server certificate. + Since each certificate has exactly one associated key pair, a reference to the key pair that + is associated with the server certificate is not supplied explicitly. + Devices shall obtain the private key or results of operations under the private key by + suitable internal interaction with the keystore. +
+ If a device chooses to perform a TLS key exchange based on the supplied certification path, + it shall use the key pair that is associated with the server certificate for + key exchange and transmit the certification path to TLS clients as-is, i.e., the device + shall not check conformance of the certification path to RFC 4346 norRFC 2246. + In order to use the server certificate during the TLS handshake, the corresponding private + key is required. + Therefore, if the key pair that is associated with the server certificate, i.e., the first + certificate in the certification path, does not have an associated private key, + the NoPrivateKey fault is produced and the certification path is not associated to the TLS + server. +
+ A TLS server may present different certification paths to different clients during the TLS + handshake instead of presenting the same certification path to all clients. + Therefore more than one certification path may be assigned to the TLS server. +
+ If the maximum number of certification paths that may be assigned to the TLS server + simultaneously is reached, the device shall generate a + MaximumNumberOfCertificationPathsReached + fault and the requested certification path shall not be assigned to the TLS server. +
+ + +
+ + + This operation removes a key pair and certificate assignment (including certification path) + to the TLS server on the device. +
+ Certification paths are identified using certification path IDs. If the supplied + certification path ID is not associated to the TLS server, an InvalidArgVal fault is + produced. +
+ + +
+ + + This operation replaces an existing key pair and certificate assignment to the TLS server on + the device by a new key pair and certificate assignment (including certification paths). +
+ + After the replacement, the TLS server shall use the new certificate and certification path + exactly in those cases in which it would have used the old certificate and certification + path. + Therefore, especially in the case that several server certificates are assigned to the TLS + server, clients that wish to replace an old certificate assignment by a new assignment + should use this operation instead of a combination of the Add TLS Server Certificate + Assignment and the Remove TLS Server Certificate Assignment operations. +
+ + Certification paths are identified using certification path IDs. If the supplied old + certification path ID is not associated to the TLS server, or no certification path exists + under the new certification path ID, the corresponding InvalidArgVal faults are produced and + the associations are unchanged. + The first certificate in the new certification path must be the TLS server certificate. +
+ Since each certificate has exactly one associated key pair, a reference to the key pair that + is associated with the new server certificate is not supplied explicitly. + Devices shall obtain the private key or results of operations under the private key by + suitable internal interaction with the keystore. +
+ If a device chooses to perform a TLS key exchange based on the new certification path, it + shall use the key pair that is associated with the server certificate + for key exchange and transmit the certification path to TLS clients as-is, i.e., the device + shall not check conformance of the certification path to RFC 4346 norRFC 2246. + In order to use the server certificate during the TLS handshake, the corresponding private + key is required. + Therefore, if the key pair that is associated with the server certificate, i.e., the first + certificate in the certification path, does not have an associated private key, + the NoPrivateKey fault is produced and the certification path is not associated to the TLS + server. +
+ + +
+ + + This operation returns the IDs of all key pairs and certificates (including certification + paths) that are assigned to the TLS server on the device. +
+ This operation may be used, e.g., if a client lost track of the certification path + assignments on the device. + If no certification path is assigned to the TLS server, an empty list is returned. +
+ + +
+ + + This operation activates or deactivates TLS client authentication for the TLS server on the + device. + The TLS server on the device shall require client authentication if and only if + clientAuthenticationRequired is set to true. + If TLS client authentication is requested to be enabled and no certification path validation + policy is assigned to the TLS server, the device shall return an + EnablingTLSClientAuthenticationFailed fault and shall not enable TLS client authentication. + The device shall execute this command regardless of the TLS enabled/disabled state + configured in the ONVIF Device Management Service. + + + + + + + This operation returns whether TLS client authentication is active. + + + + + + + This operation assigns a certification path validation policy to the TLS server on the + device. The TLS server shall enforce the policy when authenticating TLS clients and consider + a client authentic if and only if the algorithm returns valid. + If no certification path validation policy is stored under the requested + CertPathValidationPolicyID, the device shall produce a CertPathValidationPolicyID fault. + A TLS server may use different certification path validation policies to authenticate + clients. Therefore more than one certification path validation policy may be assigned to the + TLS server. If the maximum number of certification path validation policies that may be + assigned to the TLS server simultaneously is reached, the device shall produce a + MaximumNumberOfTLSCertPathValidationPoliciesReached fault and shall not assign the requested + certification path validation policy to the TLS server. + + + + + + + This operation removes a certification path validation policy assignment from the TLS server + on the device. + If the certification path validation policy identified by the requested + CertPathValidationPolicyID is not associated to the TLS server, the device shall produce a + CertPathValidationPolicy fault. + + + + + + + This operation replaces a certification path validation policy assignment to the TLS server + on the device with another certification path validation policy assignment. + If the certification path validation policy identified by the requested + OldCertPathValidationPolicyID is not associated to the TLS server, the device shall produce + an OldCertPathValidationPolicyID fault and shall not associate the certification path + validation policy identified by the NewCertPathValidationPolicyID to the TLS server. + If no certification path validation policy exists under the requested + NewCertPathValidationPolicyID in the device’s keystore, the device shall produce a + NewCertPathValidationPolicyID fault and shall not remove the association of the old + certification path validation policy to the TLS server. + + + + + + + This operation returns the IDs of all certification path validation policies that are + assigned to the TLS server on the device. + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/onvif-ws-client/src/main/resources/wsdl/deviceio_2.6.1.wsdl b/onvif-ws-client/src/main/resources/wsdl/deviceio_2.6.1.wsdl new file mode 100644 index 0000000..48cfed1 --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/deviceio_2.6.1.wsdl @@ -0,0 +1,1589 @@ + + + + + + + + + + + + + + + + + + + + The capabilities for the device IO service is returned in the + Capabilities element. + + + + + + + + + + + + + + Number of video sources (defaults to none). + + + + + Number of video outputs (defaults to none). + + + + + Number of audio sources (defaults to none). + + + + + Number of audio outputs (defaults to none). + + + + + Number of relay outputs (defaults to none). + + + + + Number of serial ports (defaults to none). + + + + + Number of digital inputs (defaults to none). + + + + + Indicates support for DigitalInput configuration of the idle state + (defaults to false). + + + + + + + + + + + + + + Optional reference token to the relay for which the options are requested. + + + + + + + + + + + + + Valid values and ranges for the configuration of a relay output. + + + + + + + + + + + Supported Modes. + + + + + Supported delay time range or discrete values in seconds. This + element must be present if MonoStable mode is supported. + + + + + + True if the relay only supports the exact values for the DelayTimes + listed. Default is false. + + + + + + + + Token of the relay output. + + + + + + + + + + + + + + + + + + + + + + List tokens of a physical IO of a device. + + + + + + + + + + + + + + + + + + + + + + + List containing all physical Video output connections of a + device. + + + + + + + + + + + + + Token of the requested AudioSource. + + + + + + + + + + + + Current configuration of the Audio input. + + + + + + + + + + + + + Token of the physical Audio output. + + + + + + + + + + + + Current configuration of the Audio output. + + + + + + + + + + + + + Token of the requested VideoSource. + + + + + + + + + + + + Current configuration of the Video input. + + + + + + + + + + + + + Token of the requested VideoOutput. + + + + + + + + + + + + Current configuration of the Video output. + + + + + + + + + + + + + + The ForcePersistence element determines how configuration + changes shall be stored. If true, changes shall be persistent. If false, changes + MAY revert to previous values + after reboot. + + + + + + + + + + + + + + + + + + + + + + The ForcePersistence element determines how configuration + changes shall be stored. If true, changes shall be persistent. If false, changes + MAY revert to previous values + after reboot. + + + + + + + + + + + + + + + + + + + + + + The ForcePersistence element determines how configuration + changes shall be stored. If true, changes shall be persistent. If false, changes + MAY revert to previous values + after reboot. + + + + + + + + + + + + + + + + + + + + + + The ForcePersistence element determines how configuration + changes shall be stored. If true, changes shall be persistent. If false, changes + MAY revert to previous values + after reboot. + + + + + + + + + + + + + + + + + + + + + Token of the Video input whose options are requested.. + + + + + + + + + + + + + + + + + + + + + + Token of the Video Output whose options are requested.. + + + + + + + + + + + + + + + + + + + + + + Token of the physical Audio input whose options are requested.. + + + + + + + + + + + + + Returns the AudioSourceToken available. + + + + + + + + + + + + + Token of the physical Audio Output whose options are requested.. + + + + + + + + + + + + + Available settings and ranges for the requested Audio output. + + + + + + + + + + + + + + + + + + + + + + + + + Get the available digital inputs of a device. + + + + + + + + + Requested digital inputs. + + + + + + + + + + + + + Configuration Options for a digital input. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The physical serial port on the device that allows serial data to be + read and written. + + + + + + + + + + Requested serial ports. + + + + + + + + + + + Gets the configuration that relates to serial port configuration. + + + + + + + + + + + Requested serial port configuration. + + + + + + + + + + + Sets the configuration that relates to serial port configuration. + + + + + + + + + + + + + + + + + + + Gets the configuration options that relates to serial port + configuration. + + + + + + + + + + + Requested serial port configuration options. + + + + + + + + + + + Transmitting arbitrary data to the connected serial device and then + receiving its response data. + + + + + + + The serial port data. + + + + + Indicates that the command should be responded back within the + specified period of time. + + + + + + This element may be put in the case that data length returned from + the connected serial device is already determined as some fixed bytes length. It + indicates the length of received data which can be regarded as available. + + + + + + This element may be put in the case that the delimiter codes + returned from the connected serial device is already known. It indicates the + termination data sequence of the responded data. In case the string has more than + one character a device shall interpret the whole string as a single delimiter. + Furthermore a device shall return the delimiter character(s) to the client. + + + + + + + + + Receiving the response data. + + + + + + + + + + + + + The serial port data. + + + + + + + + + + + Lists all available serial ports of a device + + + + + + + + + + + + + + The type of serial port.Generic can be signaled as a vendor specific + serial port type. + + + + + + + + + + + + + + + The parameters for configuring the serial port. + + + + + The transfer bitrate. + + + + + The parity for the data error detection. + + + + + The bit length for each character. + + + + + The number of stop bits used to terminate each character. + + + + + + + + + + + + + The parity for the data error detection. + + + + + + + + + + + + + + The configuration options that relates to serial port. + + + + + + The list of configurable transfer bitrate. + + + + + The list of configurable parity for the data error detection. + + + + + + The list of configurable bit length for each character. + + + + + + The list of configurable number of stop bits used to terminate each + character. + + + + + + + + + + + + The list of configurable parity for the data error detection. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the capabilities of the device IO service. The result is returned + in a typed answer. + + + + + + Request the available settings and ranges for one or all relay outputs. A + device that has one or more RelayOutputs should support this command. +
+ Two examples that illustrate usage: +
    +
  • + 1) Device supports range PT1S to PT120S: +
    +              <tmd:RelayOutputOptions token='44'>
    +              <tmd:Mode>Monostable</tmd:Mode>
    +              <tmd:DelayTimes>1 120</tmd:DelayTimes>
    +              </tmd:RelayOutputOptions>
    +            
    +
  • +
  • + 2) Device supports values PT0.5S, PT1S, PT2s and PT1M: +
    +              <tmd:RelayOutputOptions token='123'>
    +              <tmd:Mode>Monostable</tmd:Mode>
    +              <tmd:DelayTimes>0.5 1 2 60</tmd:DelayTimes>
    +              <tmd:Discrete>True</tmd:Discrete>
    +              </tmd:RelayOutputOptions>
    +            
    +
  • +
+
+ + +
+ + List all available audio sources for the device. The device that has one + or more audio sources shall support the listing of available audio inputs through the + GetAudioSources command. + + + + + + List all available audio outputs of a device. A device that has one ore + more physical audio outputs shall support listing of available audio outputs through the + GetAudioOutputs command. + + + + + + List all available video sources for the device. The device that has one + or more video inputs shall support the listing of available video sources through the + GetVideoSources command. + + + + + + List all available video outputs of a device. A device that has one or + more physical video outputs shall support listing of available video outputs through the + GetVideoOutputs command. + + + + + + + Get the video source configurations of a VideoSource. A device with one or + more video sources shall support the GetVideoSourceConfigurations command.. + + + + + + Get the configuration of a Video Output. A device that has one or more + Video Outputs shall support the retrieval of the VideoOutputConfiguration through this + command. + + + + + + List the configuration of an Audio Input. A device with one or more audio + inputs shall support the GetAudioSourceConfiguration command. + + + + + + Request the current configuration of a physical Audio output. A device + that has one or more AudioOutputs shall support the retrieval of the + AudioOutputConfiguration through this command. + + + + + + + Modify a video input configuration. A device that has one or more video + sources shall support the setting of the VideoSourceConfiguration through this command. + + + + + + Modify a video output configuration. A device that has one or more video + outputs shall support the setting of its video output configuration through this command. + + + + + + Modify an audio source configuration. A device that has a one or more + audio sources shall support the setting of the AudioSourceConfiguration through this + command. + + + + + + Modify an audio output configuration. A device that has one ore more audio + outputs shall support the setting of the AudioOutputConfiguration through this command. + + + + + + + Request the VideoSourceConfigurationOptions of a VideoSource. A device + with one or more video sources shall support this command. + + + + + + Request the VideoOutputConfigurationOptions of a VideoOutput. A device + that has one or more video outputs shall support the retrieval of + VideoOutputConfigurationOptions through this command. + + + + + + Request the AudioSourceConfigurationOptions of an AudioSource. A device + with one ore more AudioSources shall support this command. + + + + + + Request the available settings and ranges for a physical Audio output. A + device that has one or more AudioOutputs shall support this command. + + + + + + This operation gets a list of all available relay outputs and their + settings. + + + + + + This operation sets the settings of a relay output. + The relay can work in two relay modes: +
    +
  • + Bistable – After setting the state, the relay remains in this state. +
  • +
  • + Monostable – After setting the state, the relay returns to its idle state after the + specified time. +
  • +
+ The physical idle state of a relay output can be configured by setting the IdleState to + ‘open’ or + ‘closed’ (inversion of the relay behaviour). +
+ Idle State ‘open’ means that the relay is open when the relay state is set to ‘inactive’ + through + the trigger command (see Section 8.5.3) and closed when the state is set to ‘active’ through + the same command. +
+ Idle State ‘closed’ means, that the relay is closed when the relay state is set to + ‘inactive’ + through the trigger command (see Section 8.5.3) and open when the state is set to ‘active’ + through the same command. +
+ + +
+ + Modify the relay state. + + + + + This operation gets a list of all available digital inputs. + + + + + + This operation lists what configuration is available for digital inputs. + + + + + + Modify a digital input configuration. + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/onvif-ws-client/src/main/resources/wsdl/devicemgmt_2.5.wsdl b/onvif-ws-client/src/main/resources/wsdl/devicemgmt_2.5.wsdl new file mode 100644 index 0000000..8b64228 --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/devicemgmt_2.5.wsdl @@ -0,0 +1,4483 @@ + + + + + + + + + + + + + + Indicates if the service capabilities (untyped) should be included + in the response. + + + + + + + + + + + + Each Service element contains information about one service. + + + + + + + + + + + + Namespace of the service being described. This parameter allows to + match the service capabilities to the service. Note that only one set of + capabilities is supported per namespace. + + + + + + The transport addresses where the service can be reached. The scheme + and IP part shall match the one used in the request (i.e. the GetServices request). + + + + + + + + + The placeholder for the service capabilities. The service + capability element shall be returned here. For example for the device service + that would be the tds:DeviceServiceCapabilities element (not complextype). + + + + + + + + + The version of the service (not the ONVIF core spec version). + + + + + + + + + + + + + + + + + + + The capabilities for the device service is returned in the + Capabilities element. + + + + + + + + + + + + Network capabilities. + + + + + Security capabilities. + + + + + System capabilities. + + + + + Capabilities that do not fit in any of the other categories. + + + + + + + + + + + Indicates support for IP filtering. + + + + + Indicates support for zeroconf. + + + + + Indicates support for IPv6. + + + + + Indicates support for dynamic DNS configuration. + + + + + Indicates support for IEEE 802.11 configuration. + + + + + Indicates the maximum number of Dot1X configurations supported by the + device + + + + + + Indicates support for retrieval of hostname from DHCP. + + + + + + Maximum number of NTP servers supported by the devices SetNTP + command. + + + + + + Indicates support for Stateful IPv6 DHCP. + + + + + + + + + + + + Indicates support for TLS 1.0. + + + + + Indicates support for TLS 1.1. + + + + + Indicates support for TLS 1.2. + + + + + Indicates support for onboard key generation. + + + + + Indicates support for access policy configuration. + + + + + Indicates support for the ONVIF default access policy. + + + + + + Indicates support for IEEE 802.1X configuration. + + + + + Indicates support for remote user configuration. Used when accessing + another device. + + + + + + Indicates support for WS-Security X.509 token. + + + + + Indicates support for WS-Security SAML token. + + + + + Indicates support for WS-Security Kerberos token. + + + + + Indicates support for WS-Security Username token. + + + + + Indicates support for WS over HTTP digest authenticated communication + layer. + + + + + + Indicates support for WS-Security REL token. + + + + + EAP Methods supported by the device. The int values refer to the IANA EAP + Registry. + + + + + + The maximum number of users that the device supports. + + + + + + Maximum number of characters supported for the username by + CreateUsers. + + + + + + Maximum number of characters supported for the password by CreateUsers + and SetUser. + + + + + + + + + + Indicates support for WS Discovery resolve requests. + + + + + + Indicates support for WS-Discovery Bye. + + + + + Indicates support for remote discovery. + + + + + Indicates support for system backup through MTOM. + + + + + Indicates support for retrieval of system logging through MTOM. + + + + + + Indicates support for firmware upgrade through MTOM. + + + + + + Indicates support for firmware upgrade through HTTP. + + + + + + Indicates support for system backup through HTTP. + + + + + Indicates support for retrieval of system logging through HTTP. + + + + + + Indicates support for retrieving support information through HTTP. + + + + + + Indicates support for storage configuration interfaces. + + + + + + + + + + Lists of commands supported by SendAuxiliaryCommand. + + + + + + + + + + + + + + + + + The manufactor of the device. + + + + + The device model. + + + + + The firmware version in the device. + + + + + The serial number of the device. + + + + + The hardware ID of the device. + + + + + + + + + + + + Defines if the date and time is set via NTP or manually. + + + + + + Automatically adjust Daylight savings if defined in TimeZone. + + + + + + The time zone in POSIX 1003.1 format + + + + + Date and time in UTC. If time is obtained via NTP, UTCDateTime has + no meaning + + + + + + + + + + + + + + + + + + + + + + + + Contains information whether system date and time are set manually + or by NTP, daylight savings is on or off, time zone in POSIX 1003.1 format and + system date and time in UTC and also local system date and time. + + + + + + + + + + + + + Specifies the factory default action type. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Contains the reboot message sent by the device. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Contains the arbitary device diagnostics information. + + + + + + + + + + + + + Specifies the type of system log to get. + + + + + + + + + + + Contains the system log information. + + + + + + + + + + + + + + + + + + Contains a list of URI definining the device scopes. Scope + parameters can be of two types: fixed and configurable. Fixed parameters can not + be altered. + + + + + + + + + + + + + Contains a list of scope parameters that will replace all existing + configurable scope parameters. + + + + + + + + + + + + + + + + + + + Contains a list of new configurable scope parameters that will be + added to the existing configurable scope. + + + + + + + + + + + + + + + + + + + Contains a list of URIs that should be removed from the device + scope. +
+ Note that the response message always will match the request or an error will be + returned. The use of the response is for that reason deprecated. +
+
+
+
+
+
+ + + + + + Contains a list of URIs that has been removed from the device + scope + + + + + + + + + + + + + + + + + + + + Indicator of discovery mode: Discoverable, NonDiscoverable. + + + + + + + + + + + + + + Indicator of discovery mode: Discoverable, NonDiscoverable. + + + + + + + + + + + + + + + + + + + + + + + + + + Indicator of discovery mode: Discoverable, NonDiscoverable. + + + + + + + + + + + + + + Indicator of discovery mode: Discoverable, NonDiscoverable. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Contains a list of the onvif users and following information is + included in each entry: username and user level. + + + + + + + + + + + + + Creates new device users and corresponding credentials. Each user + entry includes: username, password and user level. Either all users are created + successfully or a fault message MUST be returned without creating any user. If + trying to create several users with exactly the same username the request is + rejected and no users are created. If password is missing, then fault message Too + weak password is returned. + + + + + + + + + + + + + + + + + + + Deletes users on an device and there may exist users that cannot + be deleted to ensure access to the unit. Either all users are deleted successfully + or a fault message MUST be returned and no users be deleted. If a username exists + multiple times in the request, then a fault message is returned. + + + + + + + + + + + + + + + + + + + Updates the credentials for one or several users on an device. + Either all change requests are processed successfully or a fault message MUST be + returned. If the request contains the same username multiple times, a fault + message is returned. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + List of categories to retrieve capability information on. + + + + + + + + + + + + + Capability information. + + + + + + + + + + + + + + + + + + + Contains the hostname information. + + + + + + + + + + + + The hostname to set. + + + + + + + + + + + + + + + + + + True if the hostname shall be obtained via DHCP. + + + + + + + + + + + + + Indicates whether or not a reboot is required after configuration updates. + + + + + + + + + + + + + + + + + + + + DNS information. + + + + + + + + + + + + + + Indicate if the DNS address is to be retrieved using DHCP. + + + + + + + DNS search domain. + + + + + + + DNS address(es) set manually. + + + + + + + + + + + + + + + + + + + + + + + + + + NTP information. + + + + + + + + + + + + + + Indicate if NTP address information is to be retrieved using DHCP. + + + + + + + Manual NTP settings. + + + + + + + + + + + + + + + + + + + + + + + + + + Dynamic DNS information. + + + + + + + + + + + + + + Dynamic DNS type. + + + + + + + DNS name. + + + + + + + DNS record time to live. + + + + + + + + + + + + + + + + + + + + + + + + + + List of network interfaces. + + + + + + + + + + + + + + Symbolic network interface name. + + + + + + + Network interface name. + + + + + + + + + + + + + Indicates whether or not a reboot is required after configuration updates. + If a device responds with RebootNeeded set to false, the device can be reached + via the new IP address without further action. A client should be aware that a + device + may not be responsive for a short period of time until it signals availability at + the new address via the discovery Hello messages. + If a device responds with RebootNeeded set to true, it will be further available + under + its previous IP address. The settings will only be activated when the device is + rebooted via the SystemReboot command. + + + + + + + + + + + + + + + + + + + Contains an array of defined protocols supported by the device. + There are three protocols defined; HTTP, HTTPS and RTSP. The following parameters + can be retrieved for each protocol: port and enable/disable. + + + + + + + + + + + + + Configures one or more defined network protocols supported by the + device. There are currently three protocols defined; HTTP, HTTPS and RTSP. The + following parameters can be set for each protocol: port and enable/disable. + + + + + + + + + + + + + + + + + + + + + + + + + Gets the default IPv4 and IPv6 gateway settings from the device. + + + + + + + + + + + + + Sets IPv4 gateway address used as default setting. + + + + + + Sets IPv6 gateway address used as default setting. + + + + + + + + + + + + + + + + + + + + + + + + + Contains the zero-configuration. + + + + + + + + + + + + Unique identifier referencing the physical interface. + + + + + + Specifies if the zero-configuration should be enabled or not. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Certificate id. + + + + + Identification of the entity associated with the public-key. + + + + + + Certificate validity start date. + + + + + Certificate expiry start date. + + + + + + + + + + + + base64 encoded DER representation of certificate. + + + + + + + + + + + + + + + + + + + + Id and base64 encoded DER representation of all available certificates. + + + + + + + + + + + + + + + + + + + + Indicates if a certificate is used in an optional HTTPS configuration of the + device. + + + + + + + + + + + + + + Indicates if a certificate is to be used in an optional HTTPS configuration of the + device. + + + + + + + + + + + + + + + + + + + + List of ids of certificates to delete. + + + + + + + + + + + + + + + + + + + + List of ids of certificates to delete. + + + + + + + Relative Dinstinguished Name(RDN) CommonName(CN). + + + + + + + Optional base64 encoded DER attributes. + + + + + + + + + + + + + base64 encoded DER representation of certificate. + + + + + + + + + + + + + + Optional id and base64 encoded DER representation of certificate. + + + + + + + + + + + + + + + + + + + + + + + + + + Indicates whether or not client certificates are required by device. + + + + + + + + + + + + + + Indicates whether or not client certificates are required by device. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + User name + + + + + optional password + + + + + + + + + + + + + + + + + NFS protocol + + + + + CIFS protocol + + + + + CDMI protocol + + + + + + + + + + local path + + + + + Storage server address + + + + + User credential for the storage server + + + + + + + + + + + + + StorageType lists the acceptable values for type attribute + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns information about services on the device. + + + + + Returns the capabilities of the device service. The result is returned in + a typed answer. + + + + + + This operation gets basic device information from the device. + + + + + + This operation sets the device system date and time. The device shall + support the + configuration of the daylight saving setting and of the manual system date and time (if + applicable) or indication of NTP time (if applicable) through the SetSystemDateAndTime + command. +
+ If system time and date are set manually, the client shall include UTCDateTime in the + request. +
+ A TimeZone token which is not formed according to the rules of IEEE 1003.1 section 8.3 is + considered as invalid timezone. +
+ The DayLightSavings flag should be set to true to activate any DST settings of the TimeZone + string. + Clear the DayLightSavings flag if the DST portion of the TimeZone settings should be + ignored. +
+ + +
+ + This operation gets the device system date and time. The device shall + support the return of + the daylight saving setting and of the manual system date and time (if applicable) or + indication + of NTP time (if applicable) through the GetSystemDateAndTime command. +
+ A device shall provide the UTCDateTime information. +
+ + +
+ + This operation reloads the parameters on the device to their factory + default values. + + + + + + This operation upgrades a device firmware version. After a successful + upgrade the response + message is sent before the device reboots. The device should support firmware upgrade + through the UpgradeSystemFirmware command. The exact format of the firmware data is + outside the scope of this standard. + + + + + + This operation reboots the device. + + + + + This operation restores the system backup configuration files(s) + previously retrieved from a + device. The device should support restore of backup configuration file(s) through the + RestoreSystem command. The exact format of the backup configuration file(s) is outside the + scope of this standard. If the command is supported, it shall accept backup files returned + by + the GetSystemBackup command. + + + + + + This operation is retrieves system backup configuration file(s) from a + device. The device + should support return of back up configuration file(s) through the GetSystemBackup command. + The backup is returned with reference to a name and mime-type together with binary data. + The exact format of the backup configuration files is outside the scope of this standard. + + + + + + This operation gets a system log from the device. The exact format of the + system logs is outside the scope of this standard. + + + + + + This operation gets arbitary device diagnostics information from the + device. + + + + + + This operation requests the scope parameters of a device. The scope + parameters are used in + the device discovery to match a probe message, see Section 7. The Scope parameters are of + two different types: +
    +
  • Fixed
  • +
  • Configurable
  • +
+ Fixed scope parameters are permanent device characteristics and cannot be removed through + the device management interface. + The scope type is indicated in the scope list returned in the get scope parameters response. + A device shall support + retrieval of discovery scope parameters through the GetScopes command. As some scope + parameters are mandatory, + the device shall return a non-empty scope list in the response. +
+ + +
+ + This operation sets the scope parameters of a device. The scope parameters + are used in the + device discovery to match a probe message. + This operation replaces all existing configurable scope parameters (not fixed parameters). + If + this shall be avoided, one should use the scope add command instead. The device shall + support configuration of discovery scope parameters through the SetScopes command. + + + + + + This operation adds new configurable scope parameters to a device. The + scope parameters + are used in the device discovery to match a probe message. The device shall + support addition of discovery scope parameters through the AddScopes command. + + + + + + This operation deletes scope-configurable scope parameters from a device. + The scope + parameters are used in the device discovery to match a probe message, see Section 7. The + device shall support deletion of discovery scope parameters through the RemoveScopes + command. + Table + + + + + + This operation gets the discovery mode of a device. See Section 7.2 for + the definition of the + different device discovery modes. The device shall support retrieval of the discovery mode + setting through the GetDiscoveryMode command. + + + + + + This operation sets the discovery mode operation of a device. See Section + 7.2 for the + definition of the different device discovery modes. The device shall support configuration + of + the discovery mode setting through the SetDiscoveryMode command. + + + + + + This operation gets the remote discovery mode of a device. See Section 7.4 + for the definition + of remote discovery extensions. A device that supports remote discovery shall support + retrieval of the remote discovery mode setting through the GetRemoteDiscoveryMode + command. + + + + + + This operation sets the remote discovery mode of operation of a device. + See Section 7.4 for + the definition of remote discovery remote extensions. A device that supports remote + discovery + shall support configuration of the discovery mode setting through the + SetRemoteDiscoveryMode command. + + + + + + This operation gets the remote DP address or addresses from a device. If + the device supports + remote discovery, as specified in Section 7.4, the device shall support retrieval of the + remote + DP address(es) through the GetDPAddresses command. + + + + + + This operation sets the remote DP address or addresses on a device. If the + device supports + remote discovery, as specified in Section 7.4, the device shall support configuration of the + remote DP address(es) through the SetDPAddresses command. + + + + + + A client can ask for the device service endpoint reference address + property that can be used + to derive the password equivalent for remote user operation. The device shall support the + GetEndpointReference command returning the address property of the device service + endpoint reference. + + + + + + This operation returns the configured remote user (if any). A device + supporting remote user + handling shall support this operation. The user is only valid for the WS-UserToken profile + or + as a HTTP / RTSP user. +
+ The algorithm to use for deriving the password is described in section 5.12.2.1 of the core + specification. +
+ + +
+ + This operation sets the remote user. A device supporting remote user + handling shall support this + operation. The user is only valid for the WS-UserToken profile or as a HTTP / RTSP user. +
+ The password that is set shall always be the original (not derived) password. +
+ If UseDerivedPassword is set password derivation shall be done by the device when connecting + to a + remote device.The algorithm to use for deriving the password is described in section + 5.12.2.1 of the core specification. +
+ To remove the remote user SetRemoteUser should be called without the RemoteUser parameter. +
+ + +
+ + This operation lists the registered users and corresponding credentials on + a device. The + device shall support retrieval of registered device users and their credentials for the user + token through the GetUsers command. + + + + + + This operation creates new device users and corresponding credentials on a + device for authentication purposes. + The device shall support creation of device users and their credentials through the + CreateUsers + command. Either all users are created successfully or a fault message shall be returned + without creating any user. +
+ ONVIF compliant devices are recommended to support password length of at least 28 bytes, + as clients may follow the password derivation mechanism which results in 'password + equivalent' of length 28 bytes, as described in section 3.1.2 of the ONVIF security white + paper. +
+ + +
+ + This operation deletes users on a device. The device shall support + deletion of device users and their credentials + through the DeleteUsers command. A device may have one or more fixed users + that cannot be deleted to ensure access to the unit. Either all users are deleted + successfully or a + fault message shall be returned and no users be deleted. + + + + + + This operation updates the settings for one or several users on a device + for authentication purposes. + The device shall support update of device users and their credentials through the SetUser + command. + Either all change requests are processed successfully or a fault message shall be returned + and no change requests be processed. + + + + + + It is possible for an endpoint to request a URL that can be used to + retrieve the complete + schema and WSDL definitions of a device. The command gives in return a URL entry point + where all the necessary product specific WSDL and schema definitions can be retrieved. The + device shall provide a URL for WSDL and schema download through the GetWsdlUrl command. + + + + + + Any endpoint can ask for the capabilities of a device using the capability + exchange request + response operation. The device shall indicate all its ONVIF compliant capabilities through + the + GetCapabilities command. + The capability list includes references to the addresses (XAddr) of the service implementing + the interface operations in the category. Apart from the addresses, the + capabilities only reflect optional functions. + + + + + + This operation is used by an endpoint to get the hostname from a device. + The device shall + return its hostname configurations through the GetHostname command. + + + + + + This operation sets the hostname on a device. It shall be possible to set + the device hostname + configurations through the SetHostname command. +
+ A device shall accept string formated according to RFC 1123 section 2.1 or alternatively to + RFC 952, + other string shall be considered as invalid strings. +
+ + +
+ + This operation controls whether the hostname is set manually or retrieved + via DHCP. + + + + + + This operation gets the DNS settings from a device. The device shall + return its DNS + configurations through the GetDNS command. + + + + + + This operation sets the DNS settings on a device. It shall be possible to + set the device DNS + configurations through the SetDNS command. + + + + + + This operation gets the NTP settings from a device. If the device supports + NTP, it shall be + possible to get the NTP server settings through the GetNTP command. + + + + + + This operation sets the NTP settings on a device. If the device supports + NTP, it shall be + possible to set the NTP server settings through the SetNTP command. +
+ A device shall accept string formated according to RFC 1123 section 2.1 or alternatively to + RFC 952, + other string shall be considered as invalid strings. +
+ Changes to the NTP server list will not affect the clock mode DateTimeType. Use + SetSystemDateAndTime to activate NTP operation. +
+ + +
+ + This operation gets the dynamic DNS settings from a device. If the device + supports dynamic + DNS as specified in [RFC 2136] and [RFC 4702], it shall be possible to get the type, name + and TTL through the GetDynamicDNS command. + + + + + + This operation sets the dynamic DNS settings on a device. If the device + supports dynamic + DNS as specified in [RFC 2136] and [RFC 4702], it shall be possible to set the type, name + and TTL through the SetDynamicDNS command. + + + + + + This operation gets the network interface configuration from a device. The + device shall + support return of network interface configuration settings as defined by the + NetworkInterface + type through the GetNetworkInterfaces command. + + + + + + This operation sets the network interface configuration on a device. The + device shall support + network configuration of supported network interfaces through the SetNetworkInterfaces + command. +
+ For interoperability with a client unaware of the IEEE 802.11 extension a device shall + retain + its IEEE 802.11 configuration if the IEEE 802.11 configuration element isn’t present in the + request. +
+ + +
+ + This operation gets defined network protocols from a device. The device + shall support the + GetNetworkProtocols command returning configured network protocols. + + + + + + This operation configures defined network protocols on a device. The + device shall support + configuration of defined network protocols through the SetNetworkProtocols command. + + + + + + This operation gets the default gateway settings from a device. The device + shall support the + GetNetworkDefaultGateway command returning configured default gateway address(es). + + + + + + This operation sets the default gateway settings on a device. The device + shall support + configuration of default gateway through the SetNetworkDefaultGateway command. + + + + + + This operation gets the zero-configuration from a device. If the device + supports dynamic IP + configuration according to [RFC3927], it shall support the return of IPv4 zero configuration + address and status through the GetZeroConfiguration command. +
+ Devices supporting zero configuration on more than one interface shall use the extension to + list the additional interface settings. +
+ + +
+ + This operation sets the zero-configuration. Use GetCapalities to get if + zero-zero-configuration is supported or not. + + + + + + This operation gets the IP address filter settings from a device. If the + device supports device + access control based on IP filtering rules (denied or accepted ranges of IP addresses), the + device shall support the GetIPAddressFilter command. + + + + + + This operation sets the IP address filter settings on a device. If the + device supports device + access control based on IP filtering rules (denied or accepted ranges of IP addresses), the + device shall support configuration of IP filtering rules through the SetIPAddressFilter + command. + + + + + + This operation adds an IP filter address to a device. If the device + supports device access + control based on IP filtering rules (denied or accepted ranges of IP addresses), the device + shall support adding of IP filtering addresses through the AddIPAddressFilter command. + + + + + + This operation deletes an IP filter address from a device. If the device + supports device access + control based on IP filtering rules (denied or accepted ranges of IP addresses), the device + shall support deletion of IP filtering addresses through the RemoveIPAddressFilter command. + + + + + + Access to different services and sub-sets of services should be subject to + access control. The + WS-Security framework gives the prerequisite for end-point authentication. Authorization + decisions can then be taken using an access security policy. This standard does not mandate + any particular policy description format or security policy but this is up to the device + manufacturer or system provider to choose policy and policy description format of choice. + However, an access policy (in arbitrary format) can be requested using this command. If the + device supports access policy settings based on WS-Security authentication, then the device + shall support this command. + + + + + + This command sets the device access security policy (for more details on + the access security + policy see the Get command). If the device supports access policy settings + based on WS-Security authentication, then the device shall support this command. + + + + + + This operation generates a private/public key pair and also can create a + self-signed device + certificate as a result of key pair generation. The certificate is created using a suitable + onboard key pair generation mechanism. +
+ If a device supports onboard key pair generation, the device that supports TLS shall support + this certificate creation command. And also, if a device supports onboard key pair + generation, + the device that support IEEE 802.1X shall support this command for the purpose of key pair + generation. Certificates and key pairs are identified using certificate IDs. These IDs are + either + chosen by the certificate generation requester or by the device (in case that no ID value is + given). +
+ + +
+ + This operation gets all device server certificates (including self-signed) + for the purpose of TLS + authentication and all device client certificates for the purpose of IEEE 802.1X + authentication. + This command lists only the TLS server certificates and IEEE 802.1X client certificates for + the + device (neither trusted CA certificates nor trusted root certificates). The certificates are + returned as binary data. A device that supports TLS shall support this command and the + certificates shall be encoded using ASN.1 [X.681], [X.682], [X.683] DER [X.690] encoding + rules. + + + + + + This operation is specific to TLS functionality. This operation gets the + status + (enabled/disabled) of the device TLS server certificates. A device that supports TLS shall + support this command. + + + + + + This operation is specific to TLS functionality. This operation sets the + status (enable/disable) + of the device TLS server certificates. A device that supports TLS shall support this + command. + Typically only one device server certificate is allowed to be enabled at a time. + + + + + + This operation deletes a certificate or multiple certificates. The device + MAY also delete a + private/public key pair which is coupled with the certificate to be deleted. The device that + support either TLS or IEEE 802.1X shall support the deletion of a certificate or multiple + certificates through this command. Either all certificates are deleted successfully or a + fault + message shall be returned without deleting any certificate. + + + + + + This operation requests a PKCS #10 certificate signature request from the + device. The + returned information field shall be either formatted exactly as specified in [PKCS#10] or + PEM + encoded [PKCS#10] format. In order for this command to work, the device must already have + a private/public key pair. This key pair should be referred by CertificateID as specified in + the + input parameter description. This CertificateID refers to the key pair generated using + CreateCertificate command. +
+ A device that support onboard key pair generation that supports either TLS or IEEE 802.1X + using client certificate shall support this command. +
+ + +
+ + TLS server certificate(s) or IEEE 802.1X client certificate(s) created + using the PKCS#10 + certificate request command can be loaded into the device using this command (see Section + 8.4.13). The certificate ID in the request shall be present. The device may sort the + received + certificate(s) based on the public key and subject information in the certificate(s). + The certificate ID in the request will be the ID value the client wish to have. The device + is + supposed to scan the generated key pairs present in the device to identify which is the + correspondent key pair with the loaded certificate and then make the link between the + certificate and the key pair. +
+ A device that supports onboard key pair generation that support either TLS or IEEE 802.1X + shall support this command. +
+ The certificates shall be encoded using ASN.1 [X.681], [X.682], [X.683] DER [X.690] encoding + rules. +
+ This command is applicable to any device type, although the parameter name is called for + historical reasons NVTCertificate. +
+ + +
+ + This operation is specific to TLS functionality. This operation gets the + status + (enabled/disabled) of the device TLS client authentication. A device that supports TLS shall + support this command. + + + + + + This operation is specific to TLS functionality. This operation sets the + status + (enabled/disabled) of the device TLS client authentication. A device that supports TLS shall + support this command. + + + + + + This operation gets a list of all available relay outputs and their + settings. +
+ This method has been depricated with version 2.0. Refer to the DeviceIO service. +
+ + +
+ + This operation sets the settings of a relay output. +
This method has been depricated with version 2.0. Refer to the DeviceIO service. +
+ + +
+ + This operation sets the state of a relay output. +
This method has been depricated with version 2.0. Refer to the DeviceIO service. +
+ + +
+ + Manage auxiliary commands supported by a device, such as controlling an + Infrared (IR) lamp, + a heater or a wiper or a thermometer that is connected to the device. +
+ The supported commands can be retrieved via the AuxiliaryCommands capability. +
+ Although the name of the auxiliary commands can be freely defined, commands starting with + the prefix tt: are + reserved to define frequently used commands and these reserved commands shall all share the + "tt:command|parameter" syntax. +
    +
  • tt:Wiper|On – Request to start the wiper.
  • +
  • tt:Wiper|Off – Request to stop the wiper.
  • +
  • tt:Washer|On – Request to start the washer.
  • +
  • tt:Washer|Off – Request to stop the washer.
  • +
  • tt:WashingProcedure|On – Request to start the washing procedure.
  • +
  • tt: WashingProcedure |Off – Request to stop the washing procedure.
  • +
  • tt:IRLamp|On – Request to turn ON an IR illuminator attached to the unit.
  • +
  • tt:IRLamp|Off – Request to turn OFF an IR illuminator attached to the unit.
  • +
  • tt:IRLamp|Auto – Request to configure an IR illuminator attached to the unit so that + it automatically turns ON and OFF. +
  • +
+ A device that indicates auxiliary service capability shall support this command. +
+ + +
+ + CA certificates will be loaded into a device and be used for the sake of + following two cases. + The one is for the purpose of TLS client authentication in TLS server function. The other + one + is for the purpose of Authentication Server authentication in IEEE 802.1X function. This + operation gets all CA certificates loaded into a device. A device that supports either TLS + client + authentication or IEEE 802.1X shall support this command and the returned certificates shall + be encoded using ASN.1 [X.681], [X.682], [X.683] DER [X.690] encoding rules. + + + + + + There might be some cases that a Certificate Authority or some other + equivalent creates a + certificate without having PKCS#10 certificate signing request. In such cases, the + certificate + will be bundled in conjunction with its private key. This command will be used for such use + case scenarios. The certificate ID in the request is optionally set to the ID value the + client + wish to have. If the certificate ID is not specified in the request, device can choose the + ID + accordingly. +
+ This operation imports a private/public key pair into the device. + The certificates shall be encoded using ASN.1 [X.681], [X.682], [X.683] DER [X.690] encoding + rules. +
+ A device that does not support onboard key pair generation and support either TLS or IEEE + 802.1X using client certificate shall support this command. A device that support onboard + key + pair generation MAY support this command. The security policy of a device that supports this + operation should make sure that the private key is sufficiently protected. +
+ + +
+ + This operation requests the information of a certificate specified by + certificate ID. The device + should respond with its “Issuer DN”, “Subject DN”, “Key usage”, "Extended key usage”, “Key + Length”, “Version”, “Serial Number”, “Signature Algorithm” and “Validity” data as the + information of the certificate, as long as the device can retrieve such information from the + specified certificate. +
+ A device that supports either TLS or IEEE 802.1X should support this command. +
+ + +
+ + This command is used when it is necessary to load trusted CA certificates + or trusted root + certificates for the purpose of verification for its counterpart i.e. client certificate + verification in + TLS function or server certificate verification in IEEE 802.1X function. +
+ A device that support either TLS or IEEE 802.1X shall support this command. As for the + supported certificate format, either DER format or PEM format is possible to be used. But a + device that support this command shall support at least DER format as supported format type. + The device may sort the received certificate(s) based on the public key and subject + information in the certificate(s). Either all CA certificates are loaded successfully or a + fault + message shall be returned without loading any CA certificate. +
+ + +
+ + This operation newly creates IEEE 802.1X configuration parameter set of + the device. The + device shall support this command if it supports IEEE 802.1X. If the device receives this + request with already existing configuration token (Dot1XConfigurationToken) specification, + the + device should respond with 'ter:ReferenceToken ' error to indicate there is some + configuration + conflict. + + + + + + While the CreateDot1XConfiguration command is trying to create a new + configuration + parameter set, this operation modifies existing IEEE 802.1X configuration parameter set of + the device. A device that support IEEE 802.1X shall support this command. + + + + + + This operation gets one IEEE 802.1X configuration parameter set from the + device by + specifying the configuration token (Dot1XConfigurationToken). +
+ A device that supports IEEE 802.1X shall support this command. + Regardless of whether the 802.1X method in the retrieved configuration has a password or + not, the device shall not include the Password element in the response. +
+ + +
+ + This operation gets all the existing IEEE 802.1X configuration parameter + sets from the device. + The device shall respond with all the IEEE 802.1X configurations so that the client can get + to + know how many IEEE 802.1X configurations are existing and how they are configured. +
+ A device that support IEEE 802.1X shall support this command. +
+ Regardless of whether the 802.1X method in the retrieved configuration has a password or + not, the device shall not include the Password element in the response. +
+ + +
+ + This operation deletes an IEEE 802.1X configuration parameter set from the + device. Which + configuration should be deleted is specified by the 'Dot1XConfigurationToken' in the + request. + A device that support IEEE 802.1X shall support this command. + + + + + + This operation returns the IEEE802.11 capabilities. The device shall + support + this operation. + + + + + + This operation returns the status of a wireless network interface. The + device shall support this + command. + + + + + + This operation returns a lists of the wireless networks in range of the + device. A device should + support this operation. + + + + + + This operation is used to retrieve URIs from which system information may + be downloaded + using HTTP. URIs may be returned for the following system information: +
+ System Logs. Multiple system logs may be returned, of different types. The exact format of + the system logs is outside the scope of this specification. +
+ Support Information. This consists of arbitrary device diagnostics information from a + device. + The exact format of the diagnostic information is outside the scope of this specification. +
+ System Backup. The received file is a backup file that can be used to restore the current + device configuration at a later date. The exact format of the backup configuration file is + outside the scope of this specification. +
+ If the device allows retrieval of system logs, support information or system backup data, it + should make them available via HTTP GET. If it does, it shall support the GetSystemUris + command. +
+ + +
+ + This operation initiates a firmware upgrade using the HTTP POST mechanism. + The response + to the command includes an HTTP URL to which the upgrade file may be uploaded. The + actual upgrade takes place as soon as the HTTP POST operation has completed. The device + should support firmware upgrade through the StartFirmwareUpgrade command. The exact + format of the firmware data is outside the scope of this specification. + Firmware upgrade over HTTP may be achieved using the following steps: +
    +
  1. Client calls StartFirmwareUpgrade.
  2. +
  3. Server responds with upload URI and optional delay value.
  4. +
  5. Client waits for delay duration if specified by server.
  6. +
  7. Client transmits the firmware image to the upload URI using HTTP POST.
  8. +
  9. Server reprograms itself using the uploaded image, then reboots.
  10. +
+ If the firmware upgrade fails because the upgrade file was invalid, the HTTP POST response + shall be “415 Unsupported Media Type”. If the firmware upgrade fails due to an error at the + device, the HTTP POST response shall be “500 Internal Server Error”. +
+ The value of the Content-Type header in the HTTP POST request shall be + “application/octetstream”. +
+ + +
+ + This operation initiates a system restore from backed up configuration + data using the HTTP + POST mechanism. The response to the command includes an HTTP URL to which the backup + file may be uploaded. The actual restore takes place as soon as the HTTP POST operation + has completed. Devices should support system restore through the StartSystemRestore + command. The exact format of the backup configuration data is outside the scope of this + specification. +
+ System restore over HTTP may be achieved using the following steps: +
    +
  1. Client calls StartSystemRestore.
  2. +
  3. Server responds with upload URI.
  4. +
  5. Client transmits the configuration data to the upload URI using HTTP POST.
  6. +
  7. Server applies the uploaded configuration, then reboots if necessary.
  8. +
+ If the system restore fails because the uploaded file was invalid, the HTTP POST response + shall be “415 Unsupported Media Type”. If the system restore fails due to an error at the + device, the HTTP POST response shall be “500 Internal Server Error”. +
+ The value of the Content-Type header in the HTTP POST request shall be + “application/octetstream”. +
+ + +
+ + + + This operation lists all existing storage configurations for the device. + + + + + + + This operation creates a new storage configuration. + The configuration data shall be created in the device and shall be persistent (remain after + reboot). + + + + + + + This operation retrieves the Storage configuration associated with the given storage + configuration token. + + + + + + + This operation modifies an existing Storage configuration. + + + + + + + This operation deletes the given storage configuration and configuration change shall always + be persistent. + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/onvif-ws-client/src/main/resources/wsdl/display_2.1.1.wsdl b/onvif-ws-client/src/main/resources/wsdl/display_2.1.1.wsdl new file mode 100644 index 0000000..2abb99d --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/display_2.1.1.wsdl @@ -0,0 +1,579 @@ + + + + + + + + + + + + + + + + + + + The capabilities for the display service is returned in the + Capabilities element. + + + + + + + + + + + + + + Indication that the SetLayout command supports only predefined + layouts. + + + + + + + + + + + + + Token of the Video Output whose Layout is requested + + + + + + + + + + + + + + Current layout of the video output. + + + + + + + + + + + + + Token of the Video Output whose Layout shall be changed. + + + + + + Layout to be set + + + + + + + + + + + + + + + + + + + + + Token of the Video Output whose options are requested + + + + + + + + + + + + + + The LayoutOptions describe the fixed and predefined layouts of a + device. If the device does + not offer fixed layouts and allows setting the layout free this element is empty. + + + + + + decoding and encoding capabilities of the device + + + + + + + + + + + + + + Reference Token of the Video Output whose Pane Configurations are + requested + + + + + + + + + + + + + + Contains a list of defined Panes of the specified VideoOutput. + Each VideoOutput has at least one PaneConfiguration. + + + + + + + + + + + + + Reference Token of the Video Output the requested pane belongs + to + + + + + + Reference Token of the Pane whose Configuration is requested + + + + + + + + + + + + + + returns the configuration of the requested pane. + + + + + + + + + + + + + + Token of the video output whose panes to set. + + + + + Pane Configuration to be set. + + + + + + + + + + + + + + + + + + + + Token of the video output whose panes to set. + + + + + Pane Configuration to be set. + + + + + + + + + + + + + + + + + + + + + Token of the video output where the pane shall be created. + + + + + + Configuration of the pane to be created. + + + + + + + + + + + + + Token of the new pane configuration. + + + + + + + + + + + + + Token of the video output where the pane shall be deleted. + + + + + + Token of the pane to be deleted. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the capabilities of the display service. The result is returned in + a typed answer. + + + + + + Return the current layout of a video output. The Layout assigns a pane + configuration to a certain area of the display. The layout settings + directly affect a specific video output. The layout consists of a list of PaneConfigurations + and + their associated display areas. + + + + + + Change the layout of a display (e.g. change from + single view to split screen view).The Layout assigns a pane configuration to a certain area + of the display. The layout settings + directly affect a specific video output. The layout consists of a list of PaneConfigurations + and + their associated display areas. +
+ A device implementation shall be tolerant against rounding errors when matching a layout + against its fixed set of layouts by accepting differences of at least one percent. +
+ + +
+ + The Display Options contain the supported layouts (LayoutOptions) and the + decoding and + encoding capabilities (CodingCapabilities) of the device. The GetDisplayOptions command + returns both, Layout and Coding Capabilities, of a VideoOutput. + + + + + + List all currently defined panes of a device for a specified video output + (regardless if this pane is visible at a moment). A Pane is a display area on the monitor + that is attached to a video output. A pane has a + PaneConfiguration that describes which entities are associated with the pane. A client has + to configure the pane according to the connection to be established by setting the + AudioOutput and/or AudioSourceToken. If a Token is not set, the corresponding session will + not be established. + + + + + + Retrieve the pane configuration for a pane token. + + + + + Modify one or more configurations of the specified video output. + This method will only modify the provided configurations and leave the others unchanged. + Use DeletePaneConfiguration to remove pane + configurations. + + + + + + This command changes the configuration of the specified pane (tbd) + + + + + + Create a new pane configuration describing the streaming and coding + settings for a display area. +
+ This optional method is only supported by devices that signal support of dynamic pane + creation via their capabilities. +
+ The content of the Token field may be ignored by the device. +
+ + +
+ + Delete a pane configuration. A service must respond with an error if the + pane configuration + is in use by the current layout. +
+ This optional method is only supported by devices that signal support of dynamic pane + creation via their capabilities. +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/onvif-ws-client/src/main/resources/wsdl/doorcontrol_1.0.wsdl b/onvif-ws-client/src/main/resources/wsdl/doorcontrol_1.0.wsdl new file mode 100644 index 0000000..c702b0a --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/doorcontrol_1.0.wsdl @@ -0,0 +1,1336 @@ + + + + + + + + + + + + ServiceCapabilities structure reflects optional functionality of a service. + The information is static and does not change during device operation. + The following capabilities are available: + + + + + + + + The maximum number of entries returned by a single Get<Entity>List + or Get<Entity> request. The device shall never return more than this number of + entities in a single response. + + + + + + + + + + Used as extension base. + + + + + + + + A user readable name. It shall be up to 64 characters. + + + + + + A user readable description. It shall be up to 1024 + characters. + + + + + + + + + + + + The DoorInfo type represents the Door as a physical object. + The structure contains information and capabilities of a specific door instance. + An ONVIF compliant device shall provide the following fields for each Door instance: + + + + + + + + The capabilities of the Door. + + + + + + + + + + + + + DoorCapabilities reflect optional functionality of a particular physical entity. + Different door 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: + + + + + + + + Indicates whether or not this Door instance supports AccessDoor + command to perform momentary access. + + + + + + Indicates that this Door instance supports overriding configured + timing in the AccessDoor command. + + + + + + Indicates that this Door instance supports LockDoor command to lock + the door. + + + + + + Indicates that this Door instance supports UnlockDoor command to + unlock the door. + + + + + + Indicates that this Door instance supports BlockDoor command to block + the door. + + + + + + Indicates that this Door instance supports DoubleLockDoor command to + lock multiple locks on the door. + + + + + + Indicates that this Door instance supports LockDown (and + LockDownRelease) commands to lock the door and put it in LockedDown mode. + + + + + + Indicates that this Door instance supports LockOpen (and + LockOpenRelease) commands to unlock the door and put it in LockedOpen mode. + + + + + + Indicates that this Door instance has a DoorMonitor and supports the + DoorPhysicalState event. + + + + + + Indicates that this Door instance has a LockMonitor and supports the + LockPhysicalState event. + + + + + + Indicates that this Door instance has a DoubleLockMonitor and supports + the DoubleLockPhysicalState event. + + + + + + Indicates that this Door instance supports door alarm and the + DoorAlarm event. + + + + + + Indicates that this Door instance has a Tamper detector and supports + the DoorTamper event. + + + + + + Indicates that this Door instance supports door fault and the + DoorFault event. + + + + + + + + + + The DoorState structure contains current aggregate runtime status of Door. + + + + + + Physical state of Door; it is of type DoorPhysicalState. A device + that signals support for DoorMonitor capability for a particular door instance shall + provide this field. + + + + + + Physical state of the Lock; it is of type LockPhysicalState. A + device that signals support for LockMonitor capability for a particular door + instance shall provide this field. + + + + + + Physical state of the DoubleLock; it is of type LockPhysicalState. A + device that signals support for DoubleLockMonitor capability for a particular door + instance shall provide this field. + + + + + + Alarm state of the door; it is of type DoorAlarmState. A device that + signals support for Alarm capability for a particular door instance shall provide + this field. + + + + + + Tampering state of the door; it is of type DoorTamper. A device that + signals support for Tamper capability for a particular door instance shall provide + this field. + + + + + + Fault information for door; it is of type DoorFault. A device that + signals support for Fault capability for a particular door instance shall provide + this field. + + + + + + The logical operating mode of the door; it is of type DoorMode. An + ONVIF compatible device shall report current operating mode in this field. + + + + + + + + + + + + The physical state of a Door. + + + + + + Value is currently unknown (possibly due to initialization or + monitors not giving a conclusive result). + + + + + + Door is open. + + + + + Door is closed. + + + + + Door monitor fault is detected. + + + + + + + + + The physical state of a Lock (including Double Lock). + + + + + + Value is currently not known. + + + + + Lock is activated. + + + + + Lock is not activated. + + + + + Lock fault is detected. + + + + + + + + + Describes the state of a Door with regard to alarms. + + + + + + No alarm. + + + + + Door is forced open. + + + + + Door is held open too long. + + + + + + + + + Tampering information for a Door. + + + + + + Optional field; Details describing tampering state change (e.g., + reason, place and time).
NOTE: All fields (including this one) which are + designed to give end-user prompts can be localized to the customers's native + language. +
+
+
+ + + State of the tamper detector; it is of type DoorTamperState. + + + + +
+ +
+ + + + + Describes the state of a Tamper detector. + + + + + + Value is currently not known. + + + + + No tampering is detected. + + + + + Tampering is detected. + + + + + + + + + Fault information for a Door. + This can be extended with optional attributes in the future. + + + + + + Optional reason for fault. + + + + + Overall fault state for the door; it is of type DoorFaultState. If + there are any faults, the value shall be: FaultDetected. Details of the detected + fault shall be found in the Reason field, and/or the various DoorState fields and/or + in extensions to this structure. + + + + + + + + + + + + Describes the state of a Door fault. + + + + + + Fault state is unknown. + + + + + No fault is detected. + + + + + Fault is detected. + + + + + + + + + DoorMode parameters describe current Door mode from a logical perspective. + + + + + + The Door is in an Unknown state. + + + + + The Door is in a Locked state. In this mode the device shall provide + momentary access using the AccessDoor method if supported by the Door instance. + + + + + + The Door is in an Unlocked (Permanent Access) state. Alarms related + to door timing operations such as open too long or forced are masked in this mode. + + + + + + The Door is in an Accessed state (momentary/temporary access). + Alarms related to timing operations such as "door forced" are masked in this mode. + + + + + + The Door is in a Blocked state (Door is locked, and AccessDoor + requests are ignored, i.e., it is not possible for door to go to Accessed state). + + + + + + The Door is in a LockedDown state (Door is locked) until released + using the LockDownReleaseDoor command. AccessDoor, LockDoor, UnlockDoor, BlockDoor + and LockOpenDoor requests are ignored, i.e., it is not possible for door to go to + Accessed, Locked, Unlocked, Blocked or LockedOpen state. + + + + + + The Door is in a LockedOpen state (Door is unlocked) until released + using the LockOpenReleaseDoor command. AccessDoor, LockDoor, UnlockDoor, BlockDoor + and LockDownDoor requests are ignored, i.e., it is not possible for door to go to + Accessed, Locked, Unlocked, Blocked or LockedDown state. + + + + + + The Door is in a Double Locked state - for doors with multiple + locks. If the door does not have any DoubleLock, this shall be treated as a normal + Locked mode. When changing to an Unlocked mode from the DoubleLocked mode, the door + may first go to Locked state before unlocking. + + + + + + + + + + Extension for the AccessDoor command. + + + + + + + + + + + + + + + + + + + + + + The capability response message contains the requested DoorControl + service capabilities using a hierarchical XML capability structure. + + + + + + + + + + + + + Maximum number of entries to return. If not specified, or higher + than what the device supports, the number of items shall be determined by the + device. + + + + + + Start returning entries from this start reference. If not + specified, entries shall start from the beginning of the dataset. + + + + + + + + + + + + + StartReference to use in next call to get the following items. If + absent, no more items to get. + + + + + + List of DoorInfo items. + + + + + + + + + + + + Tokens of DoorInfo items to get. + + + + + + + + + + + + List of DoorInfo items. + + + + + + + + + + + + Token of the Door instance to get the state for. + + + + + + + + + + + + + The state of the door. + + + + + + + + + + + + Token of the Door instance to control. + + + + + Optional - Indicates that the configured extended time should be + used. + + + + + + Optional - overrides AccessTime if specified. + + + + + Optional - overrides OpenTooLongTime if specified (DOTL). + + + + + + Optional - overrides PreAlarmTime if specified. + + + + + Future extension. + + + + + + + + + + + + + + + + + + + Token of the Door instance to control. + + + + + + + + + + + + + + + + + + + Token of the Door instance to control. + + + + + + + + + + + + + + + + + + + Token of the Door instance to control. + + + + + + + + + + + + + + + + + + + Token of the Door instance to control. + + + + + + + + + + + + + + + + + + + Token of the Door instance to control. + + + + + + + + + + + + + + + + + + + Token of the Door instance to control. + + + + + + + + + + + + + + + + + + + Token of the Door instance to control. + + + + + + + + + + + + + + + + + + + Token of the Door instance to control. + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This operation returns the capabilities of the service. + </p><p> + An ONVIF compliant device which provides the Door Control service shall implement this + method. + + + + + + + This operation requests a list of all DoorInfo items provided by the device. + An ONVIF compliant device that provides Door Control service shall implement + this method. + </p><p> + + 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 4.8.3 of Access Control Service Specification for more details. + The number of items returned shall not be greater than Limit parameter. + </p><p> + + + + + + + This operation requests a list of DoorInfo items matching the given tokens. + An ONVIF-compliant device that provides Door Control service shall implement this method. + </p><p> + + The device shall ignore tokens it cannot resolve and may return an empty list + if there are no items matching specified tokens. + If the number of requested items is greater than MaxLimit, a TooManyItems fault shall be + returned. + </p><p> + + + + + + + This operation requests the state of a Door specified by the Token. + </p><p> + A device implementing the Door Control service shall be capable of reporting + the status of a door using a DoorState structure available from the + GetDoorState command. + + + + + + + This operation allows momentarily accessing a Door. + It invokes the functionality typically used when a card holder presents a + card to a card reader at the door and is granted access. + </p><p> + The DoorMode shall change to Accessed state. Please refer to Accessed mode in section + [DoorMode] for more details. + </p><p> + The Door shall remain accessible for the defined time. When the time span + elapses, the DoorMode shall change back to its previous state. + </p><p> + If the request cannot be fulfilled, a Failure fault shall be returned. + </p><p> + Please refer to section [DoorMode] for details about Door Modes restrictions. + </p><p> + A device that signals support for Access capability for a particular Door + instance shall implement this method. A device that signals support for + AccessTimingOverride capability for a particular Door instance shall also + provide optional timing parameters (AccessTime, OpenTooLongTime and + PreAlarmTime) when performing AccessDoor command. + </p><p> + The device shall take the best effort approach for parameters not supported, + it must fallback to preconfigured time or limit the time to the closest + supported time if the specified time is out of range. + + + + + + + This operation allows locking a Door. + The DoorMode shall change to Locked state. + Please refer to Locked mode in section [DoorMode] for more details. + </p><p> + A device that signals support for Lock capability for a particular Door + instance shall implement this method. + </p><p> + If the request cannot be fulfilled, a Failure fault shall be returned. + Please refer to section [DoorMode] for more details about Door Modes restrictions. + + + + + + + This operation allows unlocking a Door. + The DoorMode shall change to Unlocked state. + Please refer to Unlocked mode in section [DoorMode] for more details. + </p><p> + A device that signals support for Unlock capability for a particular Door + instance shall implement this method. + </p><p> + If the request cannot be fulfilled, a Failure fault shall be returned. + Please refer to section [DoorMode] for more details about Door Modes restrictions. + + + + + + + This operation allows blocking a Door and preventing momentary access (AccessDoor command). + The DoorMode shall change to Blocked state. + Please refer to Blocked mode in section [DoorMode] for more details. + </p><p> + A device that signals support for Block capability for a particular Door + instance shall implement this method. + </p><p> + If the request cannot be fulfilled, a Failure fault shall be returned. + Please refer to section [DoorMode] for more details about Door Modes restrictions. + + + + + + + This operation allows locking and preventing other actions until a LockDownRelease command + is invoked. + The DoorMode shall change to LockedDown state. + Please refer to LockedDown mode in section [DoorMode] for more details. + </p><p> + The device shall ignore other door control commands until a LockDownRelease command is + performed. + </p><p> + A device that signals support for LockDown capability for a particular Door + instance shall implement this method. + </p><p> + If a device supports DoubleLock capability for a particular Door instance, + that operation may be engaged as well. + </p><p> + If the request cannot be fulfilled, a Failure fault shall be returned. + Please refer to section [DoorMode] for more details about Door Modes restrictions. + + + + + + + This operation allows releasing the LockedDown state of a Door. + The DoorMode shall change back to its previous/next state. + It is not defined what the previous/next state shall be, but typically - Locked. + </p><p> + This method shall only succeed if the current DoorMode is LockedDown. + + + + + + + This operation allows unlocking a Door and preventing other actions until LockOpenRelease + method is invoked. + The DoorMode shall change to LockedOpen state. + Please refer to LockedOpen mode in section [DoorMode] for more details. + </p><p> + The device shall ignore other door control commands until a LockOpenRelease command is + performed. + </p><p> + A device that signals support for LockOpen capability for a particular Door instance shall + implement this method. + </p><p> + If the request cannot be fulfilled, a Failure fault shall be returned. + Please refer to section [DoorMode] for more details about Door Modes restrictions. + + + + + + + This operation allows releasing the LockedOpen state of a Door. + The DoorMode shall change state from the LockedOpen state back to its previous/next state. + It is not defined what the previous/next state shall be, but typically - Unlocked. + </p><p> + This method shall only succeed if the current DoorMode is LockedOpen. + + + + + + + This operation is used for securely locking a Door. + A call to this method shall change DoorMode state to DoubleLocked. + Please refer to DoubleLocked mode in section [DoorMode] for more details. + </p><p> + A device that signals support for DoubleLock capability for a particular + Door instance shall implement this method. Otherwise this method can be + performed as a standard Lock operation (see [LockDoor command]). + </p><p> + If the door has an extra lock that shall be locked as well. + </p><p> + If the request cannot be fulfilled, a Failure fault shall be returned. + + + + + + + + + Copyright (c) 2010-2013 by ONVIF: Open Network Video Interface Forum. All rights reserved. +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + +
diff --git a/onvif-ws-client/src/main/resources/wsdl/event_2.6.wsdl b/onvif-ws-client/src/main/resources/wsdl/event_2.6.wsdl new file mode 100644 index 0000000..34987fc --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/event_2.6.wsdl @@ -0,0 +1,878 @@ + + + + + + + + + + + + + + + + + + + + + + + The capabilities for the event service is returned in the + Capabilities element. + + + + + + + + + + + + + + Indicates that the WS Subscription policy is supported. + + + + + + Indicates that the WS Pull Point is supported. + + + + + Indicates that the WS Pausable Subscription Manager Interface is + supported. + + + + + + Maximum number of supported notification producers as defined by + WS-BaseNotification. + + + + + + Maximum supported number of notification pull points. + + + + + + Indication if the device supports persistent notification storage. + + + + + + + + + + + + + Optional XPATH expression to select specific topics. + + + + + + Initial termination time. + + + + + Refer to Web + Services Base Notification 1.3 (WS-BaseNotification). + + + + + + + + + + + + + + + + + + Endpoint reference of the subscription to be used for pulling the + messages. + + + + + + Current time of the server for synchronization purposes. + + + + + + Date time when the PullPoint will be shut down without further + pull requests. + + + + + + + + + + + + + + Maximum time to block until this method returns. + + + + + + Upper limit for the number of messages to return at once. A server + implementation may decide to return less messages. + + + + + + + + + + + + + The date and time when the messages have been delivered by the web + server to the client. + + + + + + Date time when the PullPoint will be shut down without further + pull requests. + + + + + + List of messages. This list shall be empty in case of a timeout. + + + + + + + + + + + + Maximum timeout supported by the device. + + + + + Maximum message limit supported by the device. + + + + + + + + + + + + + The date and time to match against stored messages. + + + + + + Reverse the pull direction of PullMessages. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + List of topic namespaces supported. + + + + + True when topicset is fixed for all times. + + + + + Set of topics supported. + + + + + + Defines the XPath expression syntax supported for matching topic expressions. +
+ The following TopicExpressionDialects are mandatory for an ONVIF compliant device + : +
    +
  • http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete
  • +
  • http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet.
  • +
+
+
+
+ + + + Defines the XPath function set supported for message content filtering. +
+ The following MessageContentFilterDialects should be returned if a device supports + the message content filtering: +
    +
  • http://www.onvif.org/ver10/tev/messageContentFilter/ItemFilter.
  • +
+ A device that does not support any MessageContentFilterDialect returns a single + empty url. +
+
+
+ + + + Optional ProducerPropertiesDialects. Refer to Web + Services Base Notification 1.3 (WS-BaseNotification) + for advanced filtering. + + + + + + + The Message Content Description Language allows referencing + of vendor-specific types. In order to ease the integration of such types into a + client application, + the GetEventPropertiesResponse shall list all URI locations to schema files whose + types are + used in the description of notifications, with MessageContentSchemaLocation + elements. +
+ This list shall at least contain the URI of the ONVIF schema file. +
+
+
+ + + + + +
+
+
+ + + + Optional ONVIF defined pull point subscription policies + + + + + + + + The pullpoint should not provide Initialized nor Deleted events for + Properties. + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the capabilities of the event service. The result is returned in a + typed answer. + + + + + + This method returns a PullPointSubscription that can be polled using + PullMessages. + This message contains the same elements as the SubscriptionRequest of the + WS-BaseNotification without the ConsumerReference. +
+ If no Filter is specified the pullpoint notifies all occurring events to the client. +
+ This method is mandatory. +
+ + + + + + + + + + + + + + +
+ + The WS-BaseNotification specification defines a set of OPTIONAL + WS-ResouceProperties. + This specification does not require the implementation of the WS-ResourceProperty interface. + Instead, the subsequent direct interface shall be implemented by an ONVIF compliant device + in order to provide information about the FilterDialects, Schema files and topics supported + by + the device. + + + + +
+ + + + This method pulls one or more messages from a PullPoint. + The device shall provide the following PullMessages command for all SubscriptionManager + endpoints returned by the CreatePullPointSubscription command. This method shall not wait + until + the requested number of messages is available but return as soon as at least one message is + available. +
+ The command shall at least support a Timeout of one minute. In case a device supports + retrieval of less messages + than requested it shall return these without generating a fault. +
+ + + +
+ + + This method readjusts the pull pointer into the past. + A device supporting persistent notification storage shall provide the + following Seek command for all SubscriptionManager endpoints returned by + the CreatePullPointSubscription command. The optional Reverse argument can + be used to reverse the pull direction of the PullMessages command. +
+ The UtcTime argument will be matched against the UtcTime attribute on a + NotificationMessage. +
+ + +
+ + Properties inform a client about property creation, changes and + deletion in a uniform way. When a client wants to synchronize its properties with the + properties of the device, it can request a synchronization point which repeats the current + status of all properties to which a client has subscribed. The PropertyOperation of all + produced notifications is set to “Initialized”. The Synchronization Point is + requested directly from the SubscriptionManager which was returned in either the + SubscriptionResponse or in the CreatePullPointSubscriptionResponse. The property update is + transmitted via the notification transportation of the notification interface. This method + is mandatory. + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/onvif-ws-client/src/main/resources/wsdl/imaging_2.5.wsdl b/onvif-ws-client/src/main/resources/wsdl/imaging_2.5.wsdl new file mode 100644 index 0000000..de32dcf --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/imaging_2.5.wsdl @@ -0,0 +1,442 @@ + + + + + + + + + + + + + + + + + + + + The capabilities for the imaging service is returned in the + Capabilities element. + + + + + + + + + + + + + + Indicates whether or not Image Stabilization feature is supported. + + + + + + + + + + + + + + Reference token to the VideoSource for which the ImagingSettings. + + + + + + + + + + + + + ImagingSettings for the VideoSource that was requested. + + + + + + + + + + + + + + + + + + + + + + + + + + + Reference token to the VideoSource for which the imaging parameter options are + requested. + + + + + + + + + + + + + Valid ranges for the imaging parameters that are categorized as device specific. + + + + + + + + + + + + + + Reference to the VideoSource for the requested move (focus) operation. + + + + + + + Content of the requested move (focus) operation. + + + + + + + + + + + + + + + + + + + Reference token to the VideoSource for the requested move options. + + + + + + + + + + + + + Valid ranges for the focus lens move options. + + + + + + + + + + + + + + Reference token to the VideoSource where the focus movement should be stopped. + + + + + + + + + + + + + + + + + + + + Reference token to the VideoSource where the imaging status should be requested. + + + + + + + + + + + + + Requested imaging status. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the capabilities of the imaging service. The result is returned in + a typed answer. + + + + + + Get the ImagingConfiguration for the requested VideoSource. + + + + + + Set the ImagingConfiguration for the requested VideoSource. + + + + + + This operation gets the valid ranges for the imaging parameters that have + device specific ranges. + This command is mandatory for all device implementing the imaging service. The command + returns all supported parameters and their ranges + such that these can be applied to the SetImagingSettings command. +
+ For read-only parameters which cannot be modified via the SetImagingSettings command only a + single option or identical Min and Max values + is provided. +
+ + +
+ + The Move command moves the focus lens in an absolute, a relative or in a + continuous manner from its current position. + The speed argument is optional for absolute and relative control, but required for + continuous. If no speed argument is used, the default speed is used. + Focus adjustments through this operation will turn off the autofocus. A device with support + for remote focus control should support absolute, + relative or continuous control through the Move operation. The supported MoveOpions are + signalled via the GetMoveOptions command. + At least one focus control capability is required for this operation to be functional. +
+ The move operation contains the following commands: +
+ Absolute + – Requires position parameter and optionally takes a speed argument. A unitless type is used + by default for focus positioning and speed. Optionally, if supported, the position may be + requested in m-1 units. +
+ Relative + – Requires distance parameter and optionally takes a speed argument. Negative distance means + negative direction. + Continuous + – Requires a speed argument. Negative speed argument means negative direction. +
+ + +
+ + Imaging move operation options supported for the Video source. + + + + + + The Stop command stops all ongoing focus movements of the lense. A device + with support for remote focus control as signalled via + the GetMoveOptions supports this command.
The operation will not affect ongoing + autofocus operation. +
+ + +
+ + Via this command the current status of the Move operation can be + requested. Supported for this command is available if the support for the Move operation is + signalled via GetMoveOptions. + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/onvif-ws-client/src/main/resources/wsdl/jax-ws-catalog.xml b/onvif-ws-client/src/main/resources/wsdl/jax-ws-catalog.xml new file mode 100644 index 0000000..4883d08 --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/jax-ws-catalog.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsn/b-2.xsd b/onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsn/b-2.xsd new file mode 100644 index 0000000..3d5527f --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsn/b-2.xsd @@ -0,0 +1,582 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsn/bw-2.wsdl b/onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsn/bw-2.wsdl new file mode 100644 index 0000000..b35e631 --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsn/bw-2.wsdl @@ -0,0 +1,447 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsn/t-1.xsd b/onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsn/t-1.xsd new file mode 100644 index 0000000..2fd7e01 --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsn/t-1.xsd @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TopicPathExpression ::= TopicPath ( '|' TopicPath )* + TopicPath ::= RootTopic ChildTopicExpression* + RootTopic ::= NamespacePrefix? ('//')? (NCName | '*') + NamespacePrefix ::= NCName ':' + ChildTopicExpression ::= '/' '/'? (QName | NCName | '*'| '.') + + + + + + + + + + + + + The pattern allows strings matching the following EBNF: + ConcreteTopicPath ::= RootTopic ChildTopic* + RootTopic ::= QName + ChildTopic ::= '/' (QName | NCName) + + + + + + + + + + + + + The pattern allows strings matching the following EBNF: + RootTopic ::= QName + + + + + + + \ No newline at end of file diff --git a/onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsrf/bf-2.xsd b/onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsrf/bf-2.xsd new file mode 100644 index 0000000..2445c7d --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsrf/bf-2.xsd @@ -0,0 +1,84 @@ + + + + + + + + + + Get access to the xml: attribute groups for xml:lang as declared on 'schema' + and 'documentation' below + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsrf/r-2.xsd b/onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsrf/r-2.xsd new file mode 100644 index 0000000..2b387fc --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsrf/r-2.xsd @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsrf/rw-2.wsdl b/onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsrf/rw-2.wsdl new file mode 100644 index 0000000..e639c55 --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/local/docs.oasis-open.org/wsrf/rw-2.wsdl @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/onvif-ws-client/src/main/resources/wsdl/local/schemas.xmlsoap.org/soap/envelope b/onvif-ws-client/src/main/resources/wsdl/local/schemas.xmlsoap.org/soap/envelope new file mode 100644 index 0000000..2b4a8c0 --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/local/schemas.xmlsoap.org/soap/envelope @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Prose in the spec does not specify that attributes are allowed on the Body element + + + + + + + + + + + + + + + + + + + + '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 + + + + + + + + + + + + + + + Fault reporting structure + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/onvif-ws-client/src/main/resources/wsdl/local/schemas.xmlsoap.org/ws/2004/08/addressing b/onvif-ws-client/src/main/resources/wsdl/local/schemas.xmlsoap.org/ws/2004/08/addressing new file mode 100644 index 0000000..996e1bd --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/local/schemas.xmlsoap.org/ws/2004/08/addressing @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + If "Policy" elements from namespace "http://schemas.xmlsoap.org/ws/2002/12/policy#policy" are used, they must appear first (before any extensibility elements). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/onvif-ws-client/src/main/resources/wsdl/local/schemas.xmlsoap.org/ws/2005/04/discovery/ws-discovery.xsd b/onvif-ws-client/src/main/resources/wsdl/local/schemas.xmlsoap.org/ws/2005/04/discovery/ws-discovery.xsd new file mode 100644 index 0000000..cc94e5d --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/local/schemas.xmlsoap.org/ws/2005/04/discovery/ws-discovery.xsd @@ -0,0 +1,272 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/onvif-ws-client/src/main/resources/wsdl/local/www.onvif.org/ver10/pacs/types.xsd b/onvif-ws-client/src/main/resources/wsdl/local/www.onvif.org/ver10/pacs/types.xsd new file mode 100644 index 0000000..49d2c50 --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/local/www.onvif.org/ver10/pacs/types.xsd @@ -0,0 +1,89 @@ + + + + + + + + + Type used to reference logical and physical entities. + + + + + + + + + + + + General datastructure referenced by a token. + Should be used as extension base. + + + + + + + A service-unique identifier of the item. + + + + + + + + Type used for names of logical and physical entities. + + + + + + + + + + + + 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). + + + + + + + + + \ No newline at end of file diff --git a/onvif-ws-client/src/main/resources/wsdl/local/www.onvif.org/ver10/schema/onvif.xsd b/onvif-ws-client/src/main/resources/wsdl/local/www.onvif.org/ver10/schema/onvif.xsd new file mode 100644 index 0000000..ab1a6a0 --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/local/www.onvif.org/ver10/schema/onvif.xsd @@ -0,0 +1,10136 @@ + + + + + + + + + + + + + + Base class for physical entities like inputs and outputs. + + + + Unique identifier referencing the physical entity. + + + + + + + Unique identifier for a physical or logical resource. + Tokens should be assigned such that they are unique within a device. Tokens must be at least + unique within its class. + Length up to 64 characters. + + + + + + + + + + User readable name. Length up to 64 characters. + + + + + + + + + Rectangle defined by lower left corner position and size. Units are pixel. + + + + + + + + + + + Range of a rectangle. The rectangle itself is defined by lower left corner + position and size. Units are pixel. + + + + + + Range of X-axis. + + + + + Range of Y-axis. + + + + + Range of width. + + + + + Range of height. + + + + + + + + Range of values greater equal Min value and less equal Max value. + + + + + + + + + + + Range of values greater equal Min value and less equal Max value. + + + + + + + + + + + Range of duration greater equal Min duration and less equal Max duration. + + + + + + + + + + + List of values. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Representation of a physical video input. + + + + + + + Frame rate in frames per second. + + + + + Horizontal and vertical resolution + + + + + Optional configuration of the image sensor. + + + + + + + + + + + + + + + Optional configuration of the image sensor. To be used if imaging + service 2.00 is supported. + + + + + + + + + + + + + + + + Representation of a physical audio input. + + + + + + + number of available audio channels. (1: mono, 2: stereo) + + + + + + + + + + + + + + A media profile consists of a set of media configurations. Media profiles are used by a + client + to configure properties of a media stream from an NVT. +
+ An NVT shall provide at least one media profile at boot. An NVT should provide “ready to + use” + profiles for the most common media configurations that the device offers. +
+ A profile consists of a set of interconnected configuration entities. Configurations are + provided + by the NVT and can be either static or created dynamically by the NVT. For example, the + dynamic configurations can be created by the NVT depending on current available encoding + resources. +
+
+ + + + User readable name of the profile. + + + + + Optional configuration of the Video input. + + + + + Optional configuration of the Audio input. + + + + + Optional configuration of the Video encoder. + + + + + Optional configuration of the Audio encoder. + + + + + Optional configuration of the video analytics module and rule engine. + + + + + + Optional configuration of the pan tilt zoom unit. + + + + + Optional configuration of the metadata stream. + + + + + Extensions defined in ONVIF 2.0 + + + + + + Unique identifier of the profile. + + + + + A value of true signals that the profile cannot be deleted. Default is + false. + + + + +
+ + + + + + + Optional configuration of the Audio output. + + + + + Optional configuration of the Audio decoder. + + + + + + + + + + + + + + + + + + + + + + + + + + Base type defining the common properties of a configuration. + + + + + + User readable name. Length up to 64 characters. + + + + + Number of internal references currently using this configuration.
+ This informational parameter is read-only. Deprecated for Media2 Service. +
+
+
+
+ + + Token that uniquely refernces this configuration. Length up to 64 + characters. + + + +
+ + + + + + + + + + Reference to the physical input. + + + + + Rectangle specifying the Video capturing area. The capturing area + shall not be larger than the whole Video source area. + + + + + + + + + + + + + + + + Optional element to configure rotation of captured image. + + + + + + + + + + + + + + + + + + + Parameter to enable/disable Rotation feature. + + + + + Optional parameter to configure how much degree of clockwise rotation of + image for On mode. Omitting this parameter for On mode means 180 degree rotation. + + + + + + + + + + + + + + + + + + + + + + + + + + + Angle of incidence. + + + + + Mapping radius as a consequence of the emergent angle. + + + + + + Optional ray absorption at the given angle due to vignetting. A value of + one means no absorption. + + + + + + + + + + + + Optional horizontal offset of the lens center in normalized coordinates. + + + + + + Optional vertical offset of the lens center in normalized coordinates. + + + + + + + + + + + + + + + + Optional focal length of the optical system. + + + + + + + + + + Supported range for the capturing area. + + + + + List of physical inputs. + + + + + + + + + + + + + Options of parameters for Rotation feature. + + + + + + + + + + + + + + + + + Supported options of Rotate mode parameter. + + + + + List of supported degree value for rotation. + + + + + + + + + + + + + + + + + + + + + + Used video codec, either Jpeg, H.264 or Mpeg4 + + + + + Configured video resolution + + + + + Relative value for the video quantizers and the quality of the + video. A high value within supported quality range means higher quality + + + + + + Optional element to configure rate control related parameters. + + + + + + Optional element to configure Mpeg4 related parameters. + + + + + + Optional element to configure H.264 related parameters. + + + + + + Defines the multicast settings that could be used for video + streaming. + + + + + + The rtsp session timeout for the related video stream + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Number of the columns of the Video image. + + + + + Number of the lines of the Video image. + + + + + + + + + + Maximum output framerate in fps. If an EncodingInterval is provided the + resulting encoded framerate will be reduced by the given factor. + + + + + + Interval at which images are encoded and transmitted. (A value of 1 + means that every frame is encoded, a value of 2 means that every 2nd frame is encoded + ...) + + + + + + the maximum output bitrate in kbps + + + + + + + + + + Determines the interval in which the I-Frames will be coded. An entry of + 1 indicates I-Frames are continuously generated. An entry of 2 indicates that every 2nd + image is an I-Frame, and 3 only every 3rd frame, etc. The frames in between are coded as + P or B Frames. + + + + + + the Mpeg4 profile, either simple profile (SP) or advanced simple profile + (ASP) + + + + + + + + + + + Group of Video frames length. Determines typically the interval in which + the I-Frames will be coded. An entry of 1 indicates I-Frames are continuously generated. + An entry of 2 indicates that every 2nd image is an I-Frame, and 3 only every 3rd frame, + etc. The frames in between are coded as P or B Frames. + + + + + + the H.264 profile, either baseline, main, extended or high + + + + + + + + + + + Range of the quality values. A high value means higher quality. + + + + + + Optional JPEG encoder settings ranges (See also Extension element). + + + + + + Optional MPEG-4 encoder settings ranges (See also Extension element). + + + + + + Optional H.264 encoder settings ranges (See also Extension element). + + + + + + + + + + + + + + Optional JPEG encoder settings ranges. + + + + + Optional MPEG-4 encoder settings ranges. + + + + + Optional H.264 encoder settings ranges. + + + + + + + + + + + + + + + + + List of supported image sizes. + + + + + Supported frame rate in fps (frames per second). + + + + + Supported encoding interval range. The encoding interval corresponds to + the number of frames devided by the encoded frames. An encoding interval value of "1" + means that all frames are encoded. + + + + + + + + + + + + + Supported range of encoded bitrate in kbps. + + + + + + + + + + + + + + List of supported image sizes. + + + + + Supported group of Video frames length. This value typically corresponds + to the I-Frame distance. + + + + + + Supported frame rate in fps (frames per second). + + + + + Supported encoding interval range. The encoding interval corresponds to + the number of frames devided by the encoded frames. An encoding interval value of "1" + means that all frames are encoded. + + + + + + List of supported MPEG-4 profiles. + + + + + + + + + + + + Supported range of encoded bitrate in kbps. + + + + + + + + + + + + + + List of supported image sizes. + + + + + Supported group of Video frames length. This value typically corresponds + to the I-Frame distance. + + + + + + Supported frame rate in fps (frames per second). + + + + + Supported encoding interval range. The encoding interval corresponds to + the number of frames devided by the encoded frames. An encoding interval value of "1" + means that all frames are encoded. + + + + + + List of supported H.264 profiles. + + + + + + + + + + + + Supported range of encoded bitrate in kbps. + + + + + + + + + + + + + + ONVIF prominent MIME type names as referenced by IANA. See also IANA Media Types. + + + + + + + + + + + + + + + + + + + + + + + + + + + + Mime name of the supported audio format. For name definitions see + tt:VideoEncodingMimeNames and IANA Media + Types. + + + + + + Configured video resolution + + + + + Optional element to configure rate control related parameters. + + + + + + Defines the multicast settings that could be used for video + streaming. + + + + + + Relative value for the video quantizers and the quality of the + video. A high value within supported quality range means higher quality + + + + + + + + Group of Video frames length. Determines typically the interval in + which the I-Frames will be coded. An entry of 1 indicates I-Frames are continuously + generated. An entry of 2 indicates that every 2nd image is an I-Frame, and 3 only + every 3rd frame, etc. The frames in between are coded as P or B Frames. + + + + + + The encoder profile as defined in tt:VideoEncodingProfiles. + + + + + + + + + + + + + Number of the columns of the Video image. + + + + + Number of the lines of the Video image. + + + + + + + + + + + + Desired frame rate in fps. The actual rate may be lower due to e.g. + performance limitations. + + + + + + the maximum output bitrate in kbps + + + + + + + Enforce constant bitrate. + + + + + + + + + + Mime name of the supported Video format. For name definitions see + tt:VideoEncodingMimeNames and IANA Media + Types. + + + + + + Range of the quality values. A high value means higher quality. + + + + + + List of supported image sizes. + + + + + Supported range of encoded bitrate in kbps. + + + + + + + Lower and Upper bounds for the supported group of Video frames length. + This value typically corresponds to the I-Frame distance. + + + + + + List of supported target frame rates in fps (frames per second). The list + shall be sorted with highest values first. + + + + + + List of supported encoder profiles as defined in + tt::VideoEncodingProfiles. + + + + + + Signal whether enforcing constant bitrate is supported. + + + + + The minimum guaranteed number of encoder instances using this encoding for + the associated VideoSourceConfiguration. + + + + + + + + + + + + + + + Token of the Audio Source the configuration applies to + + + + + + + + + + + + + + + Tokens of the audio source the configuration can be used for. + + + + + + + + + + + + + + + + + + + + + + + Audio codec used for encoding the audio input (either G.711, G.726 + or AAC) + + + + + + The output bitrate in kbps. + + + + + The output sample rate in kHz. + + + + + Defines the multicast settings that could be used for video + streaming. + + + + + + The rtsp session timeout for the related audio stream + + + + + + + + + + + + + + + + + + + + + + + list of supported AudioEncoderConfigurations + + + + + + + + + + + The enoding used for audio data (either G.711, G.726 or AAC) + + + + + + List of supported bitrates in kbps for the specified Encoding + + + + + + List of supported Sample Rates in kHz for the specified Encoding + + + + + + + + + + + + + ONVIF prominent MIME type names as referenced by IANA. See also IANA Media Types + . + + + + + + + + + + + + + + + + Mime name of the supported audio format. For definitions see + tt:AudioEncodingMimeNames and IANA Media + Types. + + + + + + Optional multicast configuration of the audio stream. + + + + + + The output bitrate in kbps. + + + + + The output sample rate in kHz. + + + + + + + + + + + + + + Mime name of the supported audio format. For definitions see + tt:AudioEncodingMimeNames and IANA Media + Types. + + + + + + List of supported bitrates in kbps for the specified Encoding + + + + + + List of supported Sample Rates in kHz for the specified Encoding + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + optional element to configure which PTZ related data is to include + in the metadata stream + + + + + + Optional element to configure the streaming of events. A client + might be interested in receiving all, + none or some of the events produced by the device: +
    +
  • To get all events: Include the Events element but do not include a filter. +
  • +
  • To get no events: Do not include the Events element.
  • +
  • To get only some events: Include the Events element and include a filter in + the element. +
  • +
+
+
+
+ + + Defines whether the streamed metadata will include metadata from the + analytics engines (video, cell motion, audio etc.) + + + + + + Defines the multicast settings that could be used for video + streaming. + + + + + + The rtsp session timeout for the related audio stream + + + + + + +
+ + + Optional parameter to configure compression type of Metadata payload. + Use values from enumeration MetadataCompressionType. + + + + +
+
+
+ + + + + + + + + + + + True if the metadata stream shall contain the PTZ status (IDLE, MOVING + or UNKNOWN) + + + + + + True if the metadata stream shall contain the PTZ position + + + + + + + + + + Subcription handling in the same way as base notification subscription. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + List of supported metadata compression type. Its options shall be chosen + from tt:MetadataCompressionType. + + + + + + + + + + + + + + + + + + + + + + + + + + True if the device is able to stream pan or tilt status information. + + + + + + True if the device is able to stream zoom status inforamtion. + + + + + + + True if the device is able to stream the pan or tilt position. + + + + + + True if the device is able to stream zoom position information. + + + + + + + + + + + + + + + + + + + Representation of a physical video outputs. + + + + + + + + Resolution of the display in Pixel. + + + + + Refresh rate of the display in Hertz. + + + + + Aspect ratio of the display as physical extent of width divided by + height. + + + + + + + + + + + + + + + + + + + + + + + + + Token of the Video Output the configuration applies to + + + + + + + + + + + + + + + + + + + + + + + + + + If the device is able to decode Jpeg streams this element describes the + supported codecs and configurations + + + + + + If the device is able to decode H.264 streams this element describes the + supported codecs and configurations + + + + + + If the device is able to decode Mpeg4 streams this element describes the + supported codecs and configurations + + + + + + + + + + + + + List of supported H.264 Video Resolutions + + + + + List of supported H264 Profiles (either baseline, main, extended or + high) + + + + + + Supported H.264 bitrate range in kbps + + + + + Supported H.264 framerate range in fps + + + + + + + + + + + + List of supported Jpeg Video Resolutions + + + + + Supported Jpeg bitrate range in kbps + + + + + Supported Jpeg framerate range in fps + + + + + + + + + + + + List of supported Mpeg4 Video Resolutions + + + + + List of supported Mpeg4 Profiles (either SP or ASP) + + + + + Supported Mpeg4 bitrate range in kbps + + + + + Supported Mpeg4 framerate range in fps + + + + + + + + + + + + + + + + + + Representation of a physical audio outputs. + + + + + + + + + + + + + + + + + + + + Token of the phsycial Audio output. + + + + + + An audio channel MAY support different types of audio transmission. While for full + duplex + operation no special handling is required, in half duplex operation the transmission + direction + needs to be switched. + The optional SendPrimacy parameter inside the AudioOutputConfiguration indicates + which + direction is currently active. An NVC can switch between different modes by setting + the + AudioOutputConfiguration. +
+ The following modes for the Send-Primacy are defined: +
    +
  • www.onvif.org/ver20/HalfDuplex/Server + The server is allowed to send audio data to the client. The client shall not + send + audio data via the backchannel to the NVT in this mode. +
  • +
  • www.onvif.org/ver20/HalfDuplex/Client + The client is allowed to send audio data via the backchannel to the server. The + NVT shall not send audio data to the client in this mode. +
  • +
  • www.onvif.org/ver20/HalfDuplex/Auto + It is up to the device how to deal with sending and receiving audio data. +
  • +
+ Acoustic echo cancellation is out of ONVIF scope. +
+
+
+ + + Volume setting of the output. The applicable range is defined via + the option AudioOutputOptions.OutputLevelRange. + + + + +
+ +
+
+
+ + + + + + + + Tokens of the physical Audio outputs (typically one). + + + + + + An audio channel MAY support different types of audio transmission. While for + full duplex + operation no special handling is required, in half duplex operation the transmission + direction + needs to be switched. + The optional SendPrimacy parameter inside the AudioOutputConfiguration indicates which + direction is currently active. An NVC can switch between different modes by setting the + AudioOutputConfiguration. +
+ The following modes for the Send-Primacy are defined: +
    +
  • www.onvif.org/ver20/HalfDuplex/Server + The server is allowed to send audio data to the client. The client shall not send + audio data via the backchannel to the NVT in this mode. +
  • +
  • www.onvif.org/ver20/HalfDuplex/Client + The client is allowed to send audio data via the backchannel to the server. The + NVT shall not send audio data to the client in this mode. +
  • +
  • www.onvif.org/ver20/HalfDuplex/Auto + It is up to the device how to deal with sending and receiving audio data. +
  • +
+ Acoustic echo cancellation is out of ONVIF scope. +
+
+
+ + + Minimum and maximum level range supported for this Output. + + + + +
+ +
+ + + + + + The Audio Decoder Configuration does not contain any that parameter to + configure the + decoding .A decoder shall decode every data it receives (according to its capabilities). + + + + + + + + + + + + + + + + + + + If the device is able to decode AAC encoded audio this section describes + the supported configurations + + + + + + If the device is able to decode G711 encoded audio this section + describes the supported configurations + + + + + + If the device is able to decode G726 encoded audio this section + describes the supported configurations + + + + + + + + + + + + + List of supported bitrates in kbps + + + + + List of supported sample rates in kHz + + + + + + + + + + + + List of supported bitrates in kbps + + + + + List of supported sample rates in kHz + + + + + + + + + + + + List of supported bitrates in kbps + + + + + List of supported sample rates in kHz + + + + + + + + + + + + + + + + + + + + The multicast address (if this address is set to 0 no multicast + streaming is enaled) + + + + + + The RTP mutlicast destination port. A device may support RTCP. In this + case the port value shall be even to allow the corresponding RTCP stream to be mapped to + the next higher (odd) destination port number as defined in the RTSP specification. + + + + + + In case of IPv6 the TTL value is assumed as the hop limit. Note that for + IPV6 and administratively scoped IPv4 multicast the primary use for hop limit / TTL is + to prevent packets from (endlessly) circulating and not limiting scope. In these cases + the address contains the scope. + + + + + + Read only property signalling that streaming is persistant. Use the + methods StartMulticastStreaming and StopMulticastStreaming to switch its state. + + + + + + + + + + + + + Defines if a multicast or unicast stream is requested + + + + + + + + + + + + + + + + + + + + Defines the network protocol for streaming, either UDP=RTP/UDP, + RTSP=RTP/RTSP/TCP or HTTP=RTP/RTSP/HTTP/TCP + + + + + + Optional element to describe further tunnel options. This element is + normally not needed + + + + + + + + + + + + + + + + + + + + Stable Uri to be used for requesting the media stream + + + + + Indicates if the Uri is only valid until the connection is established. + The value shall be set to "false". + + + + + + Indicates if the Uri is invalid after a reboot of the device. The value + shall be set to "false". + + + + + + Duration how long the Uri is valid. This parameter shall be set to PT0S + to indicate that this stream URI is indefinitely valid even if the profile changes + + + + + + + + + + + + + + + + + + + + + + + + + + Indicates if the scope is fixed or configurable. + + + + + Scope item URI. + + + + + + + + + + + + + + + + + + + + + + + + + Indicates whether or not an interface is enabled. + + + + + Network interface information + + + + + Link configuration. + + + + + IPv4 network interface configuration. + + + + + IPv6 network interface configuration. + + + + + + + + + + + + + + + + Extension point prepared for future 802.3 configuration. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Configured link settings. + + + + + Current active link settings. + + + + + Integer indicating interface type, for example: 6 is ethernet. + + + + + + + + + + + Auto negotiation on/off. + + + + + Speed. + + + + + Duplex type, Half or Full. + + + + + + + + + + + + + + + + + For valid numbers, please refer to http://www.iana.org/assignments/ianaiftype-mib. + + + + + + + + + + Network interface name, for example eth0. + + + + + Network interface MAC address. + + + + + Maximum transmission unit. + + + + + + + + + + Indicates whether or not IPv6 is enabled. + + + + + IPv6 configuration. + + + + + + + + + + Indicates whether or not IPv4 is enabled. + + + + + IPv4 configuration. + + + + + + + + + + List of manually added IPv4 addresses. + + + + + Link local address. + + + + + IPv4 address configured by using DHCP. + + + + + Indicates whether or not DHCP is used. + + + + + + + + + + + + Indicates whether router advertisment is used. + + + + + DHCP configuration. + + + + + List of manually entered IPv6 addresses. + + + + + List of link local IPv6 addresses. + + + + + List of IPv6 addresses configured by using DHCP. + + + + + List of IPv6 addresses configured by using router advertisment. + + + + + + + + + + + + + + + + + + + + + + + + + + + + Network protocol type string. + + + + + Indicates if the protocol is enabled or not. + + + + + The port that is used by the protocol. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Network host type: IPv4, IPv6 or DNS. + + + + + IPv4 address. + + + + + IPv6 address. + + + + + DNS name. + + + + + + + + + + + + + + + + + + Indicates if the address is an IPv4 or IPv6 address. + + + + + IPv4 address. + + + + + IPv6 address + + + + + + + + + + IPv4 address + + + + + Prefix/submask length + + + + + + + + + + + + + + IPv6 address + + + + + Prefix/submask length + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Indicates whether the hostname is obtained from DHCP or not. + + + + + + Indicates the hostname. + + + + + + + + + + + + + + + + + + Indicates whether or not DNS information is retrieved from DHCP. + + + + + + Search domain. + + + + + List of DNS addresses received from DHCP. + + + + + List of manually entered DNS addresses. + + + + + + + + + + + + + + + + + + Indicates if NTP information is to be retrieved by using DHCP. + + + + + + List of NTP addresses retrieved by using DHCP. + + + + + List of manually entered NTP addresses. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Dynamic DNS type. + + + + + DNS name. + + + + + Time to live. + + + + + + + + + + + + + + + + + + + + + + + + + + Indicates whether or not an interface is enabled. + + + + + Link configuration. + + + + + Maximum transmission unit. + + + + + IPv4 network interface configuration. + + + + + IPv6 network interface configuration. + + + + + + + + + + + + + + + + + + + + + Indicates whether or not IPv6 is enabled. + + + + + Indicates whether router advertisment is used. + + + + + List of manually added IPv6 addresses. + + + + + DHCP configuration. + + + + + + + + + + Indicates whether or not IPv4 is enabled. + + + + + List of manually added IPv4 addresses. + + + + + Indicates whether or not DHCP is used. + + + + + + + + + + IPv4 address string. + + + + + IPv6 address string. + + + + + + + + + + Unique identifier of network interface. + + + + + Indicates whether the zero-configuration is enabled or not. + + + + + + The zero-configuration IPv4 address(es) + + + + + + + + + + + + + Optional array holding the configuration for the second and possibly + further interfaces. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + According to IEEE802.11-2007 H.4.1 the RSNA PSK consists of 256 bits, or 64 octets when + represented in hex +
+ Either Key or Passphrase shall be given, if both are supplied Key shall be used by the + device and Passphrase ignored. +
+
+
+ + + + According to IEEE802.11-2007 H.4.1 a pass-phrase is a sequence of between 8 and 63 + ASCII-encoded characters and + each character in the pass-phrase must have an encoding in the range of 32 to 126 + (decimal),inclusive. +
+ If only Passpharse is supplied the Key shall be derived using the algorithm described in + IEEE802.11-2007 section H.4 +
+
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See IEEE802.11 7.3.2.25.2 for details. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Analytics capabilities + + + + + Device capabilities + + + + + Event capabilities + + + + + Imaging capabilities + + + + + Media capabilities + + + + + PTZ capabilities + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Analytics service URI. + + + + + Indicates whether or not rules are supported. + + + + + Indicates whether or not modules are supported. + + + + + + + + + + + + Device service URI. + + + + + Network capabilities. + + + + + System capabilities. + + + + + I/O capabilities. + + + + + Security capabilities. + + + + + + + + + + + + + + + + + + Event service URI. + + + + + Indicates whether or not WS Subscription policy is supported. + + + + + + Indicates whether or not WS Pull Point is supported. + + + + + Indicates whether or not WS Pausable Subscription Manager Interface is + supported. + + + + + + + + + + + + + Number of input connectors. + + + + + Number of relay outputs. + + + + + + + + + + + + + + + + + + + + + + + + + + + + Media service URI. + + + + + Streaming capabilities. + + + + + + + + + + + + + + + + + + + + + Indicates whether or not RTP multicast is supported. + + + + + Indicates whether or not RTP over TCP is supported. + + + + + Indicates whether or not RTP/RTSP/TCP is supported. + + + + + + + + + + + + + + + + + + Maximum number of profiles. + + + + + + + + + + + + Indicates whether or not IP filtering is supported. + + + + + Indicates whether or not zeroconf is supported. + + + + + Indicates whether or not IPv6 is supported. + + + + + Indicates whether or not is supported. + + + + + + + + + + + + + + + + + + + + + + + + + + Indicates whether or not TLS 1.1 is supported. + + + + + Indicates whether or not TLS 1.2 is supported. + + + + + Indicates whether or not onboard key generation is supported. + + + + + + Indicates whether or not access policy configuration is supported. + + + + + + Indicates whether or not WS-Security X.509 token is supported. + + + + + + Indicates whether or not WS-Security SAML token is supported. + + + + + + Indicates whether or not WS-Security Kerberos token is supported. + + + + + + Indicates whether or not WS-Security REL token is supported. + + + + + + + + + + + + + + + + + + + + + + EAP Methods supported by the device. The int values refer to the IANA EAP + Registry. + + + + + + + + + + + + + Indicates whether or not WS Discovery resolve requests are supported. + + + + + + Indicates whether or not WS-Discovery Bye is supported. + + + + + + Indicates whether or not remote discovery is supported. + + + + + + Indicates whether or not system backup is supported. + + + + + Indicates whether or not system logging is supported. + + + + + Indicates whether or not firmware upgrade is supported. + + + + + + Indicates supported ONVIF version(s). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Major version number. + + + + + Two digit minor version number (e.g. X.0.1 maps to "01" and X.2.1 maps + to "21" where X stands for Major version number). + + + + + + + + + + + Imaging service URI. + + + + + + + + + + + PTZ service URI. + + + + + + + + + + + + + + + + + + + + + + + + + + Indication that the SetLayout command supports only predefined + layouts. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The address of the replay service. + + + + + + + + + + + + The address of the receiver service. + + + + + Indicates whether the device can receive RTP multicast streams. + + + + + + Indicates whether the device can receive RTP/TCP streams + + + + + + Indicates whether the device can receive RTP/RTSP/TCP streams. + + + + + + The maximum number of receivers supported by the device. + + + + + + The maximum allowed length for RTSP URIs. + + + + + + + + + + + + + Obsolete property. + + + + + + + + + + + + + + + + + + + + + + + Enumeration describing the available system log modes. + + + + + Indicates that a system log is requested. + + + + + Indicates that a access log is requested. + + + + + + + + + + The log information as attachment data. + + + + + The log information as character data. + + + + + + + + + + The support information as attachment data. + + + + + The support information as character data. + + + + + + + + + + base64 encoded binary data. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Enumeration describing the available factory default modes. + + + + + + Indicates that a hard factory default is requested. + + + + + Indicates that a soft factory default is requested. + + + + + + + + + + Indicates that the date and time are set manually. + + + + + Indicates that the date and time are set through NTP + + + + + + + + General date time inforamtion returned by the GetSystemDateTime method. + + + + + + Indicates if the time is set manully or through NTP. + + + + + Informative indicator whether daylight savings is currently on/off. + + + + + + Timezone information in Posix format. + + + + + Current system date and time in UTC format. This field is mandatory + since version 2.0. + + + + + + Date and time in local format. + + + + + + + + + + + + + + + + + + + + + + + + + + Range is 1 to 12. + + + + + Range is 1 to 31. + + + + + + + + + + Range is 0 to 23. + + + + + Range is 0 to 59. + + + + + Range is 0 to 61 (typically 59). + + + + + + + + + The TZ format is specified by POSIX, please refer to POSIX 1003.1 section 8.3 +
+ Example: Europe, Paris TZ=CET-1CEST,M3.5.0/2,M10.5.0/3 +
+ CET = designation for standard time when daylight saving is not in force +
+ -1 = offset in hours = negative so 1 hour east of Greenwich meridian +
+ CEST = designation when daylight saving is in force ("Central European Summer Time") +
+ , = no offset number between code and comma, so default to one hour ahead for daylight + saving +
+ M3.5.0 = when daylight saving starts = the last Sunday in March (the "5th" week means the + last in the month) +
+ /2, = the local time when the switch occurs = 2 a.m. in this case +
+ M10.5.0 = when daylight saving ends = the last Sunday in October. +
+ /3, = the local time when the switch occurs = 3 a.m. in this case +
+
+
+ + + + Posix timezone string. + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Username string. + + + + + Password string. + + + + + User level string. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Certificate id. + + + + + base64 encoded DER representation of certificate. + + + + + + + + + + Certificate id. + + + + + Indicates whether or not a certificate is used in a HTTPS + configuration. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Validity Range is from "NotBefore" to "NotAfter"; the corresponding + DateTimeRange is from "From" to "Until" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + EAP Method type as defined in IANA EAP + Registry. + + + + + + + + + + + + + + + + + + + + + Confgiuration information for TLS Method. + + + + + Password for those EAP Methods that require a password. The password + shall never be returned on a get method. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 'Bistable' or 'Monostable' +
    +
  • Bistable – After setting the state, the relay remains in this state.
  • +
  • Monostable – After setting the state, the relay returns to its idle state after + the specified time. +
  • +
+
+
+
+ + + Time after which the relay returns to its idle state if it is in + monostable mode. If the Mode field is set to bistable mode the value of the parameter + can be ignored. + + + + + + + 'open' or 'closed' +
    +
  • 'open' means that the relay is open when the relay state is set to 'inactive' + through the trigger command and closed when the state is set to 'active' through the + same command. +
  • +
  • 'closed' means that the relay is closed when the relay state is set to 'inactive' + through the trigger command and open when the state is set to 'active' through the + same command. +
  • +
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Indicate the Digital IdleState status. + + + + + + + + + + + + + + + + + + + + + + + A unique identifier that is used to reference PTZ Nodes. + + + + + + + A list of Coordinate Systems available for the PTZ Node. For each Coordinate System, + the PTZ Node MUST specify its allowed range. + + + + + + + All preset operations MUST be available for this PTZ Node if one preset is + supported. + + + + + + + A boolean operator specifying the availability of a home position. If set to true, + the Home Position Operations MUST be available for this PTZ Node. + + + + + + + A list of supported Auxiliary commands. If the list is not empty, the Auxiliary + Operations MUST be available for this PTZ Node. + + + + + + + + + Indication whether the HomePosition of a Node is fixed or it can be changed via the + SetHomePosition command. + + + + + + + + + + + + + + + Detail of supported Preset Tour feature. + + + + + + + + + + + + + + + + + + Indicates number of preset tours that can be created. Required preset + tour operations shall be available for this PTZ Node if one or more preset tour is + supported. + + + + + + Indicates which preset tour operations are available for this PTZ + Node. + + + + + + + + + + + + + + + + + + + + + + A mandatory reference to the PTZ Node that the PTZ Configuration belongs to. + + + + + + + If the PTZ Node supports absolute Pan/Tilt movements, it shall specify one Absolute + Pan/Tilt Position Space as default. + + + + + + + If the PTZ Node supports absolute zoom movements, it shall specify one Absolute Zoom + Position Space as default. + + + + + + + If the PTZ Node supports relative Pan/Tilt movements, it shall specify one + RelativePan/Tilt Translation Space as default. + + + + + + + If the PTZ Node supports relative zoom movements, it shall specify one Relative Zoom + Translation Space as default. + + + + + + + If the PTZ Node supports continuous Pan/Tilt movements, it shall specify one + Continuous Pan/Tilt Velocity Space as default. + + + + + + + If the PTZ Node supports continuous zoom movements, it shall specify one Continuous + Zoom Velocity Space as default. + + + + + + + If the PTZ Node supports absolute or relative PTZ movements, it shall specify + corresponding default Pan/Tilt and Zoom speeds. + + + + + + + If the PTZ Node supports continuous movements, it shall specify a default timeout, + after which the movement stops. + + + + + + + The Pan/Tilt limits element should be present for a PTZ Node that supports an + absolute Pan/Tilt. If the element is present it signals the support for configurable + Pan/Tilt limits. If limits are enabled, the Pan/Tilt movements shall always stay + within the specified range. The Pan/Tilt limits are disabled by setting the limits + to –INF or +INF. + + + + + + + The Zoom limits element should be present for a PTZ Node that supports absolute + zoom. If the element is present it signals the supports for configurable Zoom + limits. If limits are enabled the zoom movements shall always stay within the + specified range. The Zoom limits are disabled by settings the limits to -INF and + +INF. + + + + + + + + + + + + + The optional acceleration ramp used by the device when moving. + + + + + + The optional acceleration ramp used by the device when recalling + presets. + + + + + + The optional acceleration ramp used by the device when executing + PresetTours. + + + + + + + + + + + + + + Optional element to configure PT Control Direction related features. + + + + + + + + + + + + + + + + + + Optional element to configure related parameters for E-Flip. + + + + + + Optional element to configure related parameters for reversing of PT + Control Direction. + + + + + + + + + + + + + + + + + + + + Parameter to enable/disable E-Flip feature. + + + + + + + + + + + + Parameter to enable/disable Reverse feature. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A list of supported coordinate systems including their range limitations. + + + + + + + A timeout Range within which Timeouts are accepted by the PTZ Node. + + + + + + + Supported options for PT Direction Control. + + + + + + + + The list of acceleration ramps supported by the device. The + smallest acceleration value corresponds to the minimal index, the + highest acceleration corresponds to the maximum index. + + + + + + + + + + + + + + + + + Supported options for EFlip feature. + + + + + Supported options for Reverse feature. + + + + + + + + + + + + + + + + + + Options of EFlip mode parameter. + + + + + + + + + + + + + + + + + + Options of Reverse mode parameter. + + + + + + + + + + + + + + + + + + + A range of pan tilt limits. + + + + + + + + + + + + A range of zoom limit + + + + + + + + + + + + The Generic Pan/Tilt Position space is provided by every PTZ node that supports absolute + Pan/Tilt, since it does not relate to a specific physical range. + Instead, the range should be defined as the full range of the PTZ unit normalized to the + range -1 to 1 resulting in the following space description. + + + + + + + The Generic Zoom Position Space is provided by every PTZ node that supports absolute + Zoom, since it does not relate to a specific physical range. + Instead, the range should be defined as the full range of the Zoom normalized to the + range 0 (wide) to 1 (tele). + There is no assumption about how the generic zoom range is mapped to magnification, FOV + or other physical zoom dimension. + + + + + + + The Generic Pan/Tilt translation space is provided by every PTZ node that supports + relative Pan/Tilt, since it does not relate to a specific physical range. + Instead, the range should be defined as the full positive and negative translation range + of the PTZ unit normalized to the range -1 to 1, + where positive translation would mean clockwise rotation or movement in right/up + direction resulting in the following space description. + + + + + + + The Generic Zoom Translation Space is provided by every PTZ node that supports relative + Zoom, since it does not relate to a specific physical range. + Instead, the corresponding absolute range should be defined as the full positive and + negative translation range of the Zoom normalized to the range -1 to1, + where a positive translation maps to a movement in TELE direction. The translation is + signed to indicate direction (negative is to wide, positive is to tele). + There is no assumption about how the generic zoom range is mapped to magnification, FOV + or other physical zoom dimension. This results in the following space description. + + + + + + + The generic Pan/Tilt velocity space shall be provided by every PTZ node, since it does + not relate to a specific physical range. + Instead, the range should be defined as a range of the PTZ unit’s speed normalized to + the range -1 to 1, where a positive velocity would map to clockwise + rotation or movement in the right/up direction. A signed speed can be independently + specified for the pan and tilt component resulting in the following space description. + + + + + + + The generic zoom velocity space specifies a zoom factor velocity without knowing the + underlying physical model. The range should be normalized from -1 to 1, + where a positive velocity would map to TELE direction. A generic zoom velocity space + description resembles the following. + + + + + + + The speed space specifies the speed for a Pan/Tilt movement when moving to an absolute + position or to a relative translation. + In contrast to the velocity spaces, speed spaces do not contain any directional + information. The speed of a combined Pan/Tilt + movement is represented by a single non-negative scalar value. + + + + + + + The speed space specifies the speed for a Zoom movement when moving to an absolute + position or to a relative translation. + In contrast to the velocity spaces, speed spaces do not contain any directional + information. + + + + + + + + + + + + + + + + + + + + A URI of coordinate systems. + + + + + + + A range of x-axis. + + + + + + + A range of y-axis. + + + + + + + + + + + + A URI of coordinate systems. + + + + + + + A range of x-axis. + + + + + + + + + + + + + Pan/tilt coordinate space selector. The following options are defined: +
    +
  • http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace
  • +
  • http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace
  • +
  • http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace
  • +
  • http://www.onvif.org/ver10/tptz/PanTiltSpaces/GenericSpeedSpace
  • +
+
+
+
+
+ + + + + + + Pan/tilt coordinate space selector. The following options are defined: +
    +
  • http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace
  • +
  • http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace
  • +
  • http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace
  • +
  • http://www.onvif.org/ver10/tptz/PanTiltSpaces/GenericSpeedSpace
  • +
+
+
+
+
+ + + + + + Pan and tilt position. The x component corresponds to pan and the y + component to tilt. + + + + + + + A zoom position. + + + + + + + + + + + Pan and tilt speed. The x component corresponds to pan and the y + component to tilt. If omitted in a request, the current (if any) PanTilt movement should + not be affected. + + + + + + + A zoom speed. If omitted in a request, the current (if any) Zoom movement should not be + affected. + + + + + + + + + + + + Specifies the absolute position of the PTZ unit together with the Space references. The + default absolute spaces of the corresponding PTZ configuration MUST be referenced within + the Position element. + + + + + + + Indicates if the Pan/Tilt/Zoom device unit is currently moving, idle or in an unknown + state. + + + + + + + States a current PTZ error. + + + + + + + Specifies the UTC time when this status was generated. + + + + + + + + + + + + + + A list of preset position name. + + + + + + + A list of preset position. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Readable name of the preset tour. + + + + + Read only parameters to indicate the status of the preset tour. + + + + + + Auto Start flag of the preset tour. True allows the preset tour to be + activated always. + + + + + + Parameters to specify the detail behavior of the preset tour. + + + + + + A list of detail of touring spots including preset positions. + + + + + + + + Unique identifier of this preset tour. + + + + + + + + + + + + + + + + Detail definition of preset position of the tour spot. + + + + + + Optional parameter to specify Pan/Tilt and Zoom speed on moving toward + this tour spot. + + + + + + Optional parameter to specify time duration of staying on this tour + sport. + + + + + + + + + + + + + + + + + + + + Option to specify the preset position with Preset Token defined in + advance. + + + + + + Option to specify the preset position with the home position of this + PTZ Node. "False" to this parameter shall be treated as an invalid argument. + + + + + + Option to specify the preset position with vector of PTZ node + directly. + + + + + + + + + + + + + + + + + + + + + Indicates state of this preset tour by Idle/Touring/Paused. + + + + + + Indicates a tour spot currently staying. + + + + + + + + + + + + + + + + + + Optional parameter to specify how many times the preset tour is + recurred. + + + + + + Optional parameter to specify how long time duration the preset tour is + recurred. + + + + + + Optional parameter to choose which direction the preset tour goes. + Forward shall be chosen in case it is omitted. + + + + + + + + Execute presets in random order. If set to true and Direction is also + present, Direction will be ignored and presets of the Tour will be recalled randomly. + + + + + + + + + + + + + + + + + Indicates whether or not the AutoStart is supported. + + + + + Supported options for Preset Tour Starting Condition. + + + + + Supported options for Preset Tour Spot. + + + + + + + + + + + + Supported options for detail definition of preset position of the tour + spot. + + + + + + Supported range of stay time for a tour spot. + + + + + + + + + + + + A list of available Preset Tokens for tour spots. + + + + + An option to indicate Home postion for tour spots. + + + + + Supported range of Pan and Tilt for tour spots. + + + + + Supported range of Zoom for a tour spot. + + + + + + + + + + + + + + + + + + Supported range of Recurring Time. + + + + + Supported range of Recurring Duration. + + + + + Supported options for Direction of Preset Tour. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Status of focus position. + + + + + + + Status of focus MoveStatus. + + + + + + + Error status of focus. + + + + + + + + + + + + + + + Parameter to set autofocus near limit (unit: meter). + + + + + Parameter to set autofocus far limit (unit: meter). + If set to 0.0, infinity will be used. + + + + + + + + + + + + + + + + + + + + Enabled/disabled BLC mode (on/off). + + + + + Image brightness (unit unspecified). + + + + + Color saturation of the image (unit unspecified). + + + + + Contrast of the image (unit unspecified). + + + + + Exposure mode of the device. + + + + + Focus configuration. + + + + + Infrared Cutoff Filter settings. + + + + + Sharpness of the Video image. + + + + + WDR settings. + + + + + White balance settings. + + + + + + + + + + + + + + + + + + + Exposure Mode +
    +
  • Auto – Enabled the exposure algorithm on the NVT.
  • +
  • Manual – Disabled exposure algorithm on the NVT.
  • +
+
+
+
+ + + + The exposure priority mode (low noise/framerate). + + + + + + + Rectangular exposure mask. + + + + + + + Minimum value of exposure time range allowed to be used by the algorithm. + + + + + + + Maximum value of exposure time range allowed to be used by the algorithm. + + + + + + + Minimum value of the sensor gain range that is allowed to be used by the algorithm. + + + + + + + Maximum value of the sensor gain range that is allowed to be used by the algorithm. + + + + + + + Minimum value of the iris range allowed to be used by the algorithm. + + + + + + + Maximum value of the iris range allowed to be used by the algorithm. + + + + + + + The fixed exposure time used by the image sensor (μs). + + + + + + + The fixed gain used by the image sensor (dB). + + + + + + + The fixed attenuation of input light affected by the iris (dB). 0dB maps to a fully + opened iris. + + + +
+
+ + + + + + + + + + + + + + White dynamic range (on/off) + + + + + + + Optional level parameter (unitless) + + + + + + + + + Enumeration describing the available backlight compenstation modes. + + + + + + Backlight compensation is disabled. + + + + + Backlight compensation is enabled. + + + + + + + + + + Backlight compensation mode (on/off). + + + + + Optional level parameter (unit unspecified). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Parameters for the absolute focus control. + + + + + + + Parameters for the relative focus control. + + + + + + + Parameter for the continuous focus control. + + + + + + + + + + + + Position parameter for the absolute focus control. + + + + + + + Speed parameter for the absolute focus control. + + + + + + + + + + + + Distance parameter for the relative focus control. + + + + + + + Speed parameter for the relative focus control. + + + + + + + + + + + + Speed parameter for the Continuous focus control. + + + + + + + + + + + + + + + + + + + + Valid ranges of the position. + + + + + + + Valid ranges of the speed. + + + + + + + + + + + + Valid ranges of the distance. + + + + + + + Valid ranges of the speed. + + + + + + + + + + + + Valid ranges of the speed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Auto whitebalancing mode (auto/manual). + + + + + Rgain (unitless). + + + + + Bgain (unitless). + + + + + + + + + + + + + + + + + + Status of focus. + + + + + + + + + + + + + + + + + + + + Status of focus position. + + + + + + + Status of focus MoveStatus. + + + + + + + Error status of focus. + + + + + + + + + + + + + + + + + Type describing the ImagingSettings of a VideoSource. The supported options + and ranges can be obtained via the GetOptions command. + + + + + + Enabled/disabled BLC mode (on/off). + + + + + Image brightness (unit unspecified). + + + + + Color saturation of the image (unit unspecified). + + + + + Contrast of the image (unit unspecified). + + + + + Exposure mode of the device. + + + + + Focus configuration. + + + + + Infrared Cutoff Filter settings. + + + + + Sharpness of the Video image. + + + + + WDR settings. + + + + + White balance settings. + + + + + + + + + + + + + Optional element to configure Image Stabilization feature. + + + + + + + + + + + + An optional parameter applied to only auto mode to adjust timing of + toggling Ir cut filter. + + + + + + + + + + + + Optional element to configure Image Contrast Compensation. + + + + + + Optional element to configure Image Defogging. + + + + + Optional element to configure Image Noise Reduction. + + + + + + + + + + + + + + + + + Parameter to enable/disable Image Stabilization feature. + + + + + + Optional level parameter (unit unspecified) + + + + + + + + + + + + + + + + + + + + + + + + + + + Specifies which boundaries to automatically toggle Ir cut filter + following parameters are applied to. Its options shall be chosen from + tt:IrCutFilterAutoBoundaryType. + + + + + + Adjusts boundary exposure level for toggling Ir cut filter to on/off + specified with unitless normalized value from +1.0 to -1.0. Zero is default and -1.0 is + the darkest adjustment (Unitless). + + + + + + Delay time of toggling Ir cut filter to on/off after crossing of the + boundary exposure levels. + + + + + + + + + + + + + + + + + + + + + + + + + + Type describing whether WDR mode is enabled or disabled (on/off). + + + + + + Wide dynamic range mode (on/off). + + + + + Optional level parameter (unit unspecified). + + + + + + + + Type describing whether BLC mode is enabled or disabled (on/off). + + + + + + Backlight compensation mode (on/off). + + + + + Optional level parameter (unit unspecified). + + + + + + + + Type describing the exposure settings. + + + + + + Exposure Mode +
    +
  • Auto – Enabled the exposure algorithm on the device.
  • +
  • Manual – Disabled exposure algorithm on the device.
  • +
+
+
+
+ + + + The exposure priority mode (low noise/framerate). + + + + + + + Rectangular exposure mask. + + + + + + + Minimum value of exposure time range allowed to be used by the algorithm. + + + + + + + Maximum value of exposure time range allowed to be used by the algorithm. + + + + + + + Minimum value of the sensor gain range that is allowed to be used by the algorithm. + + + + + + + Maximum value of the sensor gain range that is allowed to be used by the algorithm. + + + + + + + Minimum value of the iris range allowed to be used by the algorithm. + + + + + + + Maximum value of the iris range allowed to be used by the algorithm. + + + + + + + The fixed exposure time used by the image sensor (μs). + + + + + + + The fixed gain used by the image sensor (dB). + + + + + + + The fixed attenuation of input light affected by the iris (dB). 0dB maps to a fully + opened iris. + + + +
+
+ + + + + + Parameter to enable/disable or automatic ToneCompensation feature. + + + + + + Optional level parameter specified with unitless normalized value from + 0.0 to +1.0. + + + + + + + + + + + + + + + + + + + + + + + + + + + Parameter to enable/disable or automatic Defogging feature. + + + + + + Optional level parameter specified with unitless normalized value from + 0.0 to +1.0. + + + + + + + + + + + + + + + + + + + + + + + + + + + Level parameter specified with unitless normalized value from 0.0 to + +1.0. Level=0 means no noise reduction or minimal noise reduction. + + + + + + + + + + + + + + Valid range of Backlight Compensation. + + + + + + + Valid range of Brightness. + + + + + + + Valid range of Color Saturation. + + + + + + + Valid range of Contrast. + + + + + + + Valid range of Exposure. + + + + + + + Valid range of Focus. + + + + + + + Valid range of IrCutFilterModes. + + + + + + + Valid range of Sharpness. + + + + + + + Valid range of WideDynamicRange. + + + + + + + Valid range of WhiteBalance. + + + + + + + + + + + + + + Options of parameters for Image Stabilization feature. + + + + + + + + + + + + Options of parameters for adjustment of Ir cut filter auto mode. + + + + + + + + + + + + Options of parameters for Tone Compensation feature. + + + + + Options of parameters for Defogging feature. + + + + + Options of parameter for Noise Reduction feature. + + + + + + + + + + + + + + + + + Supported options of Image Stabilization mode parameter. + + + + + + Valid range of the Image Stabilization. + + + + + + + + + + + + + + + + + + Supported options of boundary types for adjustment of Ir cut filter auto + mode. The opptions shall be chosen from tt:IrCutFilterAutoBoundaryType. + + + + + + Indicates whether or not boundary offset for toggling Ir cut filter is + supported. + + + + + + Supported range of delay time for toggling Ir cut filter. + + + + + + + + + + + + + + + + + + + + + + + + + + + 'ON' or 'OFF' + + + + + + + Level range of BacklightCompensation. + + + + + + + + + + + + Exposure Mode +
    +
  • Auto – Enabled the exposure algorithm on the device.
  • +
  • Manual – Disabled exposure algorithm on the device.
  • +
+
+
+
+ + + + The exposure priority mode (low noise/framerate). + + + + + + + Valid range of the Minimum ExposureTime. + + + + + + + Valid range of the Maximum ExposureTime. + + + + + + + Valid range of the Minimum Gain. + + + + + + + Valid range of the Maximum Gain. + + + + + + + Valid range of the Minimum Iris. + + + + + + + Valid range of the Maximum Iris. + + + + + + + Valid range of the ExposureTime. + + + + + + + Valid range of the Gain. + + + + + + + Valid range of the Iris. + + + +
+
+ + + + + + + Valid ranges for the absolute control. + + + + + + + Valid ranges for the relative control. + + + + + + + Valid ranges for the continuous control. + + + + + + + + + + + + Valid ranges of the distance. + + + + + + + Valid ranges of the speed. + + + + + + + + + + + + 'AUTO' or 'MANUAL' + + + + + + + Rgain (unitless). + + + + + + + Bgain (unitless). + + + + + + + + + + + + + + + + + + + + Mode of auto focus. +
    +
  • AUTO - The device automatically adjusts focus.
  • +
  • MANUAL - The device does not automatically adjust focus.
  • +
+ Note: for devices supporting both manual and auto operation at the same time manual + operation may be supported even if the Mode parameter is set to Auto. +
+
+
+ + + + Parameter to set autofocus near limit (unit: meter). + + + + + Parameter to set autofocus far limit (unit: meter). + + + +
+ +
+ + + + + + + + + + + + + Mode of WhiteBalance. +
    +
  • AUTO
  • +
  • MANUAL
  • +
+
+
+
+ + + +
+
+ + + + + + + + + + + + + Supported mode for auto focus. +
    +
  • AUTO - The device supports automatic focus adjustment.
  • +
  • MANUAL - The device supports manual focus adjustment.
  • +
+
+
+
+ + + + Valid range of DefaultSpeed. + + + + + + + Valid range of NearLimit. + + + + + + + Valid range of FarLimit. + + + + +
+
+ + + + + + + + + + + + Supported options for Tone Compensation mode. Its options shall be + chosen from tt:ToneCompensationMode Type. + + + + + + Indicates whether or not support Level parameter for Tone + Compensation. + + + + + + + + + + + + + Supported options for Defogging mode. Its options shall be chosen from + tt:DefoggingMode Type. + + + + + + Indicates whether or not support Level parameter for Defogging. + + + + + + + + + + + + + Indicates whether or not support Level parameter for NoiseReduction. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Token value pairs that triggered this message. Typically only one item + is present. + + + + + + + + + + + + + + + + + + + + + + + List of parameters according to the corresponding ItemListDescription. + Each item in the list shall have a unique name. + + + + + + Value name pair as defined by the corresponding description. + + + + + + Item name. + + + + + Item value. The type is defined in the corresponding description. + + + + + + + + Complex value structure. + + + + + + XML tree contiaing the element value as defined in the + corresponding description. + + + + + + + Item name. + + + + + + + + + + + + + + + + + + + + + + Set of tokens producing this message. The list may only contain + SimpleItemDescription items. + The set of tokens identify the component within the WS-Endpoint, which is responsible + for the producing the message. +
+ For analytics events the token set shall include the VideoSourceConfigurationToken, the + VideoAnalyticsConfigurationToken + and the name of the analytics module or rule. +
+
+
+ + + Describes optional message payload parameters that may be used as key. + E.g. object IDs of tracked objects are conveyed as key. + + + + + + Describes the payload of the message. + + + +
+ + + Must be set to true when the described Message relates to a property. An + alternative term of "property" is a "state" in contrast to a pure event, which contains + relevant information for only a single point in time.
Default is false. +
+
+
+ +
+ + + + + + + + + + + Describes a list of items. Each item in the list shall have a unique name. + The list is designed as linear structure without optional or unbounded elements. + Use ElementItems only when complex structures are inevitable. + + + + + + Description of a simple item. The type must be of cathegory simpleType + (xs:string, xs:integer, xs:float, ...). + + + + + + Item name. Must be unique within a list. + + + + + + + + + Description of a complex type. The Type must reference a defined type. + + + + + + Item name. Must be unique within a list. + + + + + The type of the item. The Type must reference a defined type. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Object Class Type + + + + + A likelihood/probability that the corresponding object belongs to this + class. The sum of the likelihoods shall NOT exceed 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Number of columns of the cell grid (x dimension) + + + + + Number of rows of the cell grid (y dimension) + + + + + A “1” denotes a cell where motion is detected and a “0” an empty cell. The + first cell is in the upper left corner. Then the cell order goes first from left to right + and then from up to down. If the number of cells is not a multiple of 8 the last byte is + filled with zeros. The information is run length encoded according to Packbit coding in + ISO 12369 (TIFF, Revision 6.0). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + List of configuration parameters as defined in the correspding + description. + + + + + + + Name of the configuration. + + + + + Type of the configuration represented by a unique QName. The Type + characterizes a ConfigDescription defining the Parameters. + + + + + + + + + + + List describing the configuration parameters. The names of the parameters must be + unique. If possible SimpleItems + should be used to transport the information to ease parsing of dynamically defined + messages by a client + application. + + + + + + + The analytics modules and rule engine produce Events, which must be listed within the + Analytics Module Description. In order to do so + the structure of the Message is defined and consists of three groups: Source, Key, and + Data. It is recommended to use SimpleItemDescriptions wherever applicable. + The name of all Items must be unique within all Items contained in any group of this + Message. + Depending on the component multiple parameters or none may be needed to identify the + component uniquely. + + + + + + + + + + The ParentTopic labels the message (e.g. "nn:RuleEngine/LineCrossing"). The + real message can extend the ParentTopic + by for example the name of the instaniated rule (e.g. + "nn:RuleEngine/LineCrossing/corssMyFirstLine"). + Even without knowing the complete topic name, the subscriber will be able to + distiguish the + messages produced by different rule instances of the same type via the Source + fields of the message. + There the name of the rule instance, which produced the message, must be + listed. + + + + + + + + + + + + + XML Type of the Configuration (e.g. "tt::LineDetector"). + + + + + + + + + + + + + + + + + Lists the location of all schemas that are referenced in the rules. + + + + + + List of rules supported by the Video Analytics configuration.. + + + + + + + + + + + + + + + + + + + It optionally contains a list of URLs that provide the location of + schema files. + These schema files describe the types and elements used in the analytics module + descriptions. + If the analytics module descriptions reference types or elements of the ONVIF schema + file, + the ONVIF schema file MUST be explicitly listed. + + + + + + + + + + + + + + + + + + + + Contains Polygon configuration for rule parameters + + + + + + + + + + + + Contains array of Polyline + + + + + + + + + + + + + + + + + + Contains PolylineArray configuration data + + + + + + + + + + + + Motion Expression data structure contains motion expression which is + based on Scene Descriptor schema with XPATH syntax. The Type argument could allow + introduction of different dialects + + + + + + + + + + + + + + Contains Rule MotionExpression configuration + + + + + + + + + + + + Mapping of the cell grid to the Video frame. The cell grid is starting + from the upper left corner and x dimension is going from left to right and the y + dimension from up to down. + + + + + + + + Number of columns of the cell grid (x dimension) + + + + + Number of rows of the cell grid (y dimension) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Configuration of the streaming and coding settings of a Video window. + + + + + + Optional name of the pane configuration. + + + + + If the device has audio outputs, this element contains a pointer to the + audio output that is associated with the pane. A client + can retrieve the available audio outputs of a device using the GetAudioOutputs command + of the DeviceIO service. + + + + + + If the device has audio sources, this element contains a pointer to the + audio source that is associated with this pane. + The audio connection from a decoder device to the NVT is established using the + backchannel mechanism. A client can retrieve the available audio sources of a device + using the GetAudioSources command of the + DeviceIO service. + + + + + + The configuration of the audio encoder including codec, bitrate + and sample rate. + + + + + + A pointer to a Receiver that has the necessary information to receive + data from a Transmitter. This Receiver can be connected and the network video decoder + displays the received data on the specified outputs. A client can retrieve the available + Receivers using the + GetReceivers command of the Receiver Service. + + + + + + A unique identifier in the display device. + + + + + + + + + + A pane layout describes one Video window of a display. It links a pane + configuration to a region of the screen. + + + + + + Reference to the configuration of the streaming and coding parameters. + + + + + + Describes the location and size of the area on the monitor. The area + coordinate values are espressed in normalized units [-1.0, 1.0]. + + + + + + + + + + + A layout describes a set of Video windows that are displayed simultaniously + on a display. + + + + + + List of panes assembling the display layout. + + + + + + + + + + + + + + + + This type contains the Audio and Video coding capabilities of a display + service. + + + + + + If the device supports audio encoding this section describes the + supported codecs and their configuration. + + + + + + If the device supports audio decoding this section describes the + supported codecs and their settings. + + + + + + This section describes the supported video codesc and their + configuration. + + + + + + + + + + + The options supported for a display layout. + + + + + Lists the possible Pane Layouts of the Video Output + + + + + + + + + + + + + + + + Description of a pane layout describing a complete display layout. + + + + + + List of areas assembling a layout. Coordinate values are in the range + [-1.0, 1.0]. + + + + + + + + + + + + + + + + + + + + + + + Description of a receiver, including its token and configuration. + + + + + + Unique identifier of the receiver. + + + + + Describes the configuration of the receiver. + + + + + + + + + + + Describes the configuration of a receiver. + + + + + + The following connection modes are defined: + + + + + Details of the URI to which the receiver should connect. + + + + + + Stream connection parameters. + + + + + + + + + + + Specifies a receiver connection mode. + + + + + + The receiver connects on demand, as required by consumers of the media + streams. + + + + + + The receiver attempts to maintain a persistent connection to the + configured endpoint. + + + + + + The receiver does not attempt to connect. + + + + + This case should never happen. + + + + + + + + + Specifies the current connection state of the receiver. + + + + + + The receiver is not connected. + + + + + The receiver is attempting to connect. + + + + + The receiver is connected. + + + + + This case should never happen. + + + + + + + + + Contains information about a receiver's current state. + + + + + + The connection state of the receiver may have one of the following + states: + + + + + + Indicates whether or not the receiver was created automatically. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The earliest point in time where there is recorded data on the device. + + + + + + The most recent point in time where there is recorded data on the + device. + + + + + + The device contains this many recordings. + + + + + + + + + + A structure for defining a limited scope when searching in recorded data. + + + + + + A list of sources that are included in the scope. If this list is + included, only data from one of these sources shall be searched. + + + + + + A list of recordings that are included in the scope. If this list is + included, only data from one of these recordings shall be searched. + + + + + + An xpath expression used to specify what recordings to search. Only + those recordings with an RecordingInformation structure that matches the filter shall be + searched. + + + + + + Extension point + + + + + + + + + + + + + + + + + + + + + + + + + The lower boundary of the PTZ volume to look for. + + + + + The upper boundary of the PTZ volume to look for. + + + + + If true, search for when entering the specified PTZ volume. + + + + + + + + + + + + + + + + + + + + + + + + + The state of the search when the result is returned. Indicates if there + can be more results, or if the search is completed. + + + + + + A RecordingInformation structure for each found recording matching the + search. + + + + + + + + + + + The state of the search when the result is returned. Indicates if there + can be more results, or if the search is completed. + + + + + + A FindEventResult structure for each found event matching the search. + + + + + + + + + + + The recording where this event was found. Empty string if no recording + is associated with this event. + + + + + + A reference to the track where this event was found. Empty string if no + track is associated with this event. + + + + + + The time when the event occured. + + + + + The description of the event. + + + + + If true, indicates that the event is a virtual event generated for this + particular search session to give the state of a property at the start time of the + search. + + + + + + + + + + + + + The state of the search when the result is returned. Indicates if there + can be more results, or if the search is completed. + + + + + + A FindPTZPositionResult structure for each found PTZ position matching + the search. + + + + + + + + + + + A reference to the recording containing the PTZ position. + + + + + + A reference to the metadata track containing the PTZ position. + + + + + + The time when the PTZ position was valid. + + + + + The PTZ position. + + + + + + + + + + + + The state of the search when the result is returned. Indicates if there + can be more results, or if the search is completed. + + + + + + A FindMetadataResult structure for each found set of Metadata matching + the search. + + + + + + + + + + + A reference to the recording containing the metadata. + + + + + A reference to the metadata track containing the matching metadata. + + + + + + The point in time when the matching metadata occurs in the metadata + track. + + + + + + + + + + + + + The search is queued and not yet started. + + + + + The search is underway and not yet completed. + + + + + The search has been completed and no new results will be found. + + + + + + The state of the search is unknown. (This is not a valid response from + GetSearchState.) + + + + + + + + + + + + + + + + + Information about the source of the recording. This gives a description of where the + data in the recording comes from. Since a single + recording is intended to record related material, there is just one source. It is + indicates the physical location or the + major data source for the recording. Currently the recordingconfiguration cannot + describe each individual data source. + + + + + + + + + Basic information about the track. Note that a track may represent a + single contiguous time span or consist of multiple slices. + + + + + + + + + + + + + A set of informative desciptions of a data source. The Search searvice allows a client to + filter on recordings based on information in this structure. + + + + + + + Identifier for the source chosen by the client that creates the structure. + This identifier is opaque to the device. Clients may use any type of URI for this field. + A device shall support at least 128 characters. + + + + + + Informative user readable name of the source, e.g. "Camera23". A device + shall support at least 20 characters. + + + + + + Informative description of the physical location of the source, e.g. the + coordinates on a map. + + + + + + Informative description of the source. + + + + + URI provided by the service supplying data to be recorded. A device + shall support at least 128 characters. + + + + + + + + + + + + + + + + + + This case should never happen. + + + + + + + + + + + Type of the track: "Video", "Audio" or "Metadata". + The track shall only be able to hold data of that type. + + + + + + Informative description of the contents of the track. + + + + + The start date and time of the oldest recorded data in the track. + + + + + + The stop date and time of the newest recorded data in the track. + + + + + + + + + + + + + + + + Placeholder for future extension. + + + + + + + + A set of media attributes valid for a recording at a point in time or for a + time interval. + + + + + + A reference to the recording that has these attributes. + + + + + + A set of attributes for each track. + + + + + The attributes are valid from this point in time in the recording. + + + + + + The attributes are valid until this point in time in the recording. Can + be equal to 'From' to indicate that the attributes are only known to be valid for this + particular point in time. + + + + + + + + + + + + + The basic information about the track. Note that a track may represent a + single contiguous time span or consist of multiple slices. + + + + + + If the track is a video track, exactly one of this structure shall be + present and contain the video attributes. + + + + + + If the track is an audio track, exactly one of this structure shall be + present and contain the audio attributes. + + + + + + If the track is an metadata track, exactly one of this structure shall + be present and contain the metadata attributes. + + + + + + + + + + + + + + + + + + + + + + + Average bitrate in kbps. + + + + + The width of the video in pixels. + + + + + The height of the video in pixels. + + + + + Used video codec, either Jpeg, H.264 or Mpeg4 + + + + + Average framerate in frames per second. + + + + + + + + + + + + The bitrate in kbps. + + + + + Audio codec used for encoding the audio (either G.711, G.726 or AAC) + + + + + + The sample rate in kHz. + + + + + + + + + + + + Indicates that there can be PTZ data in the metadata track in the + specified time interval. + + + + + + Indicates that there can be analytics data in the metadata track in the + specified time interval. + + + + + + Indicates that there can be notifications in the metadata track in the + specified time interval. + + + + + + + + List of all PTZ spaces active for recording. Note that events are only + recorded on position changes and the actual point of recording may not necessarily contain + an event of the specified type. + + + + + + + + + + + + + + + + + + Information about the source of the recording. + + + + + Informative description of the source. + + + + + Sspecifies the maximum time that data in any track within the + recording shall be stored. The device shall delete any data older than the maximum + retention + time. Such data shall not be accessible anymore. If the MaximumRetentionPeriod is set to + 0, + the device shall not limit the retention time of stored data, except by resource + constraints. + Whatever the value of MaximumRetentionTime, the device may automatically delete + recordings to free up storage space for new recordings. + + + + + + + + + + + + + Type of the track. It shall be equal to the strings “Video”, + “Audio” or “Metadata”. The track shall only be able to hold data of that type. + + + + + + Informative description of the track. + + + + + + + + + + + + Token of the recording. + + + + + Configuration of the recording. + + + + + List of tracks. + + + + + + + + + + + + Configuration of a track. + + + + + + + + + + + Token of the track. + + + + + Configuration of the track. + + + + + + + + + + + + Identifies the recording to which this job shall store the received + data. + + + + + + The mode of the job. If it is idle, nothing shall happen. If it is + active, the device shall try + to obtain data from the receivers. A client shall use GetRecordingJobState to determine + if data transfer is really taking place. +
+ The only valid values for Mode shall be “Idle” and “Active”. +
+
+
+ + + This shall be a non-negative number. If there are multiple recording + jobs that store data to + the same track, the device will only store the data for the recording job with the + highest + priority. The priority is specified per recording job, but the device shall determine + the priority + of each track individually. If there are two recording jobs with the same priority, the + device + shall record the data corresponding to the recording job that was activated the latest. + + + + + + Source of the recording. + + + +
+ +
+ + + + + + + + + + + + + + + + This field shall be a reference to the source of the data. The type of + the source + is determined by the attribute Type in the SourceToken structure. If Type is + http://www.onvif.org/ver10/schema/Receiver, the token is a ReceiverReference. In this + case + the device shall receive the data over the network. If Type is + http://www.onvif.org/ver10/schema/Profile, the token identifies a media profile, + instructing the + device to obtain data from a profile that exists on the local device. + + + + + + If this field is TRUE, and if the SourceToken is omitted, the device + shall create a receiver object (through the receiver service) and assign the + ReceiverReference to the SourceToken field. When retrieving the + RecordingJobConfiguration + from the device, the AutoCreateReceiver field shall never be present. + + + + + + List of tracks associated with the recording. + + + + + + + + + + + + + + + + + + If the received RTSP stream contains multiple tracks of the same type, + the + SourceTag differentiates between those Tracks. This field can be ignored in case of + recording a local source. + + + + + + The destination is the tracktoken of the track to which the device shall + store the + received data. + + + + + + + + + + + + + Identification of the recording that the recording job records to. + + + + + + Holds the aggregated state over the whole RecordingJobInformation + structure. + + + + + + Identifies the data source of the recording job. + + + + + + + + + + + + + + + + + + + + + + Identifies the data source of the recording job. + + + + + Holds the aggregated state over all substructures of + RecordingJobStateSource. + + + + + + List of track items. + + + + + + + + + + + + + + + + + + + Identifies the track of the data source that provides the data. + + + + + + Indicates the destination track. + + + + + Optionally holds an implementation defined string value that describes + the error. + The string should be in the English language. + + + + + + Provides the job state of the track. The valid + values of state shall be “Idle”, “Active” and “Error”. If state equals “Error”, the + Error field may be filled in with an implementation defined value. + + + + + + + + + + + + + + + + + + + + + + + + + + + Configuration parameters for the replay service. + + + + + + The RTSP session timeout. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Token of the analytics engine (AnalyticsEngine) being controlled. + + + + + + Token of the analytics engine configuration + (VideoAnalyticsConfiguration) in effect. + + + + + + Tokens of the input (AnalyticsEngineInput) configuration applied. + + + + + + Tokens of the receiver providing media input data. The order of + ReceiverToken shall exactly match the order of InputToken. + + + + + + + + + + + + + + + + + + + + This case should never happen. + + + + + + + + + + Token of the control object whose status is requested. + + + + + + + + + + + + + + + + + + + + + + + + + + + Action Engine Event Payload data structure contains the information about + the ONVIF command invocations. Since this event could be generated by other or proprietary + actions, the command invocation specific fields are defined as optional and additional + extension mechanism is provided for future or additional action definitions. + + + + + + Request Message + + + + + Response Message + + + + + Fault Message + + + + + + + + + + + + + + + + + + + + + + + AudioClassType acceptable values are; + gun_shot, scream, glass_breaking, tire_screech + + + + + + + + + + Indicates audio class label + + + + + A likelihood/probability that the corresponding audio event belongs to + this class. The sum of the likelihoods shall NOT exceed 1 + + + + + + + + + + + + + Array of audio class label and class probability + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + For OSD position type, following are the pre-defined: +
    +
  • UpperLeft
  • +
  • UpperRight
  • +
  • LowerLeft
  • +
  • LowerRight
  • +
  • Custom
  • +
+
+
+
+ + +
+ +
+ + + + + + + + + + + The value range of "Transparent" could be defined by vendors only should + follow this rule: the minimum value means non-transparent and the maximum value maens fully + transparent. + + + + + + + + + + + + + + + The following OSD Text Type are defined: +
    +
  • Plain - The Plain type means the OSD is shown as a text string which defined in + the "PlainText" item. +
  • +
  • Date - The Date type means the OSD is shown as a date, format of which should be + present in the "DateFormat" item. +
  • +
  • Time - The Time type means the OSD is shown as a time, format of which should be + present in the "TimeFormat" item. +
  • +
  • DateAndTime - The DateAndTime type means the OSD is shown as date and time, format + of which should be present in the "DateFormat" and the "TimeFormat" item. +
  • +
+
+
+
+ + + + List of supported OSD date formats. This element shall be present when the value of Type + field has Date or DateAndTime. The following DateFormat are defined: +
    +
  • M/d/yyyy - e.g. 3/6/2013
  • +
  • MM/dd/yyyy - e.g. 03/06/2013
  • +
  • dd/MM/yyyy - e.g. 06/03/2013
  • +
  • yyyy/MM/dd - e.g. 2013/03/06
  • +
  • yyyy-MM-dd - e.g. 2013-06-03
  • +
  • dddd, MMMM dd, yyyy - e.g. Wednesday, March 06, 2013
  • +
  • MMMM dd, yyyy - e.g. March 06, 2013
  • +
  • dd MMMM, yyyy - e.g. 06 March, 2013
  • +
+
+
+
+ + + + List of supported OSD time formats. This element shall be present when the value of Type + field has Time or DateAndTime. The following TimeFormat are defined: +
    +
  • h:mm:ss tt - e.g. 2:14:21 PM
  • +
  • hh:mm:ss tt - e.g. 02:14:21 PM
  • +
  • H:mm:ss - e.g. 14:14:21
  • +
  • HH:mm:ss - e.g. 14:14:21
  • +
+
+
+
+ + + Font size of the text in pt. + + + + + Font color of the text. + + + + + Background color of the text. + + + + + The content of text to be displayed. + + + +
+ +
+ + + + + + + + + + + + + The URI of the image which to be displayed. + + + + + + + + + + + + + + + + + + + + + + + + + + + Describe the option of the color supported. Either list each color or define + the range of color value. The following values are acceptable for Colourspace attribute. +
    +
  • http://www.onvif.org/ver10/colorspace/YCbCr - YCbCr colourspace
  • +
  • http://www.onvif.org/ver10/colorspace/CIELUV - CIE LUV
  • +
  • http://www.onvif.org/ver10/colorspace/CIELAB - CIE 1976 (L*a*b*)
  • +
  • http://www.onvif.org/ver10/colorspace/HSV - HSV colourspace
  • +
+
+
+ + + + + List the supported color. + + + + + Define the rang of color supported. + + + + + +
+ + + + Describe the option of the color and its transparency. + + + + + Optional list of supported colors. + + + + + Range of the transparent level. Larger means more tranparent. + + + + + + + + + + + + + + + + + + + + List of supported OSD text type. When a device indicates the supported + number relating to Text type in MaximumNumberOfOSDs, the type shall be presented. + + + + + + Range of the font size value. + + + + + List of supported date format. + + + + + List of supported time format. + + + + + List of supported font color. + + + + + List of supported background color. + + + + + + + + + + + + + + + + + + + List of avaiable uris of image. + + + + + + + + + + + + + + + + + + + + + Reference to the video source configuration. + + + + + Type of OSD. + + + + + Position configuration of OSD. + + + + + Text configuration of OSD. It shall be present when the value of + Type field is Text. + + + + + + Image configuration of OSD. It shall be present when the value of + Type field is Image + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The maximum number of OSD configurations supported for the specificate + video source configuration. If a device limits the number of instances by OSDType, it + should indicate the supported number via the related attribute. + + + + + + List supported type of OSD configuration. When a device indicates the + supported number for each types in MaximumNumberOfOSDs, related type shall be presented. + A device shall return Option element relating to listed type. + + + + + + List available OSD position type. Following are the pre-defined: +
    +
  • UpperLeft
  • +
  • UpperRight
  • +
  • LowerLeft
  • +
  • LowerRight
  • +
  • Custom
  • +
+
+
+
+ + + Option of the OSD text configuration. This element shall be returned if + the device is signaling the support for Text. + + + + + + Option of the OSD image configuration. This element shall be returned if + the device is signaling the support for Image. + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + Exported file name + + + + + Normalized percentage completion for uploading the exported file + + + + + + + + + + + + + Exported file name and export progress information + + + + + + + + + + + + + + + + + + identifier of an existing Storage Configuration. + + + + + gives the relative directory path on the storage + + + + + + + + + + + + + + + +
diff --git a/onvif-ws-client/src/main/resources/wsdl/local/www.onvif.org/ver10/topics/topicns.xml b/onvif-ws-client/src/main/resources/wsdl/local/www.onvif.org/ver10/topics/topicns.xml new file mode 100644 index 0000000..23ef1d1 --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/local/www.onvif.org/ver10/topics/topicns.xml @@ -0,0 +1,12 @@ + + + + \ No newline at end of file diff --git a/onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2001/xml.xsd b/onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2001/xml.xsd new file mode 100644 index 0000000..9c499b6 --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2001/xml.xsd @@ -0,0 +1,321 @@ + + + + + + +
+

About the XML namespace

+ +
+

+ This schema document describes the XML namespace, in a form + suitable for import by other schema documents. +

+

+ See + http://www.w3.org/XML/1998/namespace.html + and + + http://www.w3.org/TR/REC-xml + + for information + about this namespace. +

+

+ 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. +

+

+ See further below in this document for more information about how to refer to this schema document from your own + XSD schema documents + and about the + namespace-versioning policy governing this schema document. +

+
+
+
+
+ + + + +
+ +

lang (as an attribute name)

+

+ 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. +

+ +
+
+

Notes

+

+ 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. +

+

+ See BCP 47 at + + http://www.rfc-editor.org/rfc/bcp/bcp47.txt + + and the IANA language subtag registry at + + http://www.iana.org/assignments/language-subtag-registry + + for further information. +

+

+ The union allows for the 'un-declaration' of xml:lang with + the empty string. +

+
+
+
+ + + + + + + + + +
+ + + + +
+ +

space (as an attribute name)

+

+ 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. +

+ +
+
+
+ + + + + + +
+ + + + +
+ +

base (as an attribute name)

+

+ 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. +

+ +

+ See + http://www.w3.org/TR/xmlbase/ + + for information about this attribute. +

+
+
+
+
+ + + + +
+ +

id (as an attribute name)

+

+ 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. +

+ +

+ See + http://www.w3.org/TR/xml-id/ + + for information about this attribute. +

+
+
+
+
+ + + + + + + + + + +
+ +

Father (in any context at all)

+ +
+

+ 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: +

+
+

+ 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". +

+
+
+
+
+
+ + + +
+

+ About this schema document +

+ +
+

+ This schema defines attributes and an attribute group suitable + for use by schemas wishing to allow xml:base, + xml:lang, xml:space or + xml:id + attributes on elements they define. +

+

+ To enable this, such a schema must import this schema for + the XML namespace, e.g. as follows: +

+
+            <schema . . .>
+            . . .
+            <import namespace="http://www.w3.org/XML/1998/namespace"
+            schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+          
+

+ or +

+
+            <import namespace="http://www.w3.org/XML/1998/namespace"
+            schemaLocation="http://www.w3.org/2009/01/xml.xsd"/>
+          
+

+ Subsequently, qualified reference to any of the attributes or the + group defined below will have the desired effect, e.g. +

+
+            <type . . .>
+            . . .
+            <attributeGroup ref="xml:specialAttrs"/>
+          
+

+ will define a type which will schema-validate an instance element + with any of those attributes. +

+
+
+
+
+ + + +
+

+ Versioning policy for this schema document +

+
+

+ In keeping with the XML Schema WG's standard versioning + policy, this schema document will persist at + + http://www.w3.org/2009/01/xml.xsd. +

+

+ At the date of issue it can also be found at + + http://www.w3.org/2001/xml.xsd. +

+

+ 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 + + http://www.w3.org/2001/xml.xsd + + will change accordingly; the version at + + http://www.w3.org/2009/01/xml.xsd + + will not change. +

+

+ Previous dated (and unchanging) versions of this schema + document are at: +

+ +
+
+
+
+ +
+ diff --git a/onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2003/05/soap-envelope b/onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2003/05/soap-envelope new file mode 100644 index 0000000..85a6d8e --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2003/05/soap-envelope @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + Elements replacing the wildcard MUST be namespace qualified, but can be in the targetNamespace + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Fault reporting structure + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2004/08/xop/include b/onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2004/08/xop/include new file mode 100644 index 0000000..edb43a0 --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2004/08/xop/include @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2005/05/xmlmime b/onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2005/05/xmlmime new file mode 100644 index 0000000..766a07b --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2005/05/xmlmime @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2005/08/addressing b/onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2005/08/addressing new file mode 100644 index 0000000..69a906a --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2005/08/addressing @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2006/03/addressing/ws-addr.xsd b/onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2006/03/addressing/ws-addr.xsd new file mode 100644 index 0000000..ae109bb --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/local/www.w3.org/2006/03/addressing/ws-addr.xsd @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/onvif-ws-client/src/main/resources/wsdl/media_2.6.wsdl b/onvif-ws-client/src/main/resources/wsdl/media_2.6.wsdl new file mode 100644 index 0000000..4821752 --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/media_2.6.wsdl @@ -0,0 +1,4237 @@ + + + + + + + + + + + + + + + + + + + + The capabilities for the media service is returned in the + Capabilities element. + + + + + + + + + + + + Media profile capabilities. + + + + + Streaming capabilities. + + + + + + + Indicates if GetSnapshotUri is supported. + + + + + Indicates whether or not Rotation feature is supported. + + + + + + Indicates the support for changing video source mode. + + + + + + Indicates if OSD is supported. + + + + + Indicates the support for the Efficient XML Interchange (EXI) binary + XML format. + + + + + + + + + + + + + + Maximum number of profiles supported. + + + + + + + + + + + + Indicates support for RTP multicast. + + + + + Indicates support for RTP over TCP. + + + + + Indicates support for RTP/RTSP/TCP. + + + + + Indicates support for non aggregate RTSP control. + + + + + Indicates the device does not support live media streaming via RTSP. + + + + + + + + + + + + + + + + + + List of existing Video Sources + + + + + + + + + + + + + + + + + + List of existing Audio Sources + + + + + + + + + + + + + + + + + + List of existing Audio Outputs + + + + + + + + + + + + friendly name of the profile to be created + + + + + Optional token, specifying the unique identifier of the new + profile.
A device supports at least a token length of 12 characters and + characters "A-Z" | "a-z" | "0-9" | "-.". +
+
+
+
+
+
+ + + + + + returns the new created profile + + + + + + + + + + + + this command requests a specific profile + + + + + + + + + + + returns the requested media profile + + + + + + + + + + + + + + + + + + + lists all profiles that exist in the media service + + + + + + + + + + + + + Reference to the profile where the configuration should be added + + + + + + Contains a reference to the VideoEncoderConfiguration to add + + + + + + + + + + + + + + + + + + + Contains a reference to the media profile from which the + VideoEncoderConfiguration shall be removed. + + + + + + + + + + + + + + + + + + + Reference to the profile where the configuration should be added + + + + + + Contains a reference to the VideoSourceConfiguration to add + + + + + + + + + + + + + + + + + + + Contains a reference to the media profile from which the + VideoSourceConfiguration shall be removed. + + + + + + + + + + + + + + + + + + + Reference to the profile where the configuration should be added + + + + + + Contains a reference to the AudioEncoderConfiguration to add + + + + + + + + + + + + + + + + + + + Contains a reference to the media profile from which the + AudioEncoderConfiguration shall be removed. + + + + + + + + + + + + + + + + + + + Reference to the profile where the configuration should be added + + + + + + Contains a reference to the AudioSourceConfiguration to add + + + + + + + + + + + + + + + + + + + Contains a reference to the media profile from which the + AudioSourceConfiguration shall be removed. + + + + + + + + + + + + + + + + + + + Reference to the profile where the configuration should be added + + + + + + Contains a reference to the PTZConfiguration to add + + + + + + + + + + + + + + + + + + + Contains a reference to the media profile from which the + PTZConfiguration shall be removed. + + + + + + + + + + + + + + + + + + + Reference to the profile where the configuration should be added + + + + + + Contains a reference to the VideoAnalyticsConfiguration to add + + + + + + + + + + + + + + + + + + + Contains a reference to the media profile from which the + VideoAnalyticsConfiguration shall be removed. + + + + + + + + + + + + + + + + + + + Reference to the profile where the configuration should be added + + + + + + Contains a reference to the MetadataConfiguration to add + + + + + + + + + + + + + + + + + + + Contains a reference to the media profile from which the + MetadataConfiguration shall be removed. + + + + + + + + + + + + + + + + + + + Reference to the profile where the configuration should be added + + + + + + Contains a reference to the AudioOutputConfiguration to add + + + + + + + + + + + + + + + + + + + Contains a reference to the media profile from which the + AudioOutputConfiguration shall be removed. + + + + + + + + + + + + + + + + + + + This element contains a reference to the profile where the + configuration should be added. + + + + + + This element contains a reference to the AudioDecoderConfiguration + to add. + + + + + + + + + + + + + + + + + + + This element contains a reference to the media profile from which + the AudioDecoderConfiguration shall be removed. + + + + + + + + + + + + + + + + + + + This element contains a reference to the profile that should be + deleted. + + + + + + + + + + + + + + + + + + + + + + + + + + + This element contains a list of video encoder configurations. + + + + + + + + + + + + + + + + + + + This element contains a list of video source configurations. + + + + + + + + + + + + + + + + + + + This element contains a list of audio encoder configurations. + + + + + + + + + + + + + + + + + + + This element contains a list of audio source configurations. + + + + + + + + + + + + + + + + + + + This element contains a list of VideoAnalytics configurations. + + + + + + + + + + + + + + + + + + + This element contains a list of metadata configurations + + + + + + + + + + + + + + + + + + + + This element contains a list of audio output configurations + + + + + + + + + + + + + + + + + + + This element contains a list of audio decoder configurations + + + + + + + + + + + + + Token of the requested video source configuration. + + + + + + + + + + + + + The requested video source configuration. + + + + + + + + + + + + Token of the requested video encoder configuration. + + + + + + + + + + + + The requested video encoder configuration. + + + + + + + + + + + + Token of the requested audio source configuration. + + + + + + + + + + + + The requested audio source configuration. + + + + + + + + + + + + Token of the requested audio encoder configuration. + + + + + + + + + + + + The requested audio encoder configuration + + + + + + + + + + + + Token of the requested video analytics configuration. + + + + + + + + + + + + The requested video analytics configuration. + + + + + + + + + + + + Token of the requested metadata configuration. + + + + + + + + + + + The requested metadata configuration. + + + + + + + + + + + + + Token of the requested audio output configuration. + + + + + + + + + + + + + The requested audio output configuration. + + + + + + + + + + + + Token of the requested audio decoder configuration. + + + + + + + + + + + + + The requested audio decoder configuration + + + + + + + + + + + + Contains the token of an existing media profile the configurations + shall be compatible with. + + + + + + + + + + + + Contains a list of video encoder configurations that are + compatible with the specified media profile. + + + + + + + + + + + + + Contains the token of an existing media profile the configurations + shall be compatible with. + + + + + + + + + + + + Contains a list of video source configurations that are compatible + with the specified media profile. + + + + + + + + + + + + + Contains the token of an existing media profile the configurations + shall be compatible with. + + + + + + + + + + + + Contains a list of audio encoder configurations that are + compatible with the specified media profile. + + + + + + + + + + + + + Contains the token of an existing media profile the configurations + shall be compatible with. + + + + + + + + + + + + Contains a list of audio source configurations that are compatible + with the specified media profile. + + + + + + + + + + + + + Contains the token of an existing media profile the configurations + shall be compatible with. + + + + + + + + + + + + Contains a list of video analytics configurations that are + compatible with the specified media profile. + + + + + + + + + + + + + Contains the token of an existing media profile the configurations + shall be compatible with. + + + + + + + + + + + + Contains a list of metadata configurations that are compatible + with the specified media profile. + + + + + + + + + + + + + + Contains the token of an existing media profile the configurations + shall be compatible with. + + + + + + + + + + + + Contains a list of audio output configurations that are compatible + with the specified media profile. + + + + + + + + + + + + + Contains the token of an existing media profile the configurations + shall be compatible with. + + + + + + + + + + + + Contains a list of audio decoder configurations that are + compatible with the specified media profile. + + + + + + + + + + + + + + + + + + Contains the modified video encoder configuration. The + configuration shall exist in the device. + + + + + + The ForcePersistence element is obsolete and should always be + assumed to be true. + + + + + + + + + + + + + + + + + + + Contains the modified video source configuration. The + configuration shall exist in the device. + + + + + + The ForcePersistence element is obsolete and should always be + assumed to be true. + + + + + + + + + + + + + + + + + + + Contains the modified audio encoder configuration. The + configuration shall exist in the device. + + + + + + The ForcePersistence element is obsolete and should always be + assumed to be true. + + + + + + + + + + + + + + + + + + + Contains the modified audio source configuration. The + configuration shall exist in the device. + + + + + + The ForcePersistence element is obsolete and should always be + assumed to be true. + + + + + + + + + + + + + + + + + + + Contains the modified video analytics configuration. The + configuration shall exist in the device. + + + + + + The ForcePersistence element is obsolete and should always be + assumed to be true. + + + + + + + + + + + + + + + + + + + Contains the modified metadata configuration. The configuration + shall exist in the device. + + + + + + The ForcePersistence element is obsolete and should always be + assumed to be true. + + + + + + + + + + + + + + + + + + + + Contains the modified audio output configuration. The + configuration shall exist in the device. + + + + + + The ForcePersistence element is obsolete and should always be + assumed to be true. + + + + + + + + + + + + + + + + + + + Contains the modified audio decoder configuration. The + configuration shall exist in the device. + + + + + + The ForcePersistence element is obsolete and should always be + assumed to be true. + + + + + + + + + + + + + + + + + + + Optional video source configurationToken that specifies an + existing configuration that the options are intended for. + + + + + + Optional ProfileToken that specifies an existing media profile + that the options shall be compatible with. + + + + + + + + + + + + This message contains the video source configuration options. If a + video source configuration is specified, the options shall concern that particular + configuration. If a media profile is specified, the options shall be compatible + with that media profile. If no tokens are specified, the options shall be + considered generic for the device. + + + + + + + + + + + + + Optional video encoder configuration token that specifies an + existing configuration that the options are intended for. + + + + + + Optional ProfileToken that specifies an existing media profile + that the options shall be compatible with. + + + + + + + + + + + + + + + + + + + + Optional audio source configuration token that specifies an + existing configuration that the options are intended for. + + + + + + Optional ProfileToken that specifies an existing media profile + that the options shall be compatible with. + + + + + + + + + + + + This message contains the audio source configuration options. If a + audio source configuration is specified, the options shall concern that particular + configuration. If a media profile is specified, the options shall be compatible + with that media profile. If no tokens are specified, the options shall be + considered generic for the device. + + + + + + + + + + + + + Optional audio encoder configuration token that specifies an + existing configuration that the options are intended for. + + + + + + Optional ProfileToken that specifies an existing media profile + that the options shall be compatible with. + + + + + + + + + + + + This message contains the audio encoder configuration options. If + a audio encoder configuration is specified, the options shall concern that + particular configuration. If a media profile is specified, the options shall be + compatible with that media profile. If no tokens are specified, the options shall + be considered generic for the device. + + + + + + + + + + + + + Optional metadata configuration token that specifies an existing + configuration that the options are intended for. + + + + + + Optional ProfileToken that specifies an existing media profile + that the options shall be compatible with. + + + + + + + + + + + + This message contains the metadata configuration options. If a + metadata configuration is specified, the options shall concern that particular + configuration. If a media profile is specified, the options shall be compatible + with that media profile. If no tokens are specified, the options shall be + considered generic for the device. + + + + + + + + + + + + + Optional audio output configuration token that specifies an + existing configuration that the options are intended for. + + + + + + Optional ProfileToken that specifies an existing media profile + that the options shall be compatible with. + + + + + + + + + + + + This message contains the audio output configuration options. If a + audio output configuration is specified, the options shall concern that particular + configuration. If a media profile is specified, the options shall be compatible + with that media profile. If no tokens are specified, the options shall be + considered generic for the device. + + + + + + + + + + + + + Optional audio decoder configuration token that specifies an + existing configuration that the options are intended for. + + + + + + Optional ProfileToken that specifies an existing media profile + that the options shall be compatible with. + + + + + + + + + + + + This message contains the audio decoder configuration options. If + a audio decoder configuration is specified, the options shall concern that + particular configuration. If a media profile is specified, the options shall be + compatible with that media profile. If no tokens are specified, the options shall + be considered generic for the device. + + + + + + + + + + + + + Token of the video source configuration + + + + + + + + + + + The minimum guaranteed total number of encoder instances + (applications) per VideoSourceConfiguration. The device is able to deliver the + TotalNumber of streams + + + + + + If a device limits the number of instances for respective Video + Codecs the response contains the information how many Jpeg streams can be set up + at the same time per VideoSource. + + + + + + If a device limits the number of instances for respective Video + Codecs the response contains the information how many H264 streams can be set up + at the same time per VideoSource. + + + + + + If a device limits the number of instances for respective Video + Codecs the response contains the information how many Mpeg4 streams can be set up + at the same time per VideoSource. + + + + + + + + + + + + + Stream Setup that should be used with the uri + + + + + The ProfileToken element indicates the media profile to use and + will define the configuration of the content of the stream. + + + + + + + + + + + + + + + + + + + + + + + + Contains the token of the Profile that is used to define the + multicast stream. + + + + + + + + + + + + + + + + + + + Contains the token of the Profile that is used to define the + multicast stream. + + + + + + + + + + + + + + + + + + + Contains a Profile reference for which a Synchronization Point is + requested. + + + + + + + + + + + + + + + + + + + The ProfileToken element indicates the media profile to use and + will define the source and dimensions of the snapshot. + + + + + + + + + + + + + + + + + + + + + + + + Contains a video source reference for which a video source mode is + requested. + + + + + + + + + + + + Return the information for specified video source mode. + + + + + + + + + + + + + Contains a video source reference for which a video source mode is + requested. + + + + + + Indicate video source mode. + + + + + + + + + + + The response contains information about rebooting after returning + response. When Reboot is set true, a device will reboot automatically after + setting mode. + + + + + + + + + + Indication which encodings are supported for this video source. The list + may contain one or more enumeration values of tt:VideoEncoding. + + + + + + + + + + Max frame rate in frames per second for this video source mode. + + + + + + Max horizontal and vertical resolution for this video source mode. + + + + + + Indication which encodings are supported for this video source. The + list may contain one or more enumeration values of tt:VideoEncoding. + + + + + + After setting the mode if a device starts to reboot this value is + true. If a device change the mode without rebooting this value is false. If true, + configured parameters may not be guaranteed by the device after rebooting. + + + + + + Informative description of this video source mode. This field should + be described in English. + + + + + + + + Indicate token for video source mode. + + + + + Indication of whether this mode is active. If active this value is + true. In case of non-indication, it means as false. The value of true shall be had by + only one video source mode. + + + + + + + + + + + + + + + + + + + + Token of the Video Source Configuration, which has OSDs associated + with are requested. If token not exist, request all available OSDs. + + + + + + + + + + + + This element contains a list of requested OSDs. + + + + + + + + + + + + The GetOSD command fetches the OSD configuration if the OSD token + is known. + + + + + + + + + + + + + The requested OSD configuration. + + + + + + + + + + + + + Contains the modified OSD configuration. + + + + + + + + + + + + + + + + + + + + Video Source Configuration Token that specifies an existing video + source configuration that the options shall be compatible with. + + + + + + + + + + + + + + + + + + + + + + + + + + Contain the initial OSD configuration for create. + + + + + + + + + + + + + Returns Token of the newly created OSD + + + + + + + + + + + + + This element contains a reference to the OSD configuration that + should be deleted. + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the capabilities of the media service. The result is returned in a + typed answer. + + + + + + + This command lists all available physical video inputs of the device. + + + + + + This command lists all available physical audio inputs of the device. + + + + + + This command lists all available physical audio outputs of the device. + + + + + + + This operation creates a new empty media profile. The media profile shall + be created in the + device and shall be persistent (remain after reboot). A created profile shall be deletable + and a device shall set the “fixed” attribute to false in the + returned Profile. + + + + + + If the profile token is already known, a profile can be fetched through + the GetProfile command. + + + + + + Any endpoint can ask for the existing media profiles of a device using the + GetProfiles + command. Pre-configured or dynamically configured profiles can be retrieved using this + command. This command lists all configured profiles in a device. The client does not need to + know the media profile in order to use the command. + + + + + + This operation adds a VideoEncoderConfiguration to an existing media + profile. If a + configuration exists in the media profile, it will be replaced. The change shall be + persistent. A device shall + support adding a compatible VideoEncoderConfiguration to a Profile containing a + VideoSourceConfiguration and shall + support streaming video data of such a profile. + + + + + + This operation removes a VideoEncoderConfiguration from an existing media + profile. If the + media profile does not contain a VideoEncoderConfiguration, the operation has no effect. The + removal shall be persistent. + + + + + + This operation adds a VideoSourceConfiguration to an existing media + profile. If such a + configuration exists in the media profile, it will be replaced. The change shall be + persistent. + + + + + + This operation removes a VideoSourceConfiguration from an existing media + profile. If the + media profile does not contain a VideoSourceConfiguration, the operation has no effect. The + removal shall be persistent. Video source configurations should only be removed after + removing a + VideoEncoderConfiguration from the media profile. + + + + + + This operation adds an AudioEncoderConfiguration to an existing media + profile. If a + configuration exists in the media profile, it will be replaced. The change shall be + persistent. A device shall + support adding a compatible AudioEncoderConfiguration to a profile containing an + AudioSourceConfiguration and shall + support streaming audio data of such a profile. + + + + + + This operation removes an AudioEncoderConfiguration from an existing media + profile. If the + media profile does not contain an AudioEncoderConfiguration, the operation has no effect. + The removal shall be persistent. + + + + + + This operation adds an AudioSourceConfiguration to an existing media + profile. If a + configuration exists in the media profile, it will be replaced. The change shall be + persistent. + + + + + + This operation removes an AudioSourceConfiguration from an existing media + profile. If the + media profile does not contain an AudioSourceConfiguration, the operation has no effect. The + removal shall be persistent. Audio source configurations should only be removed after + removing an + AudioEncoderConfiguration from the media profile. + + + + + + This operation adds a PTZConfiguration to an existing media profile. If a + configuration exists + in the media profile, it will be replaced. The change shall be persistent. Adding a + PTZConfiguration to a media profile means that streams using that media profile can + contain PTZ status (in the metadata), and that the media profile can be used for controlling + PTZ movement. + + + + + + This operation removes a PTZConfiguration from an existing media profile. + If the media profile + does not contain a PTZConfiguration, the operation has no effect. The removal shall be + persistent. + + + + + + This operation adds a VideoAnalytics configuration to an existing media + profile. If a + configuration exists in the media profile, it will be replaced. The change shall be + persistent. Adding a VideoAnalyticsConfiguration to a media profile means that streams using + that media + profile can contain video analytics data (in the metadata) as defined by the submitted + configuration reference. A profile containing only a video analytics configuration but no + video source configuration is incomplete. Therefore, a client should first add a video + source configuration to a profile before adding a video analytics configuration. The device + can deny adding of a video analytics + configuration before a video source configuration. + + + + + + This operation removes a VideoAnalyticsConfiguration from an existing + media profile. If the media profile does not contain a VideoAnalyticsConfiguration, the + operation has no effect. + The removal shall be persistent. + + + + + + This operation adds a Metadata configuration to an existing media profile. + If a configuration exists in the media profile, it will be replaced. The change shall be + persistent. Adding a MetadataConfiguration to a Profile means that streams using that + profile contain metadata. Metadata can consist of events, PTZ status, and/or video analytics + data. + + + + + + This operation removes a MetadataConfiguration from an existing media + profile. If the media profile does not contain a MetadataConfiguration, the operation has no + effect. The removal shall be persistent. + + + + + + This operation adds an AudioOutputConfiguration to an existing media + profile. If a configuration exists in the media profile, it will be replaced. The change + shall be persistent. + + + + + + This operation removes an AudioOutputConfiguration from an existing media + profile. If the media profile does not contain an AudioOutputConfiguration, the operation + has no effect. The removal shall be persistent. + + + + + + This operation adds an AudioDecoderConfiguration to an existing media + profile. If a configuration exists in the media profile, it shall be replaced. The change + shall be persistent. + + + + + + This operation removes an AudioDecoderConfiguration from an existing media + profile. If the media profile does not contain an AudioDecoderConfiguration, the operation + has no effect. The removal shall be persistent. + + + + + + This operation deletes a profile. This change shall always be persistent. + Deletion of a profile is only possible for non-fixed profiles + + + + + + + This operation lists all existing video source configurations for a + device. The client need not know anything about the video source configurations in order to + use the command. + + + + + + This operation lists all existing video encoder configurations of a + device. This command lists all configured video encoder configurations in a device. The + client need not know anything apriori about the video encoder configurations in order to use + the command. + + + + + + This operation lists all existing audio source configurations of a device. + This command lists all audio source configurations in a device. The client need not know + anything apriori about the audio source configurations in order to use the command. + + + + + + This operation lists all existing device audio encoder configurations. The + client need not know anything apriori about the audio encoder configurations in order to use + the command. + + + + + + This operation lists all video analytics configurations of a device. This + command lists all configured video analytics in a device. The client need not know anything + apriori about the video analytics in order to use the command. + + + + + + This operation lists all existing metadata configurations. The client need + not know anything apriori about the metadata in order to use the command. + + + + + + This command lists all existing AudioOutputConfigurations of a device. The + NVC need not know anything apriori about the audio configurations to use this command. + + + + + + This command lists all existing AudioDecoderConfigurations of a device. + The NVC need not know anything apriori about the audio decoder configurations in order to + use this command. + + + + + + If the video source configuration token is already known, the video source + configuration can be fetched through the GetVideoSourceConfiguration command. + + + + + + If the video encoder configuration token is already known, the encoder + configuration can be fetched through the GetVideoEncoderConfiguration command. + + + + + + The GetAudioSourceConfiguration command fetches the audio source + configurations if the audio source configuration token is already known. An + + + + + + The GetAudioEncoderConfiguration command fetches the encoder configuration + if the audio encoder configuration token is known. + + + + + + The GetVideoAnalyticsConfiguration command fetches the video analytics + configuration if the video analytics token is known. + + + + + + The GetMetadataConfiguration command fetches the metadata configuration if + the metadata token is known. + + + + + + If the audio output configuration token is already known, the output + configuration can be fetched through the GetAudioOutputConfiguration command. + + + + + + If the audio decoder configuration token is already known, the decoder + configuration can be fetched through the GetAudioDecoderConfiguration command. + + + + + + + This operation lists all the video encoder configurations of the device + that are compatible with a certain media profile. Each of the returned configurations shall + be a valid input parameter for the AddVideoEncoderConfiguration command on the media + profile. The result will vary depending on the capabilities, configurations and settings in + the device. + + + + + + This operation requests all the video source configurations of the device + that are compatible + with a certain media profile. Each of the returned configurations shall be a valid input + parameter for the AddVideoSourceConfiguration command on the media profile. The result + will vary depending on the capabilities, configurations and settings in the device. + + + + + + This operation requests all audio encoder configurations of a device that + are compatible with a certain media profile. Each of the returned configurations shall be a + valid input parameter for the AddAudioSourceConfiguration command on the media profile. The + result varies depending on the capabilities, configurations and settings in the device. + + + + + + This operation requests all audio source configurations of the device that + are compatible with a certain media profile. Each of the returned configurations shall be a + valid input parameter for the AddAudioEncoderConfiguration command on the media profile. The + result varies depending on the capabilities, configurations and settings in the device. + + + + + + This operation requests all video analytic configurations of the device + that are compatible with a certain media profile. Each of the returned configurations shall + be a valid input parameter for the AddVideoAnalyticsConfiguration command on the media + profile. The result varies depending on the capabilities, configurations and settings in the + device. + + + + + + This operation requests all the metadata configurations of the device that + are compatible with a certain media profile. Each of the returned configurations shall be a + valid input parameter for the AddMetadataConfiguration command on the media profile. The + result varies depending on the capabilities, configurations and settings in the device. + + + + + + This command lists all audio output configurations of a device that are + compatible with a certain media profile. Each returned configuration shall be a valid input + for the + AddAudioOutputConfiguration command. + + + + + + This operation lists all the audio decoder configurations of the device + that are compatible with a certain media profile. Each of the returned configurations shall + be a valid input parameter for the AddAudioDecoderConfiguration command on the media + profile. + + + + + + + This operation modifies a video source configuration. The ForcePersistence + flag indicates if the changes shall remain after reboot of the device. Running streams using + this configuration may be immediately updated according to the new settings. The changes are + not guaranteed to take effect unless the client requests a new stream URI and restarts any + affected stream. NVC methods for changing a running stream are out of scope for this + specification. + + + + + + This operation modifies a video encoder configuration. The + ForcePersistence flag indicates if the changes shall remain after reboot of the device. + Changes in the Multicast settings shall always be persistent. Running streams using this + configuration may be immediately updated according to the new settings. The changes are not + guaranteed to take effect unless the client requests a new stream URI and restarts any + affected stream. NVC methods for changing a running stream are out of scope for this + specification.
SessionTimeout is provided as a hint for keeping rtsp session by a + device. If necessary the device may adapt parameter values for SessionTimeout elements + without returning an error. For the time between keep alive calls the client shall adhere to + the timeout value signaled via RTSP. +
+ + +
+ + This operation modifies an audio source configuration. The + ForcePersistence flag indicates if + the changes shall remain after reboot of the device. Running streams using this + configuration + may be immediately updated according to the new settings. The changes are not guaranteed + to take effect unless the client requests a new stream URI and restarts any affected stream + NVC methods for changing a running stream are out of scope for this specification. + + + + + + This operation modifies an audio encoder configuration. The + ForcePersistence flag indicates if + the changes shall remain after reboot of the device. Running streams using this + configuration may be immediately updated + according to the new settings. The changes are not guaranteed to take effect unless the + client + requests a new stream URI and restarts any affected streams. NVC methods for changing a + running stream are out of scope for this specification. + + + + + + A video analytics configuration is modified using this command. The + ForcePersistence flag + indicates if the changes shall remain after reboot of the device or not. Running streams + using + this configuration shall be immediately updated according to the new settings. Otherwise + inconsistencies can occur between the scene description processed by the rule engine and + the notifications produced by analytics engine and rule engine which reference the very same + video analytics configuration token. + + + + + + This operation modifies a metadata configuration. The ForcePersistence + flag indicates if the + changes shall remain after reboot of the device. Changes in the Multicast settings shall + always be persistent. Running streams using this configuration may be updated immediately + according to the new settings. The changes are not guaranteed to take effect unless the + client + requests a new stream URI and restarts any affected streams. NVC methods for changing a + running stream are out of scope for this specification. + + + + + + This operation modifies an audio output configuration. The + ForcePersistence flag indicates if + the changes shall remain after reboot of the device. + + + + + + This operation modifies an audio decoder configuration. The + ForcePersistence flag indicates if + the changes shall remain after reboot of the device. + + + + + + + This operation returns the available options (supported values and ranges + for video source configuration parameters) when the video source parameters are + reconfigured If a video source configuration is specified, the options shall concern that + particular configuration. If a media profile is specified, the options shall be compatible + with + that media profile. + + + + + + This operation returns the available options (supported values and ranges + for video encoder + configuration parameters) when the video encoder parameters are reconfigured. +
+ For JPEG, MPEG4 and H264 extension elements have been defined that provide additional + information. A device must provide the + XxxOption information for all encodings supported and should additionally provide the + corresponding XxxOption2 information. +
+ This response contains the available video encoder configuration options. If a video encoder + configuration is specified, + the options shall concern that particular configuration. If a media profile is specified, + the options shall be + compatible with that media profile. If no tokens are specified, the options shall be + considered generic for the device. +
+ + +
+ + This operation returns the available options (supported values and ranges + for audio source configuration parameters) when the audio source parameters are + reconfigured. If an audio source configuration is specified, the options shall concern that + particular configuration. If a media profile is specified, the options shall be compatible + with + that media profile. + + + + + + This operation returns the available options (supported values and ranges + for audio encoder configuration parameters) when the audio encoder parameters are + reconfigured. + + + + + + This operation returns the available options (supported values and ranges + for metadata configuration parameters) for changing the metadata configuration. + + + + + + This operation returns the available options (supported values and ranges + for audio output configuration parameters) for configuring an audio output. + + + + + + This command list the audio decoding capabilities for a given profile and + configuration of a + device. + + + + + + + The GetGuaranteedNumberOfVideoEncoderInstances command can be used to + request the + minimum number of guaranteed video encoder instances (applications) per Video Source + Configuration. + + + + + + + This operation requests a URI that can be used to initiate a live media + stream using RTSP as + the control protocol. The returned URI shall remain valid indefinitely even if the profile + is + changed. The ValidUntilConnect, ValidUntilReboot and Timeout Parameter shall be set + accordingly (ValidUntilConnect=false, ValidUntilReboot=false, timeout=PT0S). +
+ The correct syntax for the StreamSetup element for these media stream setups defined in + 5.1.1 of the streaming specification are as follows: +
    +
  1. RTP unicast over UDP: StreamType = "RTP_unicast", TransportProtocol = "UDP"
  2. +
  3. RTP over RTSP over HTTP over TCP: StreamType = "RTP_unicast", TransportProtocol = + "HTTP" +
  4. +
  5. RTP over RTSP over TCP: StreamType = "RTP_unicast", TransportProtocol = "RTSP"
  6. +
+
+ If a multicast stream is requested the VideoEncoderConfiguration, AudioEncoderConfiguration + and MetadataConfiguration element inside the corresponding + media profile must be configured with valid multicast settings. +
+ For full compatibility with other ONVIF services a device should not generate Uris longer + than + 128 octets. +
+ + +
+ + This command starts multicast streaming using a specified media profile of + a device. + Streaming continues until StopMulticastStreaming is called for the same Profile. The + streaming shall continue after a reboot of the device until a StopMulticastStreaming request + is + received. The multicast address, port and TTL are configured in the + VideoEncoderConfiguration, AudioEncoderConfiguration and MetadataConfiguration + respectively. + + + + + + This command stop multicast streaming using a specified media profile of a + device + + + + + + Synchronization points allow clients to decode and correctly use all data + after the + synchronization point. + For example, if a video stream is configured with a large I-frame distance and a client + loses a + single packet, the client does not display video until the next I-frame is transmitted. In + such + cases, the client can request a Synchronization Point which enforces the device to add an + I-Frame as soon as possible. Clients can request Synchronization Points for profiles. The + device + shall add synchronization points for all streams associated with this profile. + Similarly, a synchronization point is used to get an update on full PTZ or event status + through + the metadata stream. + If a video stream is associated with the profile, an I-frame shall be added to this video + stream. + If a PTZ metadata stream is associated to the profile, + the PTZ position shall be repeated within the metadata stream. + + + + + + A client uses the GetSnapshotUri command to obtain a JPEG snapshot from + the + device. The returned URI shall remain valid indefinitely even if the profile is changed. The + ValidUntilConnect, ValidUntilReboot and Timeout Parameter shall be set accordingly + (ValidUntilConnect=false, ValidUntilReboot=false, timeout=PT0S). The URI can be used for + acquiring a JPEG image through a HTTP GET operation. The image encoding will always be + JPEG regardless of the encoding setting in the media profile. The Jpeg settings + (like resolution or quality) may be taken from the profile if suitable. The provided + image will be updated automatically and independent from calls to GetSnapshotUri. + + + + + + A device returns the information for current video source mode and + settable video source modes of specified video source. A device that indicates a capability + of VideoSourceModes shall support this command. + + + + + + SetVideoSourceMode changes the media profile structure relating to video + source for the specified video source mode. A device that indicates a capability of + VideoSourceModes shall support this command. The behavior after changing the mode is not + defined in this specification. + + + + + + + Get the OSDs. + + + + + Get the OSD. + + + + + Get the OSD Options. + + + + + Set the OSD + + + + + Create the OSD. + + + + + Delete the OSD. + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/onvif-ws-client/src/main/resources/wsdl/ptz_2.5.wsdl b/onvif-ws-client/src/main/resources/wsdl/ptz_2.5.wsdl new file mode 100644 index 0000000..e974235 --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/ptz_2.5.wsdl @@ -0,0 +1,1393 @@ + + + + + + + + + + + + + + + + + + + + The capabilities for the PTZ service is returned in the + Capabilities element. + + + + + + + + + + + + + + Indicates whether or not EFlip is supported. + + + + + Indicates whether or not reversing of PT control direction is + supported. + + + + + + Indicates support for the GetCompatibleConfigurations command. + + + + + + Indicates that the PTZVector includes MoveStatus information. + + + + + + Indicates that the PTZVector includes Position information. + + + + + + + + + + + + + + + + A list of the existing PTZ Nodes on the device. + + + + + + + + + + + + + Token of the requested PTZNode. + + + + + + + + + + + + A requested PTZNode. + + + + + + + + + + + + + + + + A list of all existing PTZConfigurations on the device. + + + + + + + + + + + + + Token of the requested PTZConfiguration. + + + + + + + + + + + + A requested PTZConfiguration. + + + + + + + + + + + + + + + + + + + Flag that makes configuration persistent. Example: User wants the + configuration to exist after reboot. + + + + + + + + + + + + + + + + + + Token of an existing configuration that the options are intended + for. + + + + + + + + + + + + The requested PTZ configuration options. + + + + + + + + + + + + + A reference to the MediaProfile where the operation should take + place. + + + + + + The Auxiliary request data. + + + + + + + + + + + + The response contains the auxiliary response. + + + + + + + + + + + + + A reference to the MediaProfile where the operation should take + place. + + + + + + + + + + + + A list of presets which are available for the requested + MediaProfile. + + + + + + + + + + + + + A reference to the MediaProfile where the operation should take + place. + + + + + + A requested preset name. + + + + + + A requested preset token. + + + + + + + + + + + + A token to the Preset which has been set. + + + + + + + + + + + + + A reference to the MediaProfile where the operation should take + place. + + + + + + A requested preset token. + + + + + + + + + + + + + + + + A reference to the MediaProfile where the operation should take + place. + + + + + + A requested preset token. + + + + + + A requested speed.The speed parameter can only be specified when + Speed Spaces are available for the PTZ Node. + + + + + + + + + + + + + + + + A reference to the MediaProfile where the PTZStatus should be + requested. + + + + + + + + + + + + The PTZStatus for the requested MediaProfile. + + + + + + + + + + + + + A reference to the MediaProfile where the operation should take + place. + + + + + + A requested speed.The speed parameter can only be specified when + Speed Spaces are available for the PTZ Node. + + + + + + + + + + + + + + + + + + A reference to the MediaProfile where the home position should be + set. + + + + + + + + + + + + + + + + + + A reference to the MediaProfile. + + + + + + A Velocity vector specifying the velocity of pan, tilt and zoom. + + + + + + An optional Timeout parameter. + + + + + + + + + + + + + + + + + + A reference to the MediaProfile. + + + + + + A positional Translation relative to the current position + + + + + + An optional Speed parameter. + + + + + + + + + + + + + + + + + + A reference to the MediaProfile. + + + + + + A Position vector specifying the absolute target position. + + + + + + An optional Speed. + + + + + + + + + + + + + + + + + + A reference to the MediaProfile that indicate what should be + stopped. + + + + + + Set true when we want to stop ongoing pan and tilt movements.If + PanTilt arguments are not present, this command stops these movements. + + + + + + Set true when we want to stop ongoing zoom movement.If Zoom + arguments are not present, this command stops ongoing zoom movement. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Contains the token of an existing media profile the configurations + shall be compatible with. + + + + + + + + + + + + A list of all existing PTZConfigurations on the NVT that is + suitable to be added to the addressed media profile. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the capabilities of the PTZ service. The result is returned in a + typed answer. + + + + + + + Get the descriptions of the available PTZ Nodes. +
+ A PTZ-capable device may have multiple PTZ Nodes. The PTZ Nodes may represent + mechanical PTZ drivers, uploaded PTZ drivers or digital PTZ drivers. PTZ Nodes are the + lowest level entities in the PTZ control API and reflect the supported PTZ capabilities. The + PTZ Node is referenced either by its name or by its reference token. +
+ + +
+ + Get a specific PTZ Node identified by a reference + token or a name. + + + + + + Get a specific PTZonfiguration from the device, identified by its + reference token or name. +
+ The default Position/Translation/Velocity Spaces are introduced to allow NVCs sending move + requests without the need to specify a certain coordinate system. The default Speeds are + introduced to control the speed of move requests (absolute, relative, preset), where no + explicit speed has been set. +
+ The allowed pan and tilt range for Pan/Tilt Limits is defined by a two-dimensional space + range + that is mapped to a specific Absolute Pan/Tilt Position Space. At least one Pan/Tilt + Position + Space is required by the PTZNode to support Pan/Tilt limits. The limits apply to all + supported + absolute, relative and continuous Pan/Tilt movements. The limits shall be checked within the + coordinate system for which the limits have been specified. That means that even if + movements are specified in a different coordinate system, the requested movements shall be + transformed to the coordinate system of the limits where the limits can be checked. When a + relative or continuous movements is specified, which would leave the specified limits, the + PTZ + unit has to move along the specified limits. The Zoom Limits have to be interpreted + accordingly. +
+ + +
+ + + Get all the existing PTZConfigurations from the device. +
+ The default Position/Translation/Velocity Spaces are introduced to allow NVCs sending move + requests without the need to specify a certain coordinate system. The default Speeds are + introduced to control the speed of move requests (absolute, relative, preset), where no + explicit speed has been set. +
+ The allowed pan and tilt range for Pan/Tilt Limits is defined by a two-dimensional space + range + that is mapped to a specific Absolute Pan/Tilt Position Space. At least one Pan/Tilt + Position + Space is required by the PTZNode to support Pan/Tilt limits. The limits apply to all + supported + absolute, relative and continuous Pan/Tilt movements. The limits shall be checked within the + coordinate system for which the limits have been specified. That means that even if + movements are specified in a different coordinate system, the requested movements shall be + transformed to the coordinate system of the limits where the limits can be checked. When a + relative or continuous movements is specified, which would leave the specified limits, the + PTZ + unit has to move along the specified limits. The Zoom Limits have to be interpreted + accordingly. +
+ + +
+ + + Set/update a existing PTZConfiguration on the device. + + + + + + + List supported coordinate systems including their range limitations. Therefore, the options + MAY differ depending on whether the PTZ Configuration is assigned to a Profile containing a + Video Source Configuration. In that case, the options may additionally contain coordinate + systems referring to the image coordinate system described by the Video Source + Configuration. If the PTZ Node supports continuous movements, it shall return a Timeout + Range within + which Timeouts are accepted by the PTZ Node. + + + + + + + Operation to send auxiliary commands to the PTZ device + mapped by the PTZNode in the selected profile. The + operation is supported + if the AuxiliarySupported element of the PTZNode is true + + + + + + + Operation to request all PTZ presets for the PTZNode + in the selected profile. The operation is supported if there is support + for at least on PTZ preset by the PTZNode. + + + + + + + The SetPreset command saves the current device position parameters so that the device can + move to the saved preset position through the GotoPreset operation. + In order to create a new preset, the SetPresetRequest contains no PresetToken. If creation + is + successful, the Response contains the PresetToken which uniquely identifies the Preset. An + existing Preset can be overwritten by specifying the PresetToken of the corresponding + Preset. + In both cases (overwriting or creation) an optional PresetName can be specified. The + operation fails if the PTZ device is moving during the SetPreset operation. + The device MAY internally save additional states such as imaging properties in the PTZ + Preset which then should be recalled in the GotoPreset operation. + + + + + + + Operation to remove a PTZ preset for the Node in + the + selected profile. The operation is supported if the + PresetPosition + capability exists for teh Node in the + selected profile. + + + + + + + Operation to go to a saved preset position for the + PTZNode in the selected profile. The operation is supported if there is + support for at least on PTZ preset by the PTZNode. + + + + + + + Operation to move the PTZ device to it's "home" position. The operation is + supported if the HomeSupported element in the PTZNode is true. + + + + + + Operation to save current position as the home position. + The SetHomePosition command returns with a failure if the “home” position is fixed and + cannot be overwritten. If the SetHomePosition is successful, it is possible to recall the + Home Position with the GotoHomePosition command. + + + + + + Operation for continuous Pan/Tilt and Zoom movements. The operation is + supported if the PTZNode supports at least one continuous Pan/Tilt or Zoom space. If the + space argument is omitted, the default space set by the PTZConfiguration will be used. + + + + + + Operation for Relative Pan/Tilt and Zoom Move. The operation is supported + if the PTZNode supports at least one relative Pan/Tilt or Zoom space. +
+ The speed argument is optional. If an x/y speed value is given it is up to the device to + either use + the x value as absolute resoluting speed vector or to map x and y to the component speed. + If the speed argument is omitted, the default speed set by the PTZConfiguration will be + used. +
+ + +
+ + + Operation to request PTZ status for the Node in the + selected profile. + + + + + + Operation to move pan,tilt or zoom to a absolute destination. +
+ The speed argument is optional. If an x/y speed value is given it is up to the device to + either use + the x value as absolute resoluting speed vector or to map x and y to the component speed. + If the speed argument is omitted, the default speed set by the PTZConfiguration will be + used. +
+ + +
+ + Operation to stop ongoing pan, tilt and zoom movements of absolute + relative and continuous type. + If no stop argument for pan, tilt or zoom is set, the device will stop all ongoing pan, tilt + and zoom movements. + + + + + + Operation to request PTZ preset tours in the selected media profiles. + + + + + + Operation to request a specific PTZ preset tour in the selected media + profile. + + + + + + Operation to request available options to configure PTZ preset tour. + + + + + + Operation to create a preset tour for the selected media profile. + + + + + + Operation to modify a preset tour for the selected media profile. + + + + + + Operation to perform specific operation on the preset tour in selected + media profile. + + + + + + Operation to delete a specific preset tour from the media profile. + + + + + + Operation to get all available PTZConfigurations that can be added to the + referenced media profile. +
+ A device providing more than one PTZConfiguration or more than one VideoSourceConfiguration + or which has any other resource + interdependency between PTZConfiguration entities and other resources listable in a media + profile should implement this operation. + PTZConfiguration entities returned by this operation shall not fail on adding them to the + referenced media profile. +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/onvif-ws-client/src/main/resources/wsdl/receiver_2.1.1.wsdl b/onvif-ws-client/src/main/resources/wsdl/receiver_2.1.1.wsdl new file mode 100644 index 0000000..b7c0687 --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/receiver_2.1.1.wsdl @@ -0,0 +1,423 @@ + + + + + + + + + + + + + + + + + + + + The capabilities for the receiver service is returned in the + Capabilities element. + + + + + + + + + + + + + + Indicates that the device can receive RTP multicast streams. + + + + + + Indicates that the device can receive RTP/TCP streams + + + + + + Indicates that the device can receive RTP/RTSP/TCP streams. + + + + + + The maximum number of receivers supported by the device. + + + + + + The maximum allowed length for RTSP URIs (Minimum and default value is + 128 octet). + + + + + + + + + + + + + + + + + + + A list of all receivers that currently exist on the device. + + + + + + + + + + + + The token of the receiver to be retrieved. + + + + + + + + + + + The details of the receiver. + + + + + + + + + + + The initial configuration for the new receiver. + + + + + + + + + + + The details of the receiver that was created. + + + + + + + + + + + The token of the receiver to be deleted. + + + + + + + + + + + + + + + + + The token of the receiver to be configured. + + + + + The new configuration for the receiver. + + + + + + + + + + + + + + + + + The token of the receiver to be changed. + + + + + The new receiver mode. Options available are: + + + + + + + + + + + + + + + + + The token of the receiver to be queried. + + + + + + + + + + + Description of the current receiver state. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the capabilities of the receiver service. The result is returned + in a typed answer. + + + + + + + Lists all receivers currently present on a device. This operation is mandatory. + + + + + + + Retrieves the details of a specific receiver. This operation is mandatory. + + + + + + + Creates a new receiver. This operation is mandatory, although the service may + raise a fault if the receiver cannot be created. + + + + + + + Deletes an existing receiver. A receiver may be deleted only if it is not + currently in use; otherwise a fault shall be raised. + This operation is mandatory. + + + + + + + Configures an existing receiver. This operation is mandatory. + + + + + + + Sets the mode of the receiver without affecting the rest of its configuration. + This operation is mandatory. + + + + + + + Determines whether the receiver is currently disconnected, connected or + attempting to connect. + This operation is mandatory. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/onvif-ws-client/src/main/resources/wsdl/recording_2.5.wsdl b/onvif-ws-client/src/main/resources/wsdl/recording_2.5.wsdl new file mode 100644 index 0000000..5579dca --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/recording_2.5.wsdl @@ -0,0 +1,1239 @@ + + + + + + + + + + + + + + + + + + + + The capabilities for the recording service is returned in the + Capabilities element. + + + + + + + + + + + + + + Indication if the device supports dynamic creation and deletion of + recordings + + + + + + Indication if the device supports dynamic creation and deletion of + tracks + + + + + + Indication which encodings are supported for recording. The list may + contain one or more enumeration values of tt:VideoEncoding and tt:AudioEncoding. If + device does not support audio recording tt:AudioEncoding shall not be listed. + + + + + + Maximum supported bit rate for all tracks of a recording in kBit/s. + + + + + + Maximum supported bit rate for all recordings in kBit/s. + + + + + + Maximum number of recordings supported. (Integer values only.) + + + + + + Maximum total number of supported recording jobs by the device. + + + + + + Indication if the device supports the GetRecordingOptions command. + + + + + + Indication if the device supports recording metadata. + + + + + + + Indication that the device supports ExportRecordedData command for the listed export + file formats. + The list shall return at least one export file format value. The value of 'ONVIF' + refers to + ONVIF Export File Format specification. + + + + + + + + + + + + + + + + Initial configuration for the recording. + + + + + + + + + + + The reference to the created recording. + + + + + + + + + + + The reference of the recording to be deleted. + + + + + + + + + + + + + + + + + + + + + + + List of recording items. + + + + + + + + + + + Token of the recording that shall be changed. + + + + + The new configuration. + + + + + + + + + + + + + + + + + Token of the configuration to be retrieved. + + + + + + + + + + + Configuration of the recording. + + + + + + + + + + + Identifies the recording to which a track shall be added. + + + + + + The configuration of the new track. + + + + + + + + + + + The TrackToken shall identify the newly created track. The + TrackToken shall be unique within the recoding to which + the new track belongs. + + + + + + + + + + + + Token of the recording the track belongs to. + + + + + Token of the track to be deleted. + + + + + + + + + + + + + + + + + Token of the recording the track belongs to. + + + + + Token of the track. + + + + + + + + + + + Configuration of the track. + + + + + + + + + + + Token of the recording the track belongs to. + + + + + Token of the track to be modified. + + + + + New configuration for the track. + + + + + + + + + + + + + + + + + The initial configuration of the new recording job. + + + + + + + + + + + + The JobToken shall identify the created recording job. + + + + + + + The JobConfiguration structure shall be the configuration as it is used by the + device. This may be different from the + JobConfiguration passed to CreateRecordingJob. + + + + + + + + + + + + The token of the job to be deleted. + + + + + + + + + + + + + + + + + + + + + + + List of recording jobs. + + + + + + + + + + + Token of the job to be modified. + + + + + New configuration of the recording job. + + + + + + + + + + + The JobConfiguration structure shall be the configuration + as it is used by the device. This may be different from the JobConfiguration + passed to SetRecordingJobConfiguration. + + + + + + + + + + + + Token of the recording job. + + + + + + + + + + + Current configuration of the recording job. + + + + + + + + + + + Token of the recording job. + + + + + The new mode for the recording job. + + + + + + + + + + + + + + + + + Token of the recording job. + + + + + + + + + + + The current state of the recording job. + + + + + + + + + + + Token of the recording. + + + + + + + + + + + Configuration of the recording. + + + + + + + + + + + + + Indicates the selection criterion on the existing recordings. . + + + + + + Indicates which export file format to be used. + + + + + Indicates the target storage and relative directory path. + + + + + + + + + + + + Unique operation token for client to associate the relevant + events. + + + + + + List of exported file names. The device can also use + AsyncronousOperationStatus event to publish this list. + + + + + + + + + Extensibility point. + + + + + + + + + + + + + + + Unique ExportRecordedData operation token + + + + + + + + + + + Progress percentage of ExportRecordedData operation. + + + + + + + + + + + Extensibility point. + + + + + + + + + + + + Unique ExportRecordedData operation token + + + + + + + + + + + Progress percentage of ExportRecordedData operation. + + + + + + + + + + + Extensibility point. + + + + + + + + + + + + + + + + + + Number of spare jobs that can be created for the recording. + + + + + + A device that supports recording of a restricted set of Media Service + Profiles returns the list of profiles that can be recorded on the given Recording. + + + + + + + + + Total spare number of tracks that can be added to this recording. + + + + + + Number of spare Video tracks that can be added to this recording. + + + + + + Number of spare Aduio tracks that can be added to this recording. + + + + + + Number of spare Metadata tracks that can be added to this recording. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the capabilities of the recording service. The result is returned + in a typed answer. + + + + + + CreateRecording shall create a new recording. The new recording shall be + created with a track + for each supported TrackType see Recording Control Spec. +
+ This method is optional. It shall be available if the Recording/DynamicRecordings capability + is TRUE. +
+ When successfully completed, CreateRecording shall have created three tracks with the + following configurations: +
    +
  • + TrackToken TrackType +
  • +
  • + VIDEO001 Video +
  • +
  • + AUDIO001 Audio +
  • +
  • + META001 Metadata +
  • +
+ All TrackConfigurations shall have the MaximumRetentionTime set to 0 (unlimited), and the + Description set to the empty string. +
+ + +
+ + DeleteRecording shall delete a recording object. Whenever a recording is + deleted, the device + shall delete all the tracks that are part of the recording, and it shall delete all the + Recording + Jobs that record into the recording. For each deleted recording job, the device shall also + delete all the receiver objects associated with the recording job that are automatically + created + using the AutoCreateReceiver field of the recording job configuration structure and are not + used in any other recording job. +
+ This method is optional. It shall be available if the Recording/DynamicRecordings capability + is TRUE. +
+ + +
+ + GetRecordings shall return a description of all the recordings in the + device. This description + shall include a list of all the tracks for each recording. + + + + + + SetRecordingConfiguration shall change the configuration of a recording. + + + + + + GetRecordingConfiguration shall retrieve the recording configuration for a + recording. + + + + + + GetRecordingOptions returns information for a recording identified by the + RecordingToken. The information includes the number of additonal tracks as well as recording + jobs that can be configured. + + + + + + This method shall create a new track within a recording. +
+ This method is optional. It shall be available if the Recording/DynamicTracks capability is + TRUE. +
+ A TrackToken in itself does not uniquely identify a specific track. Tracks within different + recordings may have the same TrackToken. +
+ + +
+ + DeleteTrack shall remove a track from a recording. All the data in the + track shall be deleted. +
+ This method is optional. It shall be available if the Recording/DynamicTracks capability is + TRUE. +
+ + +
+ + GetTrackConfiguration shall retrieve the configuration for a specific + track. + + + + + + SetTrackConfiguration shall change the configuration of a track. + + + + + + CreateRecordingJob shall create a new recording job. +
+ The JobConfiguration returned from CreateRecordingJob shall be identical to the + JobConfiguration passed into CreateRecordingJob, except for the ReceiverToken and the + AutoCreateReceiver. In the returned structure, the ReceiverToken shall be present and valid + and the AutoCreateReceiver field shall be omitted. +
+ + +
+ + DeleteRecordingJob removes a recording job. It shall also implicitly + delete all the receiver + objects associated with the recording job that are automatically created using the + AutoCreateReceiver field of the recording job configuration structure and are not used in + any + other recording job. + + + + + + GetRecordingJobs shall return a list of all the recording jobs in the + device. + + + + + + SetRecordingJobConfiguration shall change the configuration for a + recording job. +
+ SetRecordingJobConfiguration shall implicitly delete any receiver objects that were created + automatically if they are no longer used as a result of changing the recording job + configuration. +
+ + +
+ + GetRecordingJobConfiguration shall return the current configuration for a + recording job. + + + + + + SetRecordingJobMode shall change the mode of the recording job. Using this + method shall be + equivalent to retrieving the recording job configuration, and writing it back with a + different + mode. + + + + + + GetRecordingJobState returns the state of a recording job. It includes an + aggregated state, + and state for each track of the recording job. + + + + + + + + Exports the selected recordings (from existing recorded data) to the given storage target + based on the requested file format. + + + + + + + Stops the selected ExportRecordedData operation. + + + + + + + Retrieves the status of selected ExportRecordedData operation. + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/onvif-ws-client/src/main/resources/wsdl/remotediscovery_1.0.wsdl b/onvif-ws-client/src/main/resources/wsdl/remotediscovery_1.0.wsdl new file mode 100644 index 0000000..7574475 --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/remotediscovery_1.0.wsdl @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/onvif-ws-client/src/main/resources/wsdl/replay_2.2.1.wsdl b/onvif-ws-client/src/main/resources/wsdl/replay_2.2.1.wsdl new file mode 100644 index 0000000..70d4620 --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/replay_2.2.1.wsdl @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + The capabilities for the replay service is returned in the + Capabilities element. + + + + + + + + + + + + + + Indicator that the Device supports reverse playback as defined in the + ONVIF Streaming Specification. + + + + + + The list contains two elements defining the minimum and maximum valid + values supported as session timeout in seconds. + + + + + + Indicates support for RTP/RTSP/TCP. + + + + + + + + + + + + Specifies the connection parameters to be used for the stream. The + URI that is returned may depend on these parameters. + + + + + + The identifier of the recording to be streamed. + + + + + + + + + + + The URI to which the client should connect in order to stream the + recording. + + + + + + + + + + + + Description of the new replay configuration parameters. + + + + + + + + + + + + + + + + + + + + + + + + The current replay configuration parameters. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the capabilities of the replay service. The result is returned in + a typed answer. + + + + + + + Requests a URI that can be used to initiate playback of a recorded stream + using RTSP as the control protocol. The URI is valid only as it is + specified in the response. + This operation is mandatory. + + + + + + + Returns the current configuration of the replay service. + This operation is mandatory. + + + + + + + Changes the current configuration of the replay service. + This operation is mandatory. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/onvif-ws-client/src/main/resources/wsdl/search_2.4.2.wsdl b/onvif-ws-client/src/main/resources/wsdl/search_2.4.2.wsdl new file mode 100644 index 0000000..c416355 --- /dev/null +++ b/onvif-ws-client/src/main/resources/wsdl/search_2.4.2.wsdl @@ -0,0 +1,1038 @@ + + + + + + + + + + + + + + + + + + + + The capabilities for the search service is returned in the + Capabilities element. + + + + + + + + + + + + + + + Indicates support for general virtual property events in the + FindEvents method. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Scope defines the dataset to consider for this search. + + + + + + The search will be completed after this many matches. If not + specified, the search will continue until reaching the endpoint or until the + session expires. + + + + + + The time the search session will be kept alive after responding to + this and subsequent requests. A device shall support at least values up to ten + seconds. + + + + + + + + + + + + + + + + + Gets results from a particular recording listingession. + + + + + + + The search session to get results from. + + + + + The minimum number of results to return in one response. + + + + + + The maximum number of results to return in one response. + + + + + + The maximum time before responding to the request, even if the + MinResults parameter is not fulfilled. + + + + + + + + + + + + + + + + + Starts a search session and specifies the search parameters. + + + + + + + The point of time where the search will start. + + + + + The point of time where the search will stop. This can be a time + before the StartPoint, in which case the search is performed backwards in time. + + + + + + + + Setting IncludeStartState to true means that the server should + return virtual events representing the start state for any recording included in + the scope. Start state events are limited to the topics defined in the + SearchFilter that have the IsProperty flag set to true. + + + + + + The search will be completed after this many matches. If not + specified, the search will continue until reaching the endpoint or until the + session expires. + + + + + + The time the search session will be kept alive after responding to + this and subsequent requests. A device shall support at least values up to ten + seconds. + + + + + + + + + + + + A unique reference to the search session created by this + request. + + + + + + + + + + Gets results from a particular search session. + + + + + + The search session to get results from. + + + + + The minimum number of results to return in one response. + + + + + + The maximum number of results to return in one response. + + + + + + The maximum time before responding to the request, even if the + MinResults parameter is not fulfilled. + + + + + + + + + + + + + + + + + Starts a search session and specifies the search parameters. + + + + + + + The point of time where the search will start. + + + + + The point of time where the search will stop. This can be a time + before the StartPoint, in which case the search is performed backwards in time. + + + + + + + + The search will be completed after this many matches. If not + specified, the search will continue until reaching the endpoint or until the + session expires. + + + + + + The time the search session will be kept alive after responding to + this and subsequent requests. A device shall support at least values up to ten + seconds. + + + + + + + + + + + + A unique reference to the search session created by this + request. + + + + + + + + + + Gets results from a particular search session. + + + + + + The search session to get results from. + + + + + The minimum number of results to return in one response. + + + + + + The maximum number of results to return in one response. + + + + + + The maximum time before responding to the request, even if the + MinResults parameter is not fulfilled. + + + + + + + + + + + + + + + + + Starts a search session and specifies the search parameters. + + + + + + + The point of time where the search will start. + + + + + The point of time where the search will stop. This can be a time + before the StartPoint, in which case the search is performed backwards in time. + + + + + + + + The search will be completed after this many matches. If not + specified, the search will continue until reaching the endpoint or until the + session expires. + + + + + + The time the search session will be kept alive after responding to + this and subsequent requests. A device shall support at least values up to ten + seconds. + + + + + + + + + + + + A unique reference to the search session created by this + request. + + + + + + + + + + Gets results from a particular search session. + + + + + + The search session to get results from. + + + + + The minimum number of results to return in one response. + + + + + + The maximum number of results to return in one response. + + + + + + The maximum time before responding to the request, even if the + MinResults parameter is not fulfilled. + + + + + + + + + + + + + + + + + Returns the state of an ongoing search session. + + + + + + The search session to get the state from. + + + + + + + + + + + + + + + + Ends an ongoing search session, freeing any resources. + + + + + + + The search session to end. + + + + + + + + + + + The point of time the search had reached when it was ended. It is + equal to the EndPoint specified in Find-operation if the search was completed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the capabilities of the search service. The result is returned in + a typed answer. + + + + + + + GetRecordingSummary is used to get a summary description of all recorded + data. This + operation is mandatory to support for a device implementing the recording search service. + + + + + + + Returns information about a single Recording specified by a + RecordingToken. This operation + is mandatory to support for a device implementing the recording search service. + + + + + + + Returns a set of media attributes for all tracks of the specified + recordings at a specified point + in time. Clients using this operation shall be able to use it as a non blocking operation. A + device shall set the starttime and endtime of the MediaAttributes structure to equal values + if + calculating this range would causes this operation to block. See MediaAttributes structure + for + more information. This operation is mandatory to support for a device implementing the + recording search service. + + + + + + + FindRecordings starts a search session, looking for recordings that + matches the scope (See + 20.2.4) defined in the request. Results from the search are acquired using the + GetRecordingSearchResults request, specifying the search token returned from this request. + The device shall continue searching until one of the following occurs: +
    +
  • The entire time range from StartPoint to EndPoint has been searched through.
  • +
  • The total number of matches has been found, defined by the MaxMatches parameter.
  • +
  • The session has been ended by a client EndSession request.
  • +
  • The session has been ended because KeepAliveTime since the last request related to + this session has expired. +
  • +
+ The order of the results is undefined, to allow the device to return results in any order + they + are found. This operation is mandatory to support for a device implementing the recording + search service. +
+ + +
+ + + GetRecordingSearchResults acquires the results from a recording search + session previously + initiated by a FindRecordings operation. The response shall not include results already + returned in previous requests for the same session. If MaxResults is specified, the response + shall not contain more than MaxResults results. The number of results relates to the number + of recordings. + For viewing individual recorded data for a signal track use the FindEvents method. +
+ GetRecordingSearchResults shall block until: +
    +
  • + MaxResults results are available for the response if MaxResults is specified. +
  • +
  • MinResults results are available for the response if MinResults is specified.
  • +
  • WaitTime has expired.
  • +
  • Search is completed or stopped.
  • +
+ This operation is mandatory to support for a device implementing the recording search + service. +
+ + +
+ + + FindEvents starts a search session, looking for recording events (in the + scope that + matches the search filter defined in the request. Results from the search are + acquired using the GetEventSearchResults request, specifying the search token returned from + this request. +
+ The device shall continue searching until one of the following occurs: +
    +
  • + The entire time range from StartPoint to EndPoint has been searched through. +
  • +
  • The total number of matches has been found, defined by the MaxMatches parameter.
  • +
  • The session has been ended by a client EndSession request.
  • +
  • The session has been ended because KeepAliveTime since the last request related to + this session has expired. +
  • +
+ Results shall be ordered by time, ascending in case of forward search, or descending in case + of backward search. This operation is mandatory to support for a device implementing the + recording search service. +
+ + +
+ + + GetEventSearchResults acquires the results from a recording event search + session previously + initiated by a FindEvents operation. The response shall not include results already returned + in + previous requests for the same session. If MaxResults is specified, the response shall not + contain more than MaxResults results. +
+ GetEventSearchResults shall block until: +
    +
  • + MaxResults results are available for the response if MaxResults is specified. +
  • +
  • MinResults results are available for the response if MinResults is specified.
  • +
  • WaitTime has expired.
  • +
  • Search is completed or stopped.
  • +
+ This operation is mandatory to support for a device implementing the recording search + service. +
+ + +
+ + + FindPTZPosition starts a search session, looking for ptz positions in the + scope (See 20.2.4) + that matches the search filter defined in the request. Results from the search are acquired + using the GetPTZPositionSearchResults request, specifying the search token returned from + this request. +
+ The device shall continue searching until one of the following occurs: +
    +
  • + The entire time range from StartPoint to EndPoint has been searched through. +
  • +
  • The total number of matches has been found, defined by the MaxMatches parameter.
  • +
  • The session has been ended by a client EndSession request.
  • +
  • The session has been ended because KeepAliveTime since the last request related to + this session has expired. +
  • +
+ This operation is mandatory to support whenever CanContainPTZ is true for any metadata + track in any recording on the device. +
+ + +
+ + + GetPTZPositionSearchResults acquires the results from a ptz position + search session + previously initiated by a FindPTZPosition operation. The response shall not include results + already returned in previous requests for the same session. If MaxResults is specified, the + response shall not contain more than MaxResults results. +
+ GetPTZPositionSearchResults shall block until: +
    +
  • + MaxResults results are available for the response if MaxResults is specified. +
  • +
  • MinResults results are available for the response if MinResults is specified.
  • +
  • WaitTime has expired.
  • +
  • Search is completed or stopped.
  • +
+ This operation is mandatory to support whenever CanContainPTZ is true for any metadata + track in any recording on the device. +
+ + +
+ + + GetSearchState returns the current state of the specified search session. + This command is deprecated . + + + + + + + EndSearch stops and ongoing search session, causing any blocking result + request to return + and the SearchToken to become invalid. If the search was interrupted before completion, the + point in time that the search had reached shall be returned. If the search had not yet + begun, + the StartPoint shall be returned. If the search was completed the original EndPoint supplied + by the Find operation shall be returned. When issuing EndSearch on a FindRecordings request + the + EndPoint is undefined and shall not be used since the FindRecordings request doesn't have + StartPoint/EndPoint. This operation is mandatory to support for a device implementing the + recording search service. + + + + + + + FindMetadata starts a search session, looking for metadata in the scope + (See 20.2.4) that + matches the search filter defined in the request. Results from the search are acquired using + the GetMetadataSearchResults request, specifying the search token returned from this + request. +
+ The device shall continue searching until one of the following occurs: +
    +
  • + The entire time range from StartPoint to EndPoint has been searched through. +
  • +
  • The total number of matches has been found, defined by the MaxMatches parameter.
  • +
  • The session has been ended by a client EndSession request.
  • +
  • The session has been ended because KeepAliveTime since the last request related to + this session has expired. +
  • +
+ This operation is mandatory to support if the MetaDataSearch capability is set to true in + the + SearchCapabilities structure return by the GetCapabilities command in the Device service. +
+ + +
+ + + GetMetadataSearchResults acquires the results from a recording search + session previously + initiated by a FindMetadata operation. The response shall not include results already + returned + in previous requests for the same session. If MaxResults is specified, the response shall + not + contain more than MaxResults results. +
+ GetMetadataSearchResults shall block until: +
    +
  • + MaxResults results are available for the response if MaxResults is specified. +
  • +
  • MinResults results are available for the response if MinResults is specified.
  • +
  • WaitTime has expired.
  • +
  • Search is completed or stopped.
  • +
+ This operation is mandatory to support if the MetaDataSearch capability is set to true in + the + SearchCapabilities structure return by the GetCapabilities command in the Device service. +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..36d9e09 --- /dev/null +++ b/pom.xml @@ -0,0 +1,82 @@ + + 4.0.0 + org.onvif + onvif + 1.0-SNAPSHOT + pom + + + 1.8 + 3.3.2 + 3.0.0 + 1.2.0 + 2.3.1 + 8 + + 3.8.1 + UTF-8 + + + + onvif-ws-client + onvif-java + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + + ${java.release} + + + ${java.version} + ${java.version} + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + ${checkstyle-maven-plugin.version} + + google_checks.xml + + + + + check + + + + + + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + ${checkstyle-maven-plugin.version} + + google_checks.xml + + + + + + + + internal + file://${project.build.directory}/mvn-repo + + + + \ No newline at end of file