对于Onvif配置文件G设备,CreateRecording失败并显示“RecordConfiguration无效”

时间:2017-11-08 14:16:20

标签: soap onvif

我正在尝试创建关于Profile G设备的记录;

请求正文如下:

<SOAP-ENV:Body>
<recording:CreateRecording>
<recording:RecordingConfiguration xsi:type="onv:RecordingConfiguration">
<onv:Source xsi:type="onv:RecordingSourceInformation">
<onv:SourceId>http://10.65.158.165/onvif/recording_service</onv:SourceId>
<onv:Name>BSONIRecName</onv:Name>
<onv:Location>BSONIRecLocation</onv:Location>
<onvescription>BSONIRecDescription</onvescription>
<onv:Address>http://10.65.158.165/onvif/recording_service</onv:Address>
</onv:Source>
<onv:Content>BSONIRecContent</onv:Content>
<onv:MaximumRetentionTime>100</onv:MaximumRetentionTime>
</recording:RecordingConfiguration>
</recording:CreateRecording>
</SOAP-ENV:Body>

但是,我总是收到错误说

<env:Code>
<env:Value>env:Sender</env:Value>
<env:Subcode>
<env:Value>ter:InvalidArgVal</env:Value>
<env:Subcode>
<env:Value>ter:BadConfiguration</env:Value>
</env:Subcode>
</env:Subcode>
</env:Code>
<env:Reason>
<env:Text xml:lang="en">The RecordConfiguration is invalid.</env:Text>
</env:Reason>

有人可以看到,请求格式中有什么错误。?

1 个答案:

答案 0 :(得分:0)

MaximumRetentionTime存在类型不匹配,即xs:duration类型,而不是简单的数字字符串。

因此,将此参数更改为“P7D”可以解决问题。