The goal is get the status of a device. I understood that the correct sequence in the case of basic Authenticarion and SSL is the following but not Work
This is the sequence:
- I create my Guid for InsstanceID for example:
97088254-afd7-4014-849e-4aadd5f91874
- I get the Token through the login method of the end point https: // /ManagementServer/ServerCommandService.svc
QUESTION:
<soapenv: Envelope xmlns: soapenv = “http://schemas.xmlsoap.org/soap/envelope/” xmlns: xpr = “http://videoos.net/2/XProtectCSServerCommand”>
<soapenv: Header />
<soapenv: Body>
<xpr: Login>
<! - Optional: ->
<xpr: instanceId> 97088254-afd7-4014-849e-4aadd5f91874 </ xpr: instanceId>
<! - Optional: ->
<xpr: currentToken> </ xpr: currentToken>
</ xpr: Login>
</ soapenv: Body>
</ soapenv: Envelope>
REPLY:
The answer is this:
<s: Envelope xmlns: s = “http://schemas.xmlsoap.org/soap/envelope/”>
<s: Body>
<LoginResponse xmlns = “http://videoos.net/2/XProtectCSServerCommand”>
<LoginResult xmlns: i = "[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance "http://www.w3.org/2001/XMLSchema-instance")">
<RegistrationTime> 2020-11-23T12: 57: 07.213Z </RegistrationTime>
<TimeToLive>
<MicroSeconds> 14400000000 </MicroSeconds>
</TimeToLive>
<TimeToLiveLimited> false </TimeToLiveLimited>
<Token>TOKEN # aae540bf-0bc3-4deb-9d02-354c13c64d52 # 4msvms // ServerConnector #</Token>
</LoginResult>
</ s: Body>
</ s: Envelope>
- I get a deviceID via GetConfiguration of the end point https: // /ManagementServer/ServerCommandService.svc
QUESTION
<soapenv: Envelope xmlns: soapenv = “http://schemas.xmlsoap.org/soap/envelope/” xmlns: xpr = “http://videoos.net/2/XProtectCSServerCommand”>
<soapenv: Header />
<soapenv: Body>
<xpr: GetConfiguration>
<! - Optional: ->
<xpr: token>TOKEN # aae540bf-0bc3-4deb-9d02-354c13c64d52 # 4msvms // ServerConnector #</ xpr: token>
</ xpr: GetConfiguration>
</ soapenv: Body>
</ soapenv: Envelope>
and from the content (only a part) of the answer I take a deviceid of a camera
<Recorders>
<RecorderInfo>
<Cameras>
<CameraInfo>
<CoverageDepth> 0 </CoverageDepth>
<CoverageDirection> 0 </CoverageDirection>
<CoverageFieldOfView> 0 </CoverageFieldOfView>
<Description />
<DeviceId>62f57c0d-44fc-4825-a285-89223a041729</DeviceId>
<DeviceIndex> 0 </DeviceIndex>
<GisPoint> POINT EMPTY </GisPoint>
<HardwareId> 947df69a-96b0-4d8f-963e-02f116baf0f1 </HardwareId>
<Icon> 0 </Icon>
<Name> HikVisionGeneric (10.0.5.12) - Room 1 </Name>
<RecorderId> 7e5750b6-3be2-4740-9247-f310a0f8f94c </RecorderId>
Now that I have the Token and the device ID I can use the GetCurrentDeviceStatus method from the End Point http:///recorderstatusservice/recorderstatusservice2.asmx
I ask the question:
<soapenv: Envelope xmlns: soapenv = “http://schemas.xmlsoap.org/soap/envelope/” xmlns: xpr = “http://videoos.net/2/XProtectCSRecorderStatus2”>
<soapenv: Header />
<soapenv: Body>
<xpr: GetCurrentDeviceStatus>
<! - Optional: ->
<xpr: token>TOKEN # aae540bf-0bc3-4deb-9d02-354c13c64d52 # 4msvms // ServerConnector #</ xpr: token>
<! - Optional: ->
<xpr: deviceIds>
<! - Zero or more repetitions: ->
<xpr: guid>62f57c0d-44fc-4825-a285-89223a041729</ xpr: guid>
</ xpr: deviceIds>
</ xpr: GetCurrentDeviceStatus>
</ soapenv: Body>
</ soapenv: Envelope>
But in response I get this error which I don’t understand what it means
<soap: Envelope xmlns: xsi = “http://www.w3.org/2001/XMLSchema-instance” xmlns: xsd = “http://www.w3.org/2001/XMLSchema” xmlns: soap = "http : //schemas.xmlsoap.org/soap/envelope/ ">
<soap: Body>
<soap: Fault>
<faultcode> soap: Server </faultcode>
<faultstring> Error processing message </faultstring>
<detail>
<ErrorNumber> 10000 </ErrorNumber>
</detail>
</ soap: Fault>
</ soap: Body>
</ soap: Envelope>
Where did I go wrong