code: public String handleEventMessage(String message, Object msgdoc, Map<String,String> metaInfo)
              throws EventHandlerException {
          String msg;
          int code;
          if (msgdoc == null) {
              msg = "failed to parse XML message";
              code = ListenerHelper.RETURN_STATUS_NON_XML;
          } else {
              String rootNodeName = XmlPath.getRootNodeName((XmlObject)msgdoc);
              if (rootNodeName!=null && rootNodeName.equals("ping")) {
                  msg = XmlPath.evaluate((XmlObject)msgdoc, "ping");
                  if (msg==null) msg = "ping is successful";
                  code = ListenerHelper.RETURN_STATUS_SUCCESS;
              } else {
                  msg = "No event handler has been configured for message";
                  code = ListenerHelper.RETURN_STATUS_NO_HANDLER;
                  logger.severe(msg + ": " + message);
              }
          }
          StatusMessage statusMessage = new StatusMessage(code, msg);
          if (message.trim().startsWith("{")) {
              return statusMessage.getJsonString();
          }
          else {
              return statusMessage.getXml();
          }
      }
docs: The handler creates a standard error response message.
  The status code and status message are set in the following
  ways:
  <ul>
  <li>If the message cannot be parsed by the generic XML Bean,
  the status code is set to -2 and the status message is
  status message "failed to parse XML message"</li>
  <li>If there is no matching handler found, but the root element
  is "ping", the status code is set to 0 and and the
  status message is set to the content of the ping in the
  request</li>
  <li>Otherwise, the status code is set to -3 and the status message
  is set to "No event handler has been configured for message"</li>
  </ul>
  @param message the request message
  @param msgdoc XML Bean parsed from request message, or null if the request
  message cannot be parsed by the generic XML bean
  @param metaInfo meta information. The method does not use this.
  @return the response message