@Test public void getRpcReplyPayloads() throws Exception { String reply = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<rpc-reply xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\" message-id=\"1520491011759\">\n" + " <data>\n" + " <boards xmlns=\"urn:huawei:params:xml:ns:yang:huawei-board\">\n" + " <board>\n" + " <name>0.9</name>\n" + " <description>H901MPLB_0_9</description>\n" + " </board>\n" + " <board>\n" + " <name>0.10</name>\n" + " <description>H901PILA_0_10</description>\n" + " </board>\n" + " </boards>\n" + " </data>\n" + "</rpc-reply>\n"; NetconfRpcReplyMessage netconfRpcReplyMessage = new NetconfRpcReplyMessage(reply); String payload = netconfRpcReplyMessage.getPayloads().get(0); assertTrue(payload.contains("<name>0.10</name>")); }
public static List<Document> getRpcReplyPayloads(RpcReply rpcReply) throws JAXBException { List<Object> objects = getRpcReplyPayloadObjects(rpcReply); return JaxbUtils.objectsToDocument(objects); }
NetconfRpcReplyMessage extends NetconfPayload { public static List<Document> getRpcReplyPayloads(RpcReply rpcReply) throws JAXBException { List<Object> objects = getRpcReplyPayloadObjects(rpcReply); return JaxbUtils.objectsToDocument(objects); } }
NetconfRpcReplyMessage extends NetconfPayload { public static List<Document> getRpcReplyPayloads(RpcReply rpcReply) throws JAXBException { List<Object> objects = getRpcReplyPayloadObjects(rpcReply); return JaxbUtils.objectsToDocument(objects); } private  NetconfRpcReplyMessage();  NetconfRpcReplyMessage(String netconfMessage); }
NetconfRpcReplyMessage extends NetconfPayload { public static List<Document> getRpcReplyPayloads(RpcReply rpcReply) throws JAXBException { List<Object> objects = getRpcReplyPayloadObjects(rpcReply); return JaxbUtils.objectsToDocument(objects); } private  NetconfRpcReplyMessage();  NetconfRpcReplyMessage(String netconfMessage); static List<Object> getRpcReplyPayloadObjects(RpcReply rpcReply); static List<Document> getRpcReplyPayloads(RpcReply rpcReply); static RpcReply getRpcReply(String netconfMessage); RpcReply getRpcReply(); static String buildRpcReplyOkV10(String messageId); static String buildRpcReplyOkV11(String messageId); static String buildRpcReplyDataV10(String messageId, List<Node> nodes); static String buildRpcReplyDataV11(String messageId, List<Node> nodes); static String buildRpcReplyErrorV10(String messageId, RpcError rpcError); static String buildRpcReplyErrorV11(String messageId, RpcError rpcError); static String buildRpcReplyOk(Class<T> replyClass, String messageId); static String buildRpcReplyData(Class<T> replyClass,
                                                                String messageId, List<Object> objects); static String buildRpcReplyError(Class<T> replyClass,
                                                                 String messageId, RpcError rpcError); }
NetconfRpcReplyMessage extends NetconfPayload { public static List<Document> getRpcReplyPayloads(RpcReply rpcReply) throws JAXBException { List<Object> objects = getRpcReplyPayloadObjects(rpcReply); return JaxbUtils.objectsToDocument(objects); } private  NetconfRpcReplyMessage();  NetconfRpcReplyMessage(String netconfMessage); static List<Object> getRpcReplyPayloadObjects(RpcReply rpcReply); static List<Document> getRpcReplyPayloads(RpcReply rpcReply); static RpcReply getRpcReply(String netconfMessage); RpcReply getRpcReply(); static String buildRpcReplyOkV10(String messageId); static String buildRpcReplyOkV11(String messageId); static String buildRpcReplyDataV10(String messageId, List<Node> nodes); static String buildRpcReplyDataV11(String messageId, List<Node> nodes); static String buildRpcReplyErrorV10(String messageId, RpcError rpcError); static String buildRpcReplyErrorV11(String messageId, RpcError rpcError); static String buildRpcReplyOk(Class<T> replyClass, String messageId); static String buildRpcReplyData(Class<T> replyClass,
                                                                String messageId, List<Object> objects); static String buildRpcReplyError(Class<T> replyClass,
                                                                 String messageId, RpcError rpcError);  }