Package org.dom4j

Examples of org.dom4j.XPath.selectNodes()


            _userProcessNamespaceUri = userProcessNamespaceUri;
        }

        xpathSelector = DocumentHelper.createXPath("/soapenv:Envelope/soapenv:Body/*[1]/ib4p:taskMetaData/ib4p:userProcessCompleteSOAPAction");
        xpathSelector.setNamespaceURIs(MessageConstants.get_nsMap());
        List<Node> soapActionQueryResult = xpathSelector.selectNodes(message);
        if (soapActionQueryResult.size() > 0) {
            Element soapActionElement = (Element) soapActionQueryResult.get(0);
            _soapAction = soapActionElement.getText();
           
            xpathSelector = DocumentHelper.createXPath("//addr:Action");
View Full Code Here


            Element soapActionElement = (Element) soapActionQueryResult.get(0);
            _soapAction = soapActionElement.getText();
           
            xpathSelector = DocumentHelper.createXPath("//addr:Action");
            xpathSelector.setNamespaceURIs(MessageConstants.get_nsMap());
            List<Node> actionNodes = xpathSelector.selectNodes(message);
            if (actionNodes.size() > 0) {
                Element wsaTo = (Element) actionNodes.get(0);
                //wsaTo.removeChildren();
                wsaTo.setText(_soapAction);
            }
View Full Code Here

        String userProcessNamespace = "userProcess";

        /* Select all elements inside the soap envelope body. */
        xpathSelector = DocumentHelper.createXPath("/soapenv:Envelope/soapenv:Body//*");
        xpathSelector.setNamespaceURIs(MessageConstants.get_nsMap());
        List<Node> bodyNodes = xpathSelector.selectNodes(message);
        /* Select all elements inside the task output payload. */
        xpathSelector = DocumentHelper.createXPath("/soapenv:Envelope/soapenv:Body/*[1]/ib4p:taskOutput//*");
        xpathSelector.setNamespaceURIs(MessageConstants.get_nsMap());
        List<Node> taskOutputNodes = xpathSelector.selectNodes(message);
    /* Select all the attachments. */
 
View Full Code Here

        xpathSelector.setNamespaceURIs(MessageConstants.get_nsMap());
        List<Node> bodyNodes = xpathSelector.selectNodes(message);
        /* Select all elements inside the task output payload. */
        xpathSelector = DocumentHelper.createXPath("/soapenv:Envelope/soapenv:Body/*[1]/ib4p:taskOutput//*");
        xpathSelector.setNamespaceURIs(MessageConstants.get_nsMap());
        List<Node> taskOutputNodes = xpathSelector.selectNodes(message);
    /* Select all the attachments. */
    xpathSelector = DocumentHelper.createXPath("/soapenv:Envelope/soapenv:Body//ib4p:attachments//*");
    xpathSelector.setNamespaceURIs(MessageConstants.get_nsMap());
    List<Node> attachementsNode = xpathSelector.selectNodes(message);
   
View Full Code Here

        xpathSelector.setNamespaceURIs(MessageConstants.get_nsMap());
        List<Node> taskOutputNodes = xpathSelector.selectNodes(message);
    /* Select all the attachments. */
    xpathSelector = DocumentHelper.createXPath("/soapenv:Envelope/soapenv:Body//ib4p:attachments//*");
    xpathSelector.setNamespaceURIs(MessageConstants.get_nsMap());
    List<Node> attachementsNode = xpathSelector.selectNodes(message);
   
        /*
         * Change namespace for all the elements which are inside the soap
         * envelope body but not inside the task output payload.
         */
 
View Full Code Here

    public void convertMessage(Document message) throws MessageFormatException, AxisFault {
        FormDispatcherConfiguration config = FormDispatcherConfiguration.getInstance();

        XPath xpath = null;
        xpath = DocumentHelper.createXPath("/soapenv:Envelope/soapenv:Body/soapenv:Fault");
        List<Node> fault = xpath.selectNodes(message);
        if (fault.size() != 0)
            throw new RuntimeException(fault.toString());

        // Check SOAP action
        xpath = DocumentHelper.createXPath("/soapenv:Envelope/soapenv:Body");
View Full Code Here

            throw new RuntimeException(fault.toString());

        // Check SOAP action
        xpath = DocumentHelper.createXPath("/soapenv:Envelope/soapenv:Body");
        xpath.setNamespaceURIs(MessageConstants.get_nsMap());
        List<Node> bodyQueryResult = xpath.selectNodes(message);
        if (bodyQueryResult.size() != 0) {
            Element root = (Element) bodyQueryResult.get(0);
            if (root.asXML().indexOf("createTaskRequest") != -1) {
                _soapAction = "createTask";
                xpath = DocumentHelper.createXPath("/soapenv:Envelope/soapenv:Header/addr:Action");
View Full Code Here

            Element root = (Element) bodyQueryResult.get(0);
            if (root.asXML().indexOf("createTaskRequest") != -1) {
                _soapAction = "createTask";
                xpath = DocumentHelper.createXPath("/soapenv:Envelope/soapenv:Header/addr:Action");
                xpath.setNamespaceURIs(MessageConstants.get_nsMap());
                List<Node> wsaActionQueryResult = xpath.selectNodes(message);
                if (wsaActionQueryResult.size() != 0) {
                    Element wsaToElement = (Element) wsaActionQueryResult.get(0);
                    wsaToElement.setText(_soapAction);
                } else
                    _log.warn("Did not find addr:Action in SOAP header");
View Full Code Here

         * Change the wsa:To endpoint to Workflow Processes, if a wsa:To header
         * is present.
         */
        xpath = DocumentHelper.createXPath("/soapenv:Envelope/soapenv:Header/addr:To");
        xpath.setNamespaceURIs(MessageConstants.get_nsMap());
        List<Node> wsaToQueryResult = xpath.selectNodes(message);
        if (wsaToQueryResult.size() != 0) {
            Element wsaToElement = (Element) wsaToQueryResult.get(0);
            String workflowProcessesUrl = config.getPxeBaseUrl() + config.getWorkflowProcessesRelativeUrl();
            wsaToElement.setText(workflowProcessesUrl);
        } else
View Full Code Here

         * Change the session address to be FDS endpoint and retrieve sender
         * endpoint
         */
        xpath = DocumentHelper.createXPath("/soapenv:Envelope/soapenv:Header/intalio:callback/addr:Address");
        xpath.setNamespaceURIs(MessageConstants.get_nsMap());
        List<Node> callbackToQueryResult = xpath.selectNodes(message);
        if (callbackToQueryResult.size() != 0) {
            Element wsaToElement = (Element) callbackToQueryResult.get(0);
            _userProcessEndpoint = wsaToElement.getText();
            wsaToElement.setText(config.getFdsUrl());
        } else
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.