前言
对接萤石云,当服务器端接收到发送请求GetVideoEncoderConfigurationOptions,GetVideoEncoderConfigurationOptionsResponse,ImagingOptions,服务器必须按照下方请求回复,否则萤石云会主动断开连接
请求报文
1)POST /onvif/media_service HTTP/1.1
HOST: 192.168.58.173
User-Agent: HTTP_USER_AGENT
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*.*;q=0.8
Accept-Language: ZH-cn;zh;q=0.5
Accept-Charset: gb2312,utf8;q=0.7,*;q=0.7
Authorization: Basic YWRtaW46YWRtaW4=
Content-Type: application/soap+xml; charset="utf-8"
Content-Length: 1178
<?xml version="1.0" encoding="UTF-8" ?>
<soap:Envelope xmlns:soap="http:///2003/05/soap-envelope" xmlns:trt="http:///ver10/media/wsdl">
<soap:Header>
<wsse:Security soap:mustUnderstand="true" xmlns:wsse="http:///wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-35" xmlns:wsu="http:///wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>admin</wsse:Username>
<wsse:Password Type="http:///wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">nT8esG2hUP7Flya4Olpp7GEkqgg=</wsse:Password>
<wsse:Nonce EncodingType="http:///wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">XtakLm3DSu6tkQDcoGpnSA==</wsse:Nonce>
<wsu:Created>2020-05-06T07:01:35Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</soap:Header>
<soap:Body>
<trt:GetVideoEncoderConfigurationOptions>
<trt:ConfigurationToken>VideoEncoderConfigurationToken_1</trt:ConfigurationToken>
<trt:ProfileToken>ProfileToken_1</trt:ProfileToken>
</trt:GetVideoEncoderConfigurationOptions>
</soap:Body>
</soap:Envelope>
<soap:Body>
<trt:GetVideoEncoderConfigurationOptions>
<trt:ConfigurationToken>
VideoEncoderConfigurationToken_1
</trt:ConfigurationToken>
<trt:ProfileToken>
ProfileToken_1
</trt:ProfileToken>
</trt:GetVideoEncoderConfigurationOptions>
</soap:Body>
2)
POST /onvif/Media HTTP/1.1
Host: 192.168.58.89
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 989
<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http:///2003/05/soap-envelope"><s:Header><wsse:Security xmlns:wsse="http:///wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http:///wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsse:UsernameToken><wsse:Username>admin</wsse:Username><wsse:Password Type="http:///wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">P2E1vLLcTGu7cA1e23hjoQrAwhA=</wsse:Password><wsse:Nonce>2gw7sF54HcG2BEdgitbIbw==</wsse:Nonce><wsu:Created>2020-05-07T03:12:40Z</wsu:Created></wsse:UsernameToken></wsse:Security></s:Header><s:Body xmlns:xsi="http:///2001/XMLSchema-instance" xmlns:xsd="http:///2001/XMLSchema"><GetVideoEncoderConfigurationOptions xmlns="http:///ver10/media/wsdl"><ConfigurationToken>VideoEncoderToken_1</ConfigurationToken></GetVideoEncoderConfigurationOptions></s:Body></s:Envelope>HTTP/1.1 200 OK
Date: Thu, 07 May 2020 11:12:36 GMT
Server: Hikvision-webs/
Connection: close
Content-Length: 3137
Content-Type: application/soap+xml; charset=utf-8
X-Appweb-Seq: 478
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http:///2003/05/soap-envelope" xmlns:soapenc="http:///2003/05/soap-encoding" xmlns:xsi="http:///2001/XMLSchema-instance" xmlns:xs="http:///2001/XMLSchema" xmlns:tt="http:///ver10/schema" xmlns:tds="http:///ver10/device/wsdl" xmlns:trt="http:///ver10/media/wsdl" xmlns:timg="http:///ver20/imaging/wsdl" xmlns:tev="http:///ver10/events/wsdl" xmlns:tptz="http:///ver20/ptz/wsdl" xmlns:tan="http:///ver20/analytics/wsdl" xmlns:tst="http:///ver10/storage/wsdl" xmlns:ter="http:///ver10/error" xmlns:dn="http:///ver10/network/wsdl" xmlns:tns1="http:///ver10/topics" xmlns:tmd="http:///ver10/deviceIO/wsdl" xmlns:wsdl="http:///wsdl" xmlns:wsoap12="http:///wsdl/soap12" xmlns:http="http:///wsdl/http" xmlns:d="http:///ws/2005/04/discovery" xmlns:wsadis="http:///ws/2004/08/addressing" xmlns:xop="http:///2004/08/xop/include" xmlns:wsnt="http:///wsn/b-2" xmlns:wsa="http:///2005/08/addressing" xmlns:wstop="http:///wsn/t-1" xmlns:wsrf-bf="http:///wsrf/bf-2" xmlns:wsntw="http:///wsn/bw-2" xmlns:wsrf-rw="http:///wsrf/rw-2" xmlns:wsaw="http:///2006/05/addressing/wsdl" xmlns:wsrf-r="http:///wsrf/r-2" xmlns:tnshik="http:///2011/event/topics"><env:Body><trt:GetVideoEncoderConfigurationOptionsResponse><trt:Options><tt:QualityRange><tt:Min>0</tt:Min>
<tt:Max>5</tt:Max>
</tt:QualityRange>
<tt:H264><tt:ResolutionsAvailable><tt:Width>1920</tt:Width>
<tt:Height>1200</tt:Height>
</tt:ResolutionsAvailable>
<tt:ResolutionsAvailable><tt:Width>1920</tt:Width>
<tt:Height>1080</tt:Height>
</tt:ResolutionsAvailable>
<tt:GovLengthRange><tt:Min>1</tt:Min>
<tt:Max>400</tt:Max>
</tt:GovLengthRange>
<tt:FrameRateRange><tt:Min>1</tt:Min>
<tt:Max>25</tt:Max>
</tt:FrameRateRange>
<tt:EncodingIntervalRange><tt:Min>1</tt:Min>
<tt:Max>400</tt:Max>
</tt:EncodingIntervalRange>
<tt:H264ProfilesSupported>Baseline</tt:H264ProfilesSupported>
</tt:H264>
<tt:Extension><tt:H264><tt:ResolutionsAvailable><tt:Width>1920</tt:Width>
<tt:Height>1200</tt:Height>
</tt:ResolutionsAvailable>
<tt:ResolutionsAvailable><tt:Width>1920</tt:Width>
<tt:Height>1080</tt:Height>
</tt:ResolutionsAvailable>
<tt:GovLengthRange><tt:Min>1</tt:Min>
<tt:Max>400</tt:Max>
</tt:GovLengthRange>
<tt:FrameRateRange><tt:Min>1</tt:Min>
<tt:Max>25</tt:Max>
</tt:FrameRateRange>
<tt:EncodingIntervalRange><tt:Min>1</tt:Min>
<tt:Max>400</tt:Max>
</tt:EncodingIntervalRange>
<tt:H264ProfilesSupported>Baseline</tt:H264ProfilesSupported>
<tt:BitrateRange><tt:Min>32</tt:Min>
<tt:Max>65536</tt:Max>
</tt:BitrateRange>
</tt:H264>
</tt:Extension>
</trt:Options>
</trt:GetVideoEncoderConfigurationOptionsResponse>
</env:Body>
</env:Envelope>
3)
POST /onvif/Imaging HTTP/1.1
Host: 192.168.58.89
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 931
<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http:///2003/05/soap-envelope"><s:Header><wsse:Security xmlns:wsse="http:///wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http:///wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsse:UsernameToken><wsse:Username>admin</wsse:Username><wsse:Password Type="http:///wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">yEvDyxCoiIRROEl0WPhbIr8pNrs=</wsse:Password><wsse:Nonce>fBRu+yuqyA1z1/QrvLx66Q==</wsse:Nonce><wsu:Created>2020-05-07T07:22:37Z</wsu:Created></wsse:UsernameToken></wsse:Security></s:Header><s:Body xmlns:xsi="http:///2001/XMLSchema-instance" xmlns:xsd="http:///2001/XMLSchema"><GetOptions xmlns="http:///ver20/imaging/wsdl"><VideoSourceToken>VideoSource_1</VideoSourceToken></GetOptions></s:Body></s:Envelope>HTTP/1.1 200 OK
Date: Thu, 07 May 2020 15:22:34 GMT
Server: Hikvision-webs/
Connection: close
Content-Length: 2507
Content-Type: application/soap+xml; charset=utf-8
X-Appweb-Seq: 9918
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http:///2003/05/soap-envelope" xmlns:soapenc="http:///2003/05/soap-encoding" xmlns:xsi="http:///2001/XMLSchema-instance" xmlns:xs="http:///2001/XMLSchema" xmlns:tt="http:///ver10/schema" xmlns:tds="http:///ver10/device/wsdl" xmlns:trt="http:///ver10/media/wsdl" xmlns:timg="http:///ver20/imaging/wsdl" xmlns:tev="http:///ver10/events/wsdl" xmlns:tptz="http:///ver20/ptz/wsdl" xmlns:tan="http:///ver20/analytics/wsdl" xmlns:tst="http:///ver10/storage/wsdl" xmlns:ter="http:///ver10/error" xmlns:dn="http:///ver10/network/wsdl" xmlns:tns1="http:///ver10/topics" xmlns:tmd="http:///ver10/deviceIO/wsdl" xmlns:wsdl="http:///wsdl" xmlns:wsoap12="http:///wsdl/soap12" xmlns:http="http:///wsdl/http" xmlns:d="http:///ws/2005/04/discovery" xmlns:wsadis="http:///ws/2004/08/addressing" xmlns:xop="http:///2004/08/xop/include" xmlns:wsnt="http:///wsn/b-2" xmlns:wsa="http:///2005/08/addressing" xmlns:wstop="http:///wsn/t-1" xmlns:wsrf-bf="http:///wsrf/bf-2" xmlns:wsntw="http:///wsn/bw-2" xmlns:wsrf-rw="http:///wsrf/rw-2" xmlns:wsaw="http:///2006/05/addressing/wsdl" xmlns:wsrf-r="http:///wsrf/r-2" xmlns:tnshik="http:///2011/event/topics"><env:Body><timg:GetOptionsResponse><timg:ImagingOptions><tt:Brightness><tt:Min>0</tt:Min>
<tt:Max>100</tt:Max>
</tt:Brightness>
<tt:ColorSaturation><tt:Min>0</tt:Min>
<tt:Max>100</tt:Max>
</tt:ColorSaturation>
<tt:Contrast><tt:Min>0</tt:Min>
<tt:Max>100</tt:Max>
</tt:Contrast>
<tt:Exposure><tt:Mode>MANUAL</tt:Mode>
<tt:ExposureTime><tt:Min>80</tt:Min>
<tt:Max>40000</tt:Max>
</tt:ExposureTime>
<tt:Gain><tt:Min>0</tt:Min>
<tt:Max>100</tt:Max>
</tt:Gain>
<tt:Iris><tt:Min>0</tt:Min>
<tt:Max>0</tt:Max>
</tt:Iris>
</tt:Exposure>
<tt:Sharpness><tt:Min>0</tt:Min>
<tt:Max>100</tt:Max>
</tt:Sharpness>
<tt:WideDynamicRange><tt:Mode>ON</tt:Mode>
<tt:Mode>OFF</tt:Mode>
</tt:WideDynamicRange>
<tt:WhiteBalance><tt:Mode>AUTO</tt:Mode>
</tt:WhiteBalance>
</timg:ImagingOptions>
</timg:GetOptionsResponse>
</env:Body>
</env:Envelope>