Some SOAP errors

10/9/2018

Some SOAP errors

Validation constraint violation: occurrence violation in element 'xxx' 

This may mean a required element is missing.  For example, if SOAP message FindRecordings requires  both <Scope> and <KeepAliveTime>,  and the message contains only<Scope></Scope>, this error will be generated.  An element may be regardes as missing because its wrong namespace. For example <Quality> within <Configuration> is not counted because it is supposed to be  <Quality xmlns="http://www.onvif.org/ver10/schema"> since its parent uses the default namespace xmlns="http://www.onvif.org/ver20/media/wsdl"

Validation constraint violation: tag name or namespace mismatch in element Scope

Since developers rarely have wrong tag names, this error most likely indicates namespace error.  For example, if <Scope> in message in FindRecordings uses its parent's namespace,  <Scope xmlns="http://www.onvif.org/ver10/schema"></Scope> would generate this error because  xmlns="http://www.onvif.org/ver10/schema" is wrong.   Do not assign a namespace to an attribute property.