Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-1202

netconf client can not parse RPC message begin with blank characters.

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • Helium
    • None
    • netconf
    • None
    • Operating System: All
      Platform: All

    • 2838

    Description

      I have a netconf server which sent the RPC-reply begins and ends with new line character 0x0a as following message. sax exception will be thrown. I try to trim the message in the NetconfXMLToMessageDecoder.decode(), the exception disappears.

      0a 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 55 54 46 2d 38 22 3f 3e
      ......
      3c 2f 72 70 63 2d 72 65 70 6c 79 3e 0a

      Caused by: org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
      at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)[:]
      at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)[:]
      at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)[:2.4.0]
      at org.opendaylight.controller.netconf.util.xml.XmlUtil.readXmlToDocument(XmlUtil.java:99)[191:org.opendaylight.controller.netconf-util:0.2.7.Helium-SR2]
      at org.opendaylight.controller.netconf.nettyutil.handler.NetconfXMLToMessageDecoder.decode(NetconfXMLToMessageDecoder.java:29)[199:org.opendaylight.controller.netconf-netty-util:0.2.7.Helium-SR2]
      at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:249)[203:io.netty.codec:4.0.23.Final]
      ... 15 more

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            gwenael.lambrouin@b-com.com Gwenael Lambrouin
            bo.l.li@ericsson.com Bo Li
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: