Skip to content

Instantly share code, notes, and snippets.

@erwinchang
Last active February 24, 2017 08:55
Show Gist options
  • Save erwinchang/e24d24847741c1cfcb1bb4e2b14017a2 to your computer and use it in GitHub Desktop.
Save erwinchang/e24d24847741c1cfcb1bb4e2b14017a2 to your computer and use it in GitHub Desktop.
使用curl測試ONVIF

onvif

  • test1
curl 10.0.0.141:80/onvif/device_service -d '<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GetSystemDateAndTime xmlns="http://www.onvif.org/ver10/device/wsdl"/></s:Body></s:Envelope>'

onvif-getsystemdateandtime

  • response
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsrf-bf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsdd="http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01" xmlns:wsrf-r="http://docs.oasis-open.org/wsrf/r-2" xmlns:tanae="http://www.onvif.org/ver20/analytics/wsdl/AnalyticsEngineBinding" xmlns:tanre="http://www.onvif.org/ver20/analytics/wsdl/RuleEngineBinding" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tetcp="http://www.onvif.org/ver10/events/wsdl/CreatePullPointBinding" xmlns:tetnc="http://www.onvif.org/ver10/events/wsdl/NotificationConsumerBinding" xmlns:tetpp="http://www.onvif.org/ver10/events/wsdl/PullPointBinding" xmlns:tetps="http://www.onvif.org/ver10/events/wsdl/PausableSubscriptionManagerBinding" xmlns:tev1="http://www.onvif.org/ver10/events/wsdl/NotificationProducerBinding" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tev2="http://www.onvif.org/ver10/events/wsdl/EventBinding" xmlns:tev3="http://www.onvif.org/ver10/events/wsdl/SubscriptionManagerBinding" xmlns:tev4="http://www.onvif.org/ver10/events/wsdl/PullPointSubscriptionBinding" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ter="http://www.onvif.org/ver10/error"><SOAP-ENV:Body><tds:GetSystemDateAndTimeResponse><tds:SystemDateAndTime><tt:DateTimeType>Manual</tt:DateTimeType><tt:DaylightSavings>false</tt:DaylightSavings><tt:TimeZone><tt:TZ>CST-8</tt:TZ></tt:TimeZone><tt:UTCDateTime><tt:Time><tt:Hour>12</tt:Hour><tt:Minute>48</tt:Minute><tt:Second>18</tt:Second></tt:Time><tt:Date><tt:Year>2017</tt:Year><tt:Month>2</tt:Month><tt:Day>24</tt:Day></tt:Date></tt:UTCDateTime><tt:LocalDateTime><tt:Time><tt:Hour>20</tt:Hour><tt:Minute>48</tt:Minute><tt:Second>18</tt:Second></tt:Time><tt:Date><tt:Year>2017</tt:Year><tt:Month>2</tt:Month><tt:Day>24</tt:Day></tt:Date></tt:LocalDateTime></tds:SystemDateAndTime></tds:GetSystemDateAndTimeResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

onvif-getsystemdateandtime

參考來源

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment