Bug 8824 - NETCONF request hangs when rpc-rply has invalid xml 96/60096/4
authorAlexis de Talhouët <adetalhouet89@gmail.com>
Fri, 7 Jul 2017 17:00:43 +0000 (13:00 -0400)
committerAlexis de Talhouët <adetalhouet89@gmail.com>
Fri, 14 Jul 2017 13:08:22 +0000 (09:08 -0400)
commitcdc6e07df71958198c279e291ba1f6889fc86797
tree4b0061f12a15315051484bd7b06ec92da153a8f2
parent1867bf17d781f21473dabcde2ad3f85b9b1defc6
Bug 8824 - NETCONF request hangs when rpc-rply has invalid xml

The decoder handler is blindly throwing the SAXException but
nobody is there to intercept it. Also, as we're in the netty
world, to be able to propagate the exception, we're using the
NetconfMessage POJO.
That latest has been modified to accept either the decoded message
or an exception, if exception is thrown.

Change-Id: I62af5a885cc4e9f459c4aa71871b7d9331c4b946
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
netconf/netconf-api/src/main/java/org/opendaylight/netconf/api/FailedNetconfMessage.java [new file with mode: 0644]
netconf/netconf-api/src/main/java/org/opendaylight/netconf/api/NetconfMessage.java
netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/handler/NetconfXMLToMessageDecoder.java
netconf/netconf-netty-util/src/test/java/org/opendaylight/netconf/nettyutil/handler/NetconfXMLToMessageDecoderTest.java
netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/listener/NetconfDeviceCommunicator.java
netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/util/NetconfMessageTransformUtil.java