ONVIF Bugs in Axis Firmware #436
-
I am integrating various cameras, in particular the Q6135LE running firmware V10.12.199 into Windows 11 .net 6 app and have noticed bugs in the Axis ONVIF implementation (as have others in some other discussion) which is being used as the primary integration api. One bug concerns the response from a GetCapabilitesRequest using the official Onvif events WSDL derived code with Microsoft service model libraries from Nuget. The SOAP XML responses from the cameras are fine in the sense they got a successful request and they list the max pullpoints available all OK. However the SOAP action in the returned SOAP message from the cameras is GetCapabilitiesRequest when it needs to be GetCapabiltiesResponse. Simple bug, but it causes the Microsoft WCF stack to throw a fault since the response is not Onvif compliant. Great if the Axis ONVIF team can put this on the list for rectification in a future release of the firmware. Onvif.org probably needs to add another test during the certification process to pick up the correct action response for all SOAP messages returned. If a discussion on Onvif bugs is somewhere better I will switch to that category. |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 12 replies
-
This automatically generated reply acts as a friendly reminder. Answers to your questions will most often come from the community, from developers like yourself. You will, from time to time, find that Axis employees answers some of the questions, but this is not a guarantee. Think of the discussion forum as a complement to other support channels, not a replacement to any of them. If your question remains unanswered for a period of time, please revisit it to see whether it can be improved by following the guidelines listed in Axis support guidelines. |
Beta Was this translation helpful? Give feedback.
-
Hi @lot3worx , I tested the same by writing a sample Python program. Please find my results below. First test to replicate your scenario:test.xml<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tet="http://www.onvif.org/ver10/events/wsdl" xmlns:tt="http://www.onvif.org/ver10/schema">
<soap:Body>
<tet:GetServiceCapabilities />
</soap:Body>
</soap:Envelope> SOAP_API_CallPython_GetServiceCapabilitiesRequest.pyimport requests,json
from requests.auth import HTTPDigestAuth
url = "http://10.176.12.83/onvif/device_service"
payload =""
# open the input xml file and read
# data in form of python dictionary
# using xmltodict module
with open("test.xml") as xml_file:
payload = xml_file.read()
# headers
headers = {
'Content-Type': 'text/xml; charset=utf-8'
}
# POST request
#response = requests.request("POST", url, headers=headers, data=payload)
response = requests.request('POST',url,data=payload, verify=False)
# prints the response
print(response.text)
print(response)
Output (As you have informed response is "GetServiceCapabilitiesResponse")Used "ONVIF Device Test Tool " to test the "GetServiceCapabilitiesRequest"Result (Found it working 😉 and now more confusion 😃 )Now I need to check if the payload is different here from "ONVIF Device Test Tool ". So used Wireshark to view the payload.Difference in payloadUsed new payload (test1.xml):<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetCapabilities xmlns="http://www.onvif.org/ver10/device/wsdl">
<Category>
All
</Category>
</GetCapabilities>
</s:Body>
</s:Envelope> Result:Note |
Beta Was this translation helpful? Give feedback.
-
Dear Vivek,
Thank you so much for taking the time to look at the issue.
Please find attached my screenshots to show how the Microsoft connected service model message intercepts (C# in .net 6 using Microsoft service model nuget packages) which show the SOAP message intercepts to and from the Axis Q6135LE from a connected service using the official Onvif.org event wsdl giving me the incorrect ONVIF action statement in the response (i.e. simply repeating the must understand” request”, rather than the must understand “response”) (using Visual Studio n 2022). The third attachment show the fault being generated in the VS debugger.
As you can see from the response SOAP message the Axis camera processes the request and sends me the correct number of pullpoints implemented, but sends back the INCORRECT action in the SOAP header so my wcf stack throws a fault (i.e. merely repeats REQUEST action rather than the RESPONSE action). I suspect that other implementations don’t check whether the responded action statement in the SOAP header is actually the precise ONVIF compliant action response and simply proceed to process the message body whereas implementations off the strict ONVIF wsdl is strongly typed to the ONVIF standard.
I used the classic message intercept in the Microsoft service model WCF stack.
I also note that your test does not use the precise SOAP actions in the header (relying only on the body to make the request) and thus would not likely trigger faults utilising the body only; this is why it can “slip” past the fault detectors since there is NO action header in the request or the response --- see my attachments for strongly typed SOAP message based on the ONVIF official event wsdl.
Yours Sincerely,
Mark Anderson
|
Beta Was this translation helpful? Give feedback.
-
Hi @lot3worx , I also checked the new payload with the "ONVIF Device Test Tool": |
Beta Was this translation helpful? Give feedback.
-
Dear Vivek,
I will see if I can get a cutdown skeleton VS sample project into a github
repo so you can demonstrate the problem to others.
Actually, we have discovered several bugs with incomplete or malformed SOAP
messages coming out of our Axis gear but that's another later story.
I am not sure what I can say about the other non Axis ONVIF compliant
devices at this time but can say we are not permitted to use Dahua,
HikVision, or Huawei for the installations so cannot comment on those
brands. I just took delivery of an Axis D2110-VE radar for integration into
the testbed before eventual targeted rollout to the sites and will schedule
looking at it to see if suffers from similar issues with whatever firmware
version it is running. But so far on the Axis Q61 series and Axis P14 series
bullets (they are all running 10.12.199) I get the fault as well as other
issues hinted at above.
|
Beta Was this translation helpful? Give feedback.
-
Hi @lot3worx , I will try to play with it and find someone with more experience in ONVIF to look into this. Thank you for your efforts to report this. |
Beta Was this translation helpful? Give feedback.
-
Dear Vivek,
Good Progress. We chose this particular error due to its simplicity but we
have a list of Onvif errors when dealing with Axis gear and I can load these
into the test project if Axis wants to know about the other bugs we have
identified. One bug has caused us to write an entire custom event broker as
a workaround.
I also have a list of some candidate bugs we found in the Vapix API but
Onvif is our priority at the moment.
But first things first let's see what is causing this error.
|
Beta Was this translation helpful? Give feedback.
-
Dear Vivek,
Note that the command GetEventProperties does respond correctly in the
provided test code. It is the GetServiceCapabilities command that fails to
conform in its reply. I note below you list 5.1.1 Get Event Properties ---
or does this section also include the fail component of
GetServiceCapabilities?
|
Beta Was this translation helpful? Give feedback.
-
Dear Vivek,
I will reprise and check from the Onvif website again but I believe that your respondent is talking about a completely DIFFERENT call. I suspect he is referring to the Onvif Device Management namespace set of calls and the call under discussion is in EVENTS namespace. And we are discussing GetServiceCapabilities, not GetCapabilities.
As said, I will do a double check on the Onvif official wsdl and rematch to ensure full precision but the sample project supplied comes from
https://www.onvif.org/ver10/events/wsdl/event.wsdl
You can scroll down and see the GetServiceCapabilities specification at point 6.
The Onvif spec we are using is Ver 22.06 (the latest) and it is not deprecated according to the Onvif website. I will send through relevant screenshots in a later post.
|
Beta Was this translation helpful? Give feedback.
Hi @lot3worx ,
Able to get the Error on my system now:
I will try to play with it and find someone with more experience in ONVIF to look into this. Thank you for your efforts to report this.