Pelco Developer Network (PDN)

D6220L: PullMessages method responds with error (solved)

We try to pull messages from D6220L (firmware 2.8.1.5.9340-A0.0, serial number H450868) in two steps (http-requests): CreatePullPointSubscription, PullMessages. First http-request (CreatePullPointSubscription) respond with correct data.

===================CreatePullPointSubscription request===================
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <SOAP-ENV:Header>
        <wsse:Security>
            <wsse:UsernameToken>
                <wsse:Username>admin</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">DMNOBT17JuL1aZvoPq0xHBIgSmE=</wsse:Password>
                <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">pJdc4M3K8dYM6w==</wsse:Nonce>
                <wsu:Created xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2017-05-11T13:56:53Z</wsu:Created>
            </wsse:UsernameToken>
        </wsse:Security>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
        <tev:CreatePullPointSubscription xmlns:tev="http://www.onvif.org/ver10/events/wsdl">
            <tev:Filter xmlns:tev="http://www.onvif.org/ver10/events/wsdl">
                <wsnt:TopicExpression xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet" xmlns:tns1="http://www.onvif.org/ver10/topics">tns1:RuleEngine/CellMotionDetector/Motion</wsnt:TopicExpression>
            </tev:Filter>
            <tev:InitialTerminationTime xmlns:tev="http://www.onvif.org/ver10/events/wsdl">PT5M</tev:InitialTerminationTime>
        </tev:CreatePullPointSubscription>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
===================CreatePullPointSubscription response===================
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <SOAP-ENV:Header xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"></SOAP-ENV:Header>
    <SOAP-ENV:Body xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
        <tev:CreatePullPointSubscriptionResponse xmlns:tev="http://www.onvif.org/ver10/events/wsdl">
            <tev:SubscriptionReference xmlns:tev="http://www.onvif.org/ver10/events/wsdl">
                <wsa5:Address xmlns:wsa5="http://www.w3.org/2005/08/addressing">http://192.168.5.106:80/onvif/eventing_service?id=urn:uuid:e526fcc4-8802-38be-6100-d8a09c52c7a0</wsa5:Address>
                <wsa5:ReferenceParameters xmlns:wsa5="http://www.w3.org/2005/08/addressing">
                    <SubscriptionId xmlns="urn:schemas-pelco-com:ws:addressing:1">urn:uuid:e526fcc4-8802-38be-6100-d8a09c52c7a0</SubscriptionId>
                </wsa5:ReferenceParameters>
            </tev:SubscriptionReference>
            <wsnt:CurrentTime xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2">2017-05-11T13:56:54.114386Z</wsnt:CurrentTime>
            <wsnt:TerminationTime xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2">2017-05-11T14:01:54.114386Z</wsnt:TerminationTime>
        </tev:CreatePullPointSubscriptionResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

We take data from answer on first request and generate second http-request (PullMessages), but it responds with error. Why?

===================PullMessages request===================
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:dom0="" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <SOAP-ENV:Header>
        <wsse:Security>
            <wsse:UsernameToken>
                <wsse:Username>admin</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">JEeY9PypazOUvkxvQKKrhWYtLfk=</wsse:Password>
                <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">2cuBa3ghLadKWg==</wsse:Nonce>
                <wsu:Created xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2017-05-11T13:56:53Z</wsu:Created>
            </wsse:UsernameToken>
        </wsse:Security>
        <wsa5:Action xmlns:wsa5="http://www.w3.org/2005/08/addressing">http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesRequest</wsa5:Action>
        <wsa5:To xmlns:wsa5="http://www.w3.org/2005/08/addressing">http://192.168.5.106/onvif/eventing_service?id=urn:uuid:e526fcc4-8802-38be-6100-d8a09c52c7a0</wsa5:To>
        <dom0:SubscriptionId xmlns:dom0="http://www.axis.com/2009/event" MustUnderstand="1">urn:uuid:e526fcc4-8802-38be-6100-d8a09c52c7a0</dom0:SubscriptionId>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
        <tev:PullMessages xmlns:tev="http://www.onvif.org/ver10/events/wsdl">
            <tev:Timeout xmlns:tev="http://www.onvif.org/ver10/events/wsdl">PT1M</tev:Timeout>
            <tev:MessageLimit xmlns:tev="http://www.onvif.org/ver10/events/wsdl">10</tev:MessageLimit>
        </tev:PullMessages>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
