private String getActionJSON() {
    StringBuffer sb = new StringBuffer();
    if (action.getResponseName() != null) {
      sb.append("{\"");
      sb.append(action.getResponseName());
      sb.append("\":");
    }
    sb.append(new JSONActionWrite(action.getFields()).write(action));
    sb.append("}");

    return sb.toString();
  }
 private String getActionXML() {
   return new XMLCheckFieldsWriter(action.getFields()).write(action.getResponseName(), action);
 }