private static String extractMessageTypeStr()

in src/main/java/org/openvasp/client/model/VaspMessage.java [239:256]


    private static String extractMessageTypeStr(final JsonNode rootNode) {
        val msgNode = rootNode.findValue("msg");
        if (msgNode == null) {
            throw new VaspException("The field 'msg' of a VASP message cannot be null");
        }

        val msgTypeNode = msgNode.findValue("type");
        if (msgTypeNode == null) {
            throw new VaspException("The field 'msg.type' of a VASP message cannot be null");
        }

        val msgTypeStr = msgTypeNode.asText();
        if (msgTypeStr == null) {
            throw new VaspException("The field 'msg.type' of a VASP message cannot be null");
        }

        return msgTypeStr;
    }