X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fnetconf%2Fnetconf-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Futil%2Fmessages%2FNetconfHelloMessage.java;h=15223cb60ba994472cdedc939a6586f569471593;hb=d313c1a52799705222817dfcaeb2b6ab2a6f9146;hp=86b2ba1671478a022e30f7dd8c724b07c1d4d703;hpb=386d8f0ac5fa09ee5514d48284f1a4012f408b52;p=controller.git diff --git a/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/messages/NetconfHelloMessage.java b/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/messages/NetconfHelloMessage.java index 86b2ba1671..15223cb60b 100644 --- a/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/messages/NetconfHelloMessage.java +++ b/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/messages/NetconfHelloMessage.java @@ -13,9 +13,9 @@ import org.opendaylight.controller.netconf.api.NetconfMessage; import java.util.Set; import org.opendaylight.controller.netconf.api.NetconfDocumentedException; +import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants; import org.opendaylight.controller.netconf.util.exception.MissingNameSpaceException; import org.opendaylight.controller.netconf.util.xml.XmlElement; -import org.opendaylight.controller.netconf.util.xml.XmlNetconfConstants; import org.opendaylight.controller.netconf.util.xml.XmlUtil; import org.w3c.dom.Document; import org.w3c.dom.Element; @@ -64,10 +64,12 @@ public final class NetconfHelloMessage extends NetconfMessage { Document doc = XmlUtil.newDocument(); Element helloElement = doc.createElementNS(XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0, HELLO_TAG); - Element capabilitiesElement = doc.createElement(XmlNetconfConstants.CAPABILITIES); + Element capabilitiesElement = doc.createElementNS(XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0, + XmlNetconfConstants.CAPABILITIES); for (String capability : Sets.newHashSet(capabilities)) { - Element capElement = doc.createElement(XmlNetconfConstants.CAPABILITY); + Element capElement = doc.createElementNS(XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0, + XmlNetconfConstants.CAPABILITY); capElement.setTextContent(capability); capabilitiesElement.appendChild(capElement); } @@ -80,7 +82,8 @@ public final class NetconfHelloMessage extends NetconfMessage { public static NetconfHelloMessage createServerHello(Set capabilities, long sessionId) throws NetconfDocumentedException { Document doc = createHelloMessageDoc(capabilities); - Element sessionIdElement = doc.createElement(XmlNetconfConstants.SESSION_ID); + Element sessionIdElement = doc.createElementNS(XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0, + XmlNetconfConstants.SESSION_ID); sessionIdElement.setTextContent(Long.toString(sessionId)); doc.getDocumentElement().appendChild(sessionIdElement); return new NetconfHelloMessage(doc);