Closed GregDThomas closed 3 years ago
Note; I am working on a fix (by using the namespace aware parsing capabilities of the W3C library already used by netconf-java) but as it's a background task it may take some time before I can submit a PR.
Fixed by
https://github.com/Juniper/netconf-java/pull/50 - <hello>
https://github.com/Juniper/netconf-java/pull/51 - <rpc-reply>
In the next release
When the rfc-compliant statement is configured on the device, the NETCONF server does not define a default namespace in its replies. Instead, the server includes a namespace declaration for the NETCONF namespace, which is bound to the nc prefix, and qualifies all NETCONF tags in its replies with the prefix.
(see https://www.juniper.net/documentation/us/en/software/junos/netconf/topics/concept/netconf-session-rfc-compliant.html)
The upshot of this is that the response of a hello packet may look something like:
The current library relies on searching responses for
<session-id>
,<ok>
,<rpc_error>
, etc. so fails to find these tags if thenc:
namespace prefix is present.The only work-around is to disable the rfc-compliant setting on the device, as described at the above link.