req.setXmlRpc(false);
    public String getAction(Object obj, String action, RequestTrans req) {        if (obj == null)            return null;        if (action == null)            action = "main";        StringBuffer buffer = new StringBuffer(action).append("_action");        // record length so we can check without method        // afterwards for GET, POST, HEAD requests        int length = buffer.length();        if (req.isXmlRpc()) {            // append _methodname            buffer.append("_xmlrpc");            if (scriptingEngine.hasFunction(obj, buffer.toString()))                return buffer.toString();            // cut off method in case it has been appended            req.setXmlRpc(false);            buffer.setLength(length);        }        String method = req.getMethod();        // append HTTP method to action name        if (method != null) {            // append _methodname            buffer.append('_').append(method.toLowerCase());            if (scriptingEngine.hasFunction(obj, buffer.toString()))                return buffer.toString();            // cut off method in case it has been appended            buffer.setLength(length);        }        // if no method specified or "ordinary" request try action without method        if (method == null || "GET".equalsIgnoreCase(method) ||                              "POST".equalsIgnoreCase(method) ||                              "HEAD".equalsIgnoreCase(method)) {            if (scriptingEngine.hasFunction(obj, buffer.toString()))                return buffer.toString();        }        return null;    }