docs: protected int generateServerSchema(String[] args) {
          int retCode = 0;
          try {
              String[] mbeanParams = new String[4];
              // If no args, dump help and exit.
              if ((args == null) || (args.length == 0)) {
                  stdout.println(getScriptUsage());
                  return 0;
              }
              // The server name should be the first argument.  Go find the
              // server.  If we can't find the server, print the help text.
              String userDir = getUserDir();
              String serverName = args[0];
  
              File serverDirectory = new File(userDir + File.separator + "servers" + File.separator + serverName);
              if ((serverDirectory.exists() == false) || (serverDirectory.isDirectory() == false)) {
                  stderr.println(getMessage("server.not.found", serverName, serverDirectory.getAbsolutePath()));
                  stdout.println(getScriptUsage());
                  return RC_SERVER_NOT_FOUND;
              }
              //TODO handle if server not started case
              //iterate remaining arguments and compose the mbean API
              for (int i = 1; i < args.length; i++) {
                  String arg = args[i];
                  String argToLower = arg.toLowerCase();
                  if (argToLower.contains("help")) {
                      stdout.println(getScriptUsage());
                      stdout.println();
                      showUsageInfo();
                      return 0;
                  }
                  if (arg.startsWith("-")) {
                      if (argToLower.contains("-schemaversion")) {
                          mbeanParams[0] = getArgumentValue(args[i]);
                      } else if (argToLower.contains("-outputversion")) {
                          mbeanParams[1] = getArgumentValue(argToLower);
                      } else if (argToLower.contains("-encoding")) {
                          mbeanParams[2] = getArgumentValue(argToLower);
                      } else if (argToLower.contains("-locale")) {
                          mbeanParams[3] = getArgumentValue(argToLower);
                      } else {
                          stdout.println(MessageFormat.format(messages.getString("error.unknownArgument"), arg));
                          stdout.println();
                          return RC_INVALID_OPTION;
                      }
                  }
              }
              // invoke MBEAN
              retCode = invokeSchemaGen(serverName, mbeanParams);
          } catch (Throwable t) {
              stderr.println(getMessage("exception.catch", t.toString()));
              t.printStackTrace(stderr);
              return RC_UNEXPECTED_ERROR;
          }
          return retCode;
      }