Hikvision log search REST API (POST METHOD) giving 'BadXMLFormat'

Joined
Sep 1, 2017
Messages
1
Reaction score
0
I want to capture the log details of my Hikvision DVR. To capture the log HikVision provide the REST Web service in their RACM specification document. While hittin the service I am getting badXMLFormat Error in response.

Please find below detail description of the Issue.

Device Details :
Device Name : Embedded Net DVR
Product Number : DS-7208HQHI-F1
Firmware Version : V3.4.80

service URL : http://myDVRStaticIPAddress/ISAPI/ContentMgmt/logSearch
Method : POST

Input/Request Body
<?xml version="1.0" encoding="UTF-8"?>
<CMSearchDescription version="1.0"
xmlns="360报价网—购物比价,京东商品历史价格,价格走势">
<searchID>{812F04E0-4089-11A3-9A0C-0305E82C2906}</searchID>
<timeSpanList>
<timeSpan>
<startTime>2013-06-10T12:00:00Z</startTime>
<endTIme>2013-06-10T13:30:00Z</endTime>
<timeSpan>
</timeSpanList>
<metaID>log.hikvision.com/Alarm/motionstart</metaID>
<searchResultPostion> 20 </searchResultPostion>
<maxResults> 40 </maxResults>
</CMSearchDescription>
Response
<?xml version="1.0" encoding="UTF-8" ?>
<ResponseStatus version="1.0" xmlns="urn:psialliance-org">
<requestURL>/ISAPI/ContentMgmt/logSearch</requestURL>
<statusCode>5</statusCode>
<statusString>Invalid XML Format</statusString>
<subStatusCode>badXmlFormat</subStatusCode>
</ResponseStatus>

I am getting statusCode 5 for above service. It seems my input xml(CMSearchDescription) is not in proper format or not the updated one.

Attaching the RACM specification Document.
service Name : /ISAPI/ContentMgmt/logSearch

Any help on the issue will be greatly appreciated.

Thanks in advance.
 

Attachments

louisparks

n3wb
Joined
Oct 23, 2018
Messages
1
Reaction score
0
Location
United States
any solution on this. I am running into this too.

I am running into the same issue. The XML you posted is not syntactically correct. However, even when I correct it, I get a different error


<?xml version="1.0" encoding="UTF-8" ?>
<CMSearchDescription version="2.0" xmlns="http://www.isapi.org/ver20/XMLSchema">
<searchID>{C6022BA1-BB30-0001-B811-95A517711717}</searchID>
<trackIDList>
<trackID>101</trackID>
</trackIDList>
<timeSpanList>
<timeSpan>
<startTime>2018-10-23T00:00:00Z</startTime>
<endTime>2018-10-23T22:59:59Z</endTime>
</timeSpan>
</timeSpanList>
<maxResults>20</maxResults>
<searchResultPostion>1</searchResultPostion>
<metaID>log.hikvision.com/Alarm/motionstart</metaID>
</CMSearchDescription>

This lets the XML post, but I get the following error

<?xml version="1.0" encoding="UTF-8" ?>
<ResponseStatus version="1.0" xmlns="urn:psialliance-org">
<requestURL>/ISAPI/ContentMgmt/logSearch</requestURL>
<statusCode>6</statusCode>
<statusString>Invalid XML Content</statusString>
<subStatusCode>badXmlContent</subStatusCode>
</ResponseStatus>
 
Top