Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscribe response isn't correct when status code is 500 #42

Open
zebox opened this issue Nov 24, 2023 · 0 comments
Open

Subscribe response isn't correct when status code is 500 #42

zebox opened this issue Nov 24, 2023 · 0 comments

Comments

@zebox
Copy link

zebox commented Nov 24, 2023

When try call Subscribe with wrong InitialTerminationTime parameter value server return error response with status code 500:

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http:https://www.w3.org/2003/05/soap-envelope" xmlns:soapenc="http:https://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http:https://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http:https://www.w3.org/2001/XMLSchema" xmlns:tt="http:https://www.onvif.org/ver10/schema" xmlns:tds="http:https://www.onvif.org/ver10/device/wsdl" xmlns:trt="http:https://www.onvif.org/ver10/media/wsdl" xmlns:timg="http:https://www.onvif.org/ver20/imaging/wsdl" xmlns:tev="http:https://www.onvif.org/ver10/events/wsdl" xmlns:tptz="http:https://www.onvif.org/ver20/ptz/wsdl" xmlns:tan="http:https://www.onvif.org/ver20/analytics/wsdl" xmlns:tst="http:https://www.onvif.org/ver10/storage/wsdl" xmlns:ter="http:https://www.onvif.org/ver10/error" xmlns:dn="http:https://www.onvif.org/ver10/network/wsdl" xmlns:tns1="http:https://www.onvif.org/ver10/topics" xmlns:tmd="http:https://www.onvif.org/ver10/deviceIO/wsdl" xmlns:wsdl="http:https://schemas.xmlsoap.org/wsdl" xmlns:wsoap12="http:https://schemas.xmlsoap.org/wsdl/soap12" xmlns:http="http:https://schemas.xmlsoap.org/wsdl/http" xmlns:d="http:https://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:wsadis="http:https://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsnt="http:https://docs.oasis-open.org/wsn/b-2" xmlns:wsa="http:https://www.w3.org/2005/08/addressing" xmlns:wstop="http:https://docs.oasis-open.org/wsn/t-1" xmlns:wsrf-bf="http:https://docs.oasis-open.org/wsrf/bf-2" xmlns:wsntw="http:https://docs.oasis-open.org/wsn/bw-2" xmlns:wsrf-rw="http:https://docs.oasis-open.org/wsrf/rw-2" xmlns:wsaw="http:https://www.w3.org/2006/05/addressing/wsdl" xmlns:wsrf-r="http:https://docs.oasis-open.org/wsrf/r-2" xmlns:trc="http:https://www.onvif.org/ver10/recording/wsdl" xmlns:tse="http:https://www.onvif.org/ver10/search/wsdl" xmlns:trp="http:https://www.onvif.org/ver10/replay/wsdl" xmlns:tnshik="http:https://www.hikvision.com/2011/event/topics" xmlns:hikwsd="http:https://www.onvifext.com/onvif/ext/ver10/wsdl" xmlns:hikxsd="http:https://www.onvifext.com/onvif/ext/ver10/schema" xmlns:tas="http:https://www.onvif.org/ver10/advancedsecurity/wsdl" xmlns:tr2="http:https://www.onvif.org/ver20/media/wsdl" xmlns:axt="http:https://www.onvif.org/ver20/analytics"><env:Header><wsa:Action>http:https://docs.oasis-open.org/wsrf/fault</wsa:Action>
</env:Header>
<env:Body><env:Fault><env:Code><env:Value>env:Receiver</env:Value>
  </env:Code>
     <env:Reason><env:Text xml:lang="en">wsnt:UnacceptableInitialTerminationTimeFault</env:Text>
     </env:Reason>
     <env:Detail><wsnt:UnacceptableInitialTerminationTimeFault><wsrf-bf:Timestamp>2023-11-24T08:17:18Z</wsrf-bf:Timestamp>
        </wsnt:UnacceptableInitialTerminationTimeFault>
      </env:Detail>
    </env:Fault>
  </env:Body>
</env:Envelope>

In this Call_Subscribe doesn't check status code of response and try parse (unmarshaling) a corresponding response type. But if http status code not equal 200 response has <env:Fault> type.

I think this relevant (http status code checking is missing) for all methods, not only for Call_Subscribe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant