- final DataContainerChild<?, ?> filter = NetconfMessageTransformUtil.toFilterStructure(STATE_SCHEMAS_IDENTIFIER,
- NetconfMessageTransformer.BaseSchema.BASE_NETCONF_CTX_WITH_NOTIFICATIONS.getSchemaContext());
- GET_SCHEMAS_RPC
- = Builders.containerBuilder().withNodeIdentifier(toId(NETCONF_GET_QNAME)).withChild(filter).build();
+ final Document document = XmlUtil.newDocument();
+
+ final Element filterElem = XmlUtil.createElement(document, NETCONF_FILTER_QNAME.getLocalName(),
+ Optional.of(NETCONF_FILTER_QNAME.getNamespace().toString()));
+ filterElem.setAttributeNS(NETCONF_FILTER_QNAME.getNamespace().toString(), NETCONF_TYPE_QNAME.getLocalName(),
+ "subtree");
+
+ final Element stateElem = XmlUtil.createElement(document, NetconfState.QNAME.getLocalName(),
+ Optional.of(NetconfState.QNAME.getNamespace().toString()));
+ stateElem.appendChild(XmlUtil.createElement(document, Schemas.QNAME.getLocalName(),
+ Optional.of(Schemas.QNAME.getNamespace().toString())));
+ filterElem.appendChild(stateElem);
+
+ GET_SCHEMAS_RPC = Builders.containerBuilder()
+ .withNodeIdentifier(NETCONF_GET_NODEID)
+ .withChild(Builders.anyXmlBuilder()
+ .withNodeIdentifier(NETCONF_FILTER_NODEID)
+ .withValue(new DOMSource(filterElem))
+ .build())
+ .build();