dateTime format: Missing or invalid XML node; element="Value"

Hello.

Im havig the message 'Missing or invalid XML node; element=“Value” ’ for some responses of a value of datetime, but other does not. I dont know if this is some bad manage of CPE or it is some bug for different format:

GOT the error over response:
soap-enc:arrayType=“xsd:string[1]”>Device.IP.Interface.1.IPv6Address.1.ValidLifetime</cwmp:GetParameterValues></soap-env:Body></soap-env:Envelope>
body: “<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<SOAP-ENV:Envelope xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:SOAP-ENC=“http://schemas.xmlsoap.org/soap/encoding/” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=“XML Schema” xmlns:cwmp=“urn:dslforum-org:cwmp-1-0”>\n\tSOAP-ENV:Header\n\t\t<cwmp:ID SOAP-ENV:mustUnderstand=“1”>17bd77dd6240000</cwmp:ID>\n\t</SOAP-ENV:Header>\n\tSOAP-ENV:Body\n\t\tcwmp:GetParameterValuesResponse\n\t\t\t<ParameterList xsi:type=“SOAP-ENC:Array” SOAP-ENC:arrayType=“cwmp:ParameterValueStruct[1]”>\n\t\t\t\t\n\t\t\t\t\tDevice.IP.Interface.1.IPv6Address.1.ValidLifetime\n\t\t\t\t\t<Value xsi:type=“xsd:dateTime”>0-12-31T23:59:59\n\t\t\t\t\n\t\t\t\n\t\t</cwmp:GetParameterValuesResponse>\n\t</SOAP-ENV:Body>\n</SOAP-ENV:Envelope>\r\n”

I do NOT have error on this one:
root@GenieACS:/mnt/usb-drive/log/genieacs# tail -f genieacs-debug.yaml | grep “Device.Time.CurrentLocalTime”
soap-enc:arrayType=“xsd:string[1]”>Device.Time.CurrentLocalTime</cwmp:GetParameterValues></soap-env:Body></soap-env:Envelope>
body: “<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<SOAP-ENV:Envelope xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:SOAP-ENC=“http://schemas.xmlsoap.org/soap/encoding/” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=“XML Schema” xmlns:cwmp=“urn:dslforum-org:cwmp-1-0”>\n\tSOAP-ENV:Header\n\t\t<cwmp:ID SOAP-ENV:mustUnderstand=“1”>17bd777c51c0000</cwmp:ID>\n\t</SOAP-ENV:Header>\n\tSOAP-ENV:Body\n\t\tcwmp:GetParameterValuesResponse\n\t\t\t<ParameterList xsi:type=“SOAP-ENC:Array” SOAP-ENC:arrayType=“cwmp:ParameterValueStruct[1]”>\n\t\t\t\t\n\t\t\t\t\tDevice.Time.CurrentLocalTime\n\t\t\t\t\t<Value xsi:type=“xsd:dateTime”>2021-09-12T00:45:55.980000Z\n\t\t\t\t\n\t\t\t\n\t\t</cwmp:GetParameterValuesResponse>\n\t</SOAP-ENV:Body>\n</SOAP-ENV:Envelope>\r\n”

This are the difference (another example)
OK: “xsd:dateTime”>2021-09-12T00:45:55.980000Z\n\t\t\t\t
NOK: “xsd:dateTime”>1-01-01T00:00:50\n\t\t\t\t

Thank you

This 1-01-01T00:00:50 is not a ISO-8601 string. The year part must be at least 4 digits.

1 Like

Thank you Zaidka, will check with the vendor. It seems that the responses have a mixed format for some nodes

again thank you for the quick precise technical information

Hello Zadika, i do some resarch about this point about zero value

TR-69 Amendment: https://www.broadband-forum.org/technical/download/TR-106_Amendment-2.pdf, Table 1 from section 3.2 Data Types, page 20, dateTime row. Unknown time syntax is described as 0001-01-01T00:00:00.

And, from RFC:
https://www.rfc-editor.org/rfc/rfc5905
Timestamps are unsigned values, and operations on them produce a result in the same or adjacent eras. Era 0 includes dates from the prime epoch to some time in 2036, when the timestamp field wraps around and the base date for era 1 is established. In either format, a value of zero is a special case representing unknown or unsynchronized time.

So, 0 may shall be used. However, may be ACS should translates 0001-01-01T00:00:00 …? since 0 must be expected.
But if the CPE express other than “0” , like 1-01-01T00:00:00 , it shoud do a fix to correct to 0001-01-01T00:00:00, right?

let me know what you think, and thanks to had time to read this.

Best regards!,
MT

Sorry, I don’t understand. How is RFC 5905 relevant here?

I take RCF for ntp timing protocol, may be is not relevant but i hardly try to found what “If the time is unknown or not applicable” (unnkow value) is defined to be interpreted as “0001-01-01T00:00:00” when returned value is not proper defined (like 1-01-01T00:00:00, garbage or “0”).
NTP time protocol refeers for 0 as a valid value for unkow or unsynchronized… thats why i come up with this rfc.

May be the any unknow value should be expresed right as 0001-01-01T00:00:00 or 0001-01-01T00:00:00Z, and thats it… i just want to confirm with you if im in the right way.

thank you.

Yeah, this has no bearing whatsoever on the question of whether the CPE’s datetime string is valid.

understood, thanks.

BR