Why CreateRecording for onvif doesn't work?

1k views Asked by At

I am trying to implement an ONVIF protocol CreateRecording but am constantly getting the response as

<env:Body>
    <env:Fault>
        <env:Code>
            <env:Value>env:Receiver</env:Value>
            <env:Subcode>
                <env:Value>ter:ActionNotSupported</env:Value>
                <env:Subcode>
                    <env:Value>ter:InvalidOperation</env:Value>
                </env:Subcode>
            </env:Subcode>
        </env:Code>
        <env:Reason>
            <env:Text xml:lang="en">Optional Action Not Implemented</env:Text>
        </env:Reason>
    </env:Fault>
</env:Body>

The XML am sending is

 <SOAP-ENV:Body>
    <trc:CreateRecording xmlns:trc="http://www.onvif.org/recording/wsdl">
    </trc:CreateRecording>
 </SOAP-ENV:Body>

Am not sending any parameter and it should give me an error for that, instead its saying Action not Implemented. The same way if I request for CreateRecordingJob it give me valid error that there is no Reference of Existing Recording Token,

The purpose of doing everything is I want to get the local storage of onvif camera, am following this document http://www.onvif.org/onvif/ver10/recording.wsdl

even I have Added manual recordings on camera side as in the image but I think I want to create everything through Onvif Doc first and then it will give me all recordings

enter image description here

But I don't know how to get the ReocrdingToken from that recordings.

for Clarification camera is giving right response for getting its profile or NetworkInformation everything.

Also If I do

<SOAP-ENV:Body>
    <trc:GetRecordingJobs xmlns:trc="http://www.onvif.org/ver10/recording/wsdl/GetRecordingJobs"></trc:GetRecordingJobs>
</SOAP-ENV:Body></SOAP-ENV:Envelope>

I get an empty body

<env:Body>
    <trc:GetRecordingJobsResponse></trc:GetRecordingJobsResponse>
</env:Body>
1

There are 1 answers

0
Niels de Schrijver On

If you want the recordingToken you should call GetRecordings on the RecordingPortClient. This will return an array of RecordingResponseItems, each item will have its own token.

With the ExportRecordedData function you can export the recording to the storage location of your choice.

http://www.onvif.org/onvif/ver10/recording.wsdl