protected String getAction(String xml) {
        if (xml == null) return null;
        Document document;
        try {
            document = DocumentBuilderFactory
                    .newInstance()
                    .newDocumentBuilder()
                    .parse(new ByteArrayInputStream(xml.getBytes()));
        } catch (Exception ex) {
            throw new RuntimeException(ex);
        }

        Element root = document.getDocumentElement();
        NodeList childNodes = root.getChildNodes();
        Element element = null;
        for (int i = 0; i < childNodes.getLength(); i++) {
            if (childNodes.item(i).getNodeType() != Node.ELEMENT_NODE) continue;
            element = (Element) childNodes.item(i);
        }
        if (element == null) return null;
        childNodes = element.getChildNodes();
        for (int i = 0; i < childNodes.getLength(); i++) {
            if (childNodes.item(i).getNodeType() != Node.ELEMENT_NODE) continue;
            element = (Element) childNodes.item(i);
        }
        if (element == null) return null;
        return element.getTagName();
    }