BUG-2878: Add the XML declaration to every outgoing NETCONF message.
Cisco routers expect that NETCONF messages are prefixed by the XML declaration
<?xml version="1.0" encoding="UTF-8"?>. Else, they close the NETCONF/SSH
connection and log an error such as "NETCONF-ERROR: parse error before hello seen".
This patch adds the XML declaration to every outgoing NETCONF message so that
Cisco routers accept NETCONF messages coming from the OpenDaylight controller.
This is a workaround for the sake of interoperability: according to RFC 6241,
the XML declaration is optional so Cisco routers should accept NETCONF messages
without XML declaration. See RFC 6241 section 3 "XML Considerations":
A NETCONF message MAY begin with an XML declaration (see Section 2.8
of [W3C.REC-xml-
20001006]).
Change-Id: I04a8b61a8fcef6738e8a4552f0560aa319add014
Signed-off-by: Gwenael Lambrouin <[email protected]>