===================PullMessages response===================
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <SOAP-ENV:Header xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"></SOAP-ENV:Header>
    <SOAP-ENV:Body xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
        <SOAP-ENV:Fault xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
            <SOAP-ENV:Code xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
                <SOAP-ENV:Value xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">SOAP-ENV:Sender</SOAP-ENV:Value>
            </SOAP-ENV:Code>
            <SOAP-ENV:Reason xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
                <SOAP-ENV:Text xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" lang="en">Invalid endpoint reference</SOAP-ENV:Text>
            </SOAP-ENV:Reason>
            <SOAP-ENV:Detail xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
                <tev:PullMessagesFaultResponse xmlns:tev="http://www.onvif.org/ver10/events/wsdl">
                    <tev:MaxTimeout xmlns:tev="http://www.onvif.org/ver10/events/wsdl">PT1M30S</tev:MaxTimeout>
                    <tev:MaxMessageLimit xmlns:tev="http://www.onvif.org/ver10/events/wsdl">20</tev:MaxMessageLimit>
                </tev:PullMessagesFaultResponse>
            </SOAP-ENV:Detail>
        </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

I also tried to test using program Onvif Device Manager. Information, live and PTZ working, but not events. I upload screenshots.

I haven't worked heavily with ONVIF, and since it is an open standard we haven't offered a lot of support for it in the past.

That being said, I consulted with another engineer that was more familiar with ONVIF calls, and he did notice something that I'd missed at first glance:

In your PullRequest you have following in the Header:

dom0:SubscriptionId xmlns:dom0="http://www.axis.com/2009/event" MustUnderstand="1">
  urn:uuid:e526fcc4-8802-38be-6100-d8a09c52c7a0
</dom0:SubscriptionId>

Which appears specific for an AXIS model camera.
It looks like you perhaps should be sending the following (from your previous response):

<SubscriptionId xmlns="urn:schemas-pelco-com:ws:addressing:1" MustUnderstand="1">
  urn:uuid:e526fcc4-8802-38be-6100-d8a09c52c7a0
</SubscriptionId>

He did point out that each manufacturer should have their own namespace associated with the SubscriptionId, so that unique SubscriptionId should be copied exactly from the previous response. He did also offer alternative that you could possibly try out as well: you could grab the entire ReferenceParameters section from the subscription response (which should always use the WS-addressing namespace) and then put that into the PullMessages SOAP header. Something like this:

<wsa5:ReferenceParameters xmlns:wsa5="http://www.w3.org/2005/08/addressing">
  <SubscriptionId xmlns="urn:schemas-pelco-com:ws:addressing:1" MustUnderstand="1">
    urn:uuid:e526fcc4-8802-38be-6100-d8a09c52c7a0
  </SubscriptionId>
</wsa5:ReferenceParameters>

He said that this ought to work for every vendor as well.

We tried use your advice, but got the same result:

===============================REQUEST Reference========================================
 
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding">
    <SOAP-ENV:Header>
        <wsse:Security>
            <wsse:UsernameToken>
                <wsse:Username>admin</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">mB41blR4FC8mACgktSiflQ1pppo=</wsse:Password>
                <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">wwvOXhT0uuTjog==</wsse:Nonce>
                <wsu:Created xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2017-09-05T12:13:03Z</wsu:Created>
            </wsse:UsernameToken>
        </wsse:Security>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
        <tev:CreatePullPointSubscription xmlns:tev="http://www.onvif.org/ver10/events/wsdl">
            <tev:InitialTerminationTime xmlns:tev="http://www.onvif.org/ver10/events/wsdl">PT5M</tev:InitialTerminationTime>
        </tev:CreatePullPointSubscription>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding">
    <SOAP-ENV:Header xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"></SOAP-ENV:Header>
    <SOAP-ENV:Body xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
        <tev:CreatePullPointSubscriptionResponse xmlns:tev="http://www.onvif.org/ver10/events/wsdl">
            <tev:SubscriptionReference xmlns:tev="http://www.onvif.org/ver10/events/wsdl">
                <wsa5:Address xmlns:wsa5="http://www.w3.org/2005/08/addressing">http://192.168.5.106:80/onvif/eventing_service?id=urn:uuid:a6ba5e79-f0df-1cdb-516e-3ad80dddabc7</wsa5:Address>
                <wsa5:ReferenceParameters xmlns:wsa5="http://www.w3.org/2005/08/addressing">
                    <SubscriptionId xmlns="urn:schemas-pelco-com:ws:addressing:1">urn:uuid:a6ba5e79-f0df-1cdb-516e-3ad80dddabc7</SubscriptionId>
                </wsa5:ReferenceParameters>
            </tev:SubscriptionReference>
            <wsnt:CurrentTime xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2">2017-09-05T12:13:04.039667Z</wsnt:CurrentTime>
            <wsnt:TerminationTime xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2">2017-09-05T12:18:04.039667Z</wsnt:TerminationTime>
        </tev:CreatePullPointSubscriptionResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
===============================REQUEST Reference========================================
 
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding">
    <SOAP-ENV:Header>
        <wsse:Security>
            <wsse:UsernameToken>
                <wsse:Username>admin</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">Wxem1MawhqAj5yHqdRSRWnKpp1I=</wsse:Password>
                <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">mdyafmYm8R3f9A==</wsse:Nonce>
                <wsu:Created xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2017-09-05T12:13:03Z</wsu:Created>
            </wsse:UsernameToken>
        </wsse:Security>
        <wsa5:Action xmlns:wsa5="http://www.w3.org/2005/08/addressing">http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesRequest</wsa5:Action>
        <wsa5:To xmlns:wsa5="http://www.w3.org/2005/08/addressing">http://192.168.5.106/onvif/eventing_service?id=urn:uuid:a6ba5e79-f0df-1cdb-516e-3ad80dddabc7</wsa5:To>
        <wsa5:ReferenceParameters xmlns:wsa5="http://www.w3.org/2005/08/addressing">
            <SubscriptionId xmlns="urn:schemas-pelco-com:ws:addressing:1" MustUnderstand="1">urn:uuid:a6ba5e79-f0df-1cdb-516e-3ad80dddabc7</SubscriptionId>
        </wsa5:ReferenceParameters>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
        <tev:PullMessages xmlns:tev="http://www.onvif.org/ver10/events/wsdl">
            <tev:Timeout xmlns:tev="http://www.onvif.org/ver10/events/wsdl">PT1M</tev:Timeout>
            <tev:MessageLimit xmlns:tev="http://www.onvif.org/ver10/events/wsdl">10</tev:MessageLimit>
        </tev:PullMessages>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding">
    <SOAP-ENV:Header xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"></SOAP-ENV:Header>
    <SOAP-ENV:Body xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
        <SOAP-ENV:Fault xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
            <SOAP-ENV:Code xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
                <SOAP-ENV:Value xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">SOAP-ENV:Sender</SOAP-ENV:Value>
            </SOAP-ENV:Code>
            <SOAP-ENV:Reason xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
                <SOAP-ENV:Text xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" lang="en">Invalid endpoint reference</SOAP-ENV:Text>
            </SOAP-ENV:Reason>
            <SOAP-ENV:Detail xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
                <tev:PullMessagesFaultResponse xmlns:tev="http://www.onvif.org/ver10/events/wsdl">
                    <tev:MaxTimeout xmlns:tev="http://www.onvif.org/ver10/events/wsdl">PT1M30S</tev:MaxTimeout>
                    <tev:MaxMessageLimit xmlns:tev="http://www.onvif.org/ver10/events/wsdl">20</tev:MaxMessageLimit>
                </tev:PullMessagesFaultResponse>
            </SOAP-ENV:Detail>
        </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

