private static void processAction(ContactsExample example,
      ContactsExampleParameters parameters) throws IOException,
      ServiceException {
    Actions action = parameters.getAction();
    System.err.println("Executing action: " + action);
    switch (action) {
      case LIST:
        example.listEntries(parameters);
        break;
      case QUERY:
        example.queryEntries(parameters);
        break;
      case ADD:
        example.addEntry(parameters);
        break;
      case DELETE:
        example.deleteEntry(parameters);
        break;
      case UPDATE:
        example.updateEntry(parameters);
        break;
      default:
        System.err.println("No such action");
    }
  }