1
votes

I'm having trouble getting digital inputs from a camera that uses ONVIF as a communication protocol. I know, that the camera has 2 digital inputs and it is anonymously accessible without logging in.

I'm using action GetDigitalInputs from this WSDL: https://www.onvif.org/ver10/deviceio.wsdl. Some other actions work. For example I'm able to use GetRelayOutputs successfully.

Here is the request I'm sending to the camera to deviceIO service URL (http://ipaddress/onvif/deviceio_service). Device IO service URL was obtained from a result of GetCapabilities action:

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope">
    <s:Body>
      <GetDigitalInputs xmlns="http://www.onvif.org/ver10/deviceIO/wsdl" />
    </s:Body>
</s:Envelope>

And here is the response

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:ter="http://www.onvif.org/ver10/error">
    <SOAP-ENV:Body>
        <SOAP-ENV:Fault>
            <SOAP-ENV:Code>
                <SOAP-ENV:Value>SOAP-ENV:Sender</SOAP-ENV:Value>
                <SOAP-ENV:Subcode>
                    <SOAP-ENV:Value>ter:Namespace</SOAP-ENV:Value>
                </SOAP-ENV:Subcode>
            </SOAP-ENV:Code>
            <SOAP-ENV:Reason>
                <SOAP-ENV:Text xml:lang="en">Namespace Error</SOAP-ENV:Text>
            </SOAP-ENV:Reason>
            <SOAP-ENV:Node>http://www.w3.org/2003/05/soap-envelope/node/ultimateReceiver</SOAP-ENV:Node>
            <SOAP-ENV:Role>http://www.w3.org/2003/05/soap-envelope/node/ultimateReceiver</SOAP-ENV:Role>
        </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

I've tried to change namespace of the GetDigitalInputs to http://www.onvif.org/ver10/deviceio/wsdl and http://www.onvif.org/ver10/device/wsdl. Both didn't work.

I've tried using Onvif Device Test Tool, which has the same issue as I have.

I'm having the same issue with action GetSerialPorts. Both on multiple different Bosch cameras.

1

1 Answers

0
votes

What about the following XML?

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope">
    <s:Body>
      <tmd:GetDigitalInputs xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" />
    </s:Body>
</s:Envelope>