===============================REQUEST SubscriptionId========================================
 
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
    <SOAP-ENV:Header>
        <wsse:Security>
            <wsse:UsernameToken>
                <wsse:Username>admin</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">C64vUmZjFOIntaKztZkAdL3pmKc=</wsse:Password>
                <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">9iMemwaQRB/YPg==</wsse:Nonce>
                <wsu:Created xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2017-09-05T13:01:38Z</wsu:Created>
            </wsse:UsernameToken>
        </wsse:Security>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
        <tev:CreatePullPointSubscription xmlns:tev="http://www.onvif.org/ver10/events/wsdl">
            <tev:InitialTerminationTime xmlns:tev="http://www.onvif.org/ver10/events/wsdl">PT5M</tev:InitialTerminationTime>
        </tev:CreatePullPointSubscription>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
    <SOAP-ENV:Header xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"></SOAP-ENV:Header>
    <SOAP-ENV:Body xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
        <tev:CreatePullPointSubscriptionResponse xmlns:tev="http://www.onvif.org/ver10/events/wsdl">
            <tev:SubscriptionReference xmlns:tev="http://www.onvif.org/ver10/events/wsdl">
                <wsa5:Address xmlns:wsa5="http://www.w3.org/2005/08/addressing">http://192.168.5.106:80/onvif/eventing_service?id=urn:uuid:834c5a9a-b936-7965-07d4-8c37214e9c62</wsa5:Address>
                <wsa5:ReferenceParameters xmlns:wsa5="http://www.w3.org/2005/08/addressing">
                    <SubscriptionId xmlns="urn:schemas-pelco-com:ws:addressing:1">urn:uuid:834c5a9a-b936-7965-07d4-8c37214e9c62</SubscriptionId>
                </wsa5:ReferenceParameters>
            </tev:SubscriptionReference>
            <wsnt:CurrentTime xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2">2017-09-05T13:01:38.574643Z</wsnt:CurrentTime>
            <wsnt:TerminationTime xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2">2017-09-05T13:06:38.574643Z</wsnt:TerminationTime>
        </tev:CreatePullPointSubscriptionResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
===============================REQUEST SubscriptionId========================================
 
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
    <SOAP-ENV:Header>
        <wsse:Security>
            <wsse:UsernameToken>
                <wsse:Username>admin</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">SwrdS41R9hxwApv1MRrtztlEmiE=</wsse:Password>
                <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">NeqAjC1pCRtBLw==</wsse:Nonce>
                <wsu:Created xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2017-09-05T13:01:38Z</wsu:Created>
            </wsse:UsernameToken>
        </wsse:Security>
        <wsa5:Action xmlns:wsa5="http://www.w3.org/2005/08/addressing">http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesRequest</wsa5:Action>
        <wsa5:To xmlns:wsa5="http://www.w3.org/2005/08/addressing">http://192.168.5.106/onvif/eventing_service?id=urn:uuid:834c5a9a-b936-7965-07d4-8c37214e9c62</wsa5:To>
        <SubscriptionId xmlns="urn:schemas-pelco-com:ws:addressing:1" MustUnderstand="1">urn:uuid:834c5a9a-b936-7965-07d4-8c37214e9c62</SubscriptionId>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
        <tev:PullMessages xmlns:tev="http://www.onvif.org/ver10/events/wsdl">
            <tev:Timeout xmlns:tev="http://www.onvif.org/ver10/events/wsdl">PT1M</tev:Timeout>
            <tev:MessageLimit xmlns:tev="http://www.onvif.org/ver10/events/wsdl">10</tev:MessageLimit>
        </tev:PullMessages>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
    <SOAP-ENV:Header xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"></SOAP-ENV:Header>
    <SOAP-ENV:Body xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
        <SOAP-ENV:Fault xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
            <SOAP-ENV:Code xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
                <SOAP-ENV:Value xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">SOAP-ENV:Sender</SOAP-ENV:Value>
            </SOAP-ENV:Code>
            <SOAP-ENV:Reason xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
                <SOAP-ENV:Text xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" lang="en">Invalid endpoint reference</SOAP-ENV:Text>
            </SOAP-ENV:Reason>
            <SOAP-ENV:Detail xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
                <tev:PullMessagesFaultResponse xmlns:tev="http://www.onvif.org/ver10/events/wsdl">
                    <tev:MaxTimeout xmlns:tev="http://www.onvif.org/ver10/events/wsdl">PT1M30S</tev:MaxTimeout>
                    <tev:MaxMessageLimit xmlns:tev="http://www.onvif.org/ver10/events/wsdl">20</tev:MaxMessageLimit>
                </tev:PullMessagesFaultResponse>
            </SOAP-ENV:Detail>
        </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Thank you once again for the information. I've sent this to an engineer at our company that works with ONVIF quite a lot, and he did have some additional feedback that we wanted to share with you in case it fixes the problem.

We do have an issue that has been addressed on some products last Spring where; if the SubsccriptionId and other values appeared after the WS-Security portion of the header, they were being ignored. Our suggestion to correct the behavior you are seeing is to re-order the SOAP header so that the WS_Security section is always at the end, such as (EXAMPLE suggestion):

<SOAP-ENV:Header>
  <wsa5:Action
      xmlns:wsa5="http://www.w3.org/2005/08/addressing">
    http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesRequest
  </wsa5:Action>
  <wsa5:To
      xmlns:wsa5="http://www.w3.org/2005/08/addressing">
    http://192.168.5.106/onvif/eventing_service?id=urn:uuid:a6ba5e79-f0df-1cdb-516e-3ad80dddabc7
  </wsa5:To>
  <SubscriptionId
      xmlns="urn:schemas-pelco-com:ws:addressing:1"
      MustUnderstand="1">
    urn:uuid:a6ba5e79-f0df-1cdb-516e-3ad80dddabc7
  </SubscriptionId>
  <wsse:Security>
    <wsse:UsernameToken>
      <wsse:Username>admin</wsse:Username>
      <wsse:Password
          Type="http://docs.oasis-open.org/wss/2004/01/
            oasis-200401-wss-username-token-profile-1.0#PasswordDigest">
        Wxem1MawhqAj5yHqdRSRWnKpp1I=
      </wsse:Password>
      <wsse:Nonce
          EncodingType="http://docs.oasis-open.org/wss/2004/01/
            oasis-200401-wss-soap-message-security-1.0#Base64Binary">
        mdyafmYm8R3f9A==
      </wsse:Nonce>
      <wsu:Created
          xmlns="http://docs.oasis-open.org/wss/2004/01/
            oasis-200401-wss-wssecurity-utility-1.0.xsd">
        2017-09-05T12:13:03Z
      </wsu:Created>
    </wsse:UsernameToken>
  </wsse:Security>
</SOAP-ENV:Header>

We acknowlege that this is not ideal, however it ought to work to get things working with the camera if it is using firmware before the fix. As an alternative, you could also try first using firmware version 2.9.0.4 for the Spectra Enhanced D6220L, available at Pelco.com and was released in April 2017. If 2.9.0.4 still has the same behavior, then you will likely need to re-order the header as described until a fix has been released.

Thank you. It works!

Great! Glad to hear it!