Examples of selectSingleNodeValue()


Examples of sos.xml.SOSXMLXPath.selectSingleNodeValue()

    private void writeConfigFile(String xml, String what, String name, String path, String modified) throws Exception{
      try{
        String fileName="";
        SOSXMLXPath xpath = new SOSXMLXPath(new StringBuffer(xml));
        if (what.equalsIgnoreCase("order")){
          String job_chain = xpath.selectSingleNodeValue("//add_order/@job_chain");
          fileName=job_chain+",";
        }
        fileName+=name+".";
        String fileIdentifier = what;
        if(fileIdentifier.equalsIgnoreCase("orderjob")) fileIdentifier="job";
View Full Code Here

Examples of sos.xml.SOSXMLXPath.selectSingleNodeValue()

              Document xmlDoc = docBuilder.parse(source);*/
          ByteArrayInputStream bis = new ByteArrayInputStream(xml.getBytes("UTF-8"));
              //SOSXMLXPath xpath = new SOSXMLXPath(new StringBuffer(xml));
          SOSXMLXPath xpath = new SOSXMLXPath(bis);
              if (what.equalsIgnoreCase("documentation")){
                String xmlContent = xpath.selectSingleNodeValue("/documentation");
                getLog().debug9("Content of /documentation:\n"+xmlContent);
                String outputEncoding = parseEncoding(xmlContent);
                if (outputEncoding==null || outputEncoding.length()==0) {
                  outputEncoding="UTF-8";
                  xmlContent = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"+xmlContent;
View Full Code Here

Examples of sos.xml.SOSXMLXPath.selectSingleNodeValue()

            this.setLogger(new SOSSchedulerLogger(spooler_log));           
            Order order = spooler_task.order();
            String liveFolder="";
            String orderXML = order.xml();
        SOSXMLXPath xp = new SOSXMLXPath(new StringBuffer(orderXML));                     
        String jobChainPath = xp.selectSingleNodeValue("/order/@job_chain");
            if (order.params().value("configuration_path") != null && order.params().value("configuration_path").length() > 0) {
                this.setConfigurationPath(order.params().value("configuration_path"));
            } else if (spooler_task.params().value("configuration_path") != null && spooler_task.params().value("configuration_path").length() > 0) {
                this.setConfigurationPath(spooler_task.params().value("configuration_path"));
            } else {
View Full Code Here

Examples of sos.xml.SOSXMLXPath.selectSingleNodeValue()

           
           
            if (this.getProtocol().equalsIgnoreCase("tcp")) { // no response is returned for UDP messages
                response = remoteCommand.getResponse();
                SOSXMLXPath xpath = new SOSXMLXPath(new StringBuffer(response));
                String errCode = xpath.selectSingleNodeValue("//ERROR/@code");
                String errMessage = xpath.selectSingleNodeValue("//ERROR/@text");
                spooler_log.info("remote job scheduler response: " + response);

                if ((errCode != null && errCode.length() > 0) || (errMessage != null && errMessage.length() > 0)) {
                    spooler_log.warn("remote Job Scheduler response reports error message: " + errMessage + " [" + errCode + "]");
View Full Code Here

Examples of sos.xml.SOSXMLXPath.selectSingleNodeValue()

           
            if (this.getProtocol().equalsIgnoreCase("tcp")) { // no response is returned for UDP messages
                response = remoteCommand.getResponse();
                SOSXMLXPath xpath = new SOSXMLXPath(new StringBuffer(response));
                String errCode = xpath.selectSingleNodeValue("//ERROR/@code");
                String errMessage = xpath.selectSingleNodeValue("//ERROR/@text");
                spooler_log.info("remote job scheduler response: " + response);

                if ((errCode != null && errCode.length() > 0) || (errMessage != null && errMessage.length() > 0)) {
                    spooler_log.warn("remote Job Scheduler response reports error message: " + errMessage + " [" + errCode + "]");
                }
View Full Code Here

Examples of sos.xml.SOSXMLXPath.selectSingleNodeValue()

            this.getLogger().debug6("..requesting calendar: " + calendarRequest);
            calendarResponse = spooler.execute_xml(calendarRequest);
            this.getLogger().debug6("..response received: " + calendarResponse);
           
            SOSXMLXPath response = new SOSXMLXPath(new StringBuffer(calendarResponse));
            String errorCode = response.selectSingleNodeValue("//ERROR/@code");
            String errorText = response.selectSingleNodeValue("//ERROR/@text");
            if ( (errorCode != null && errorCode.length() > 0) || (errorText != null && errorText.length() > 0) ) {
                throw new Exception("error occurred requesting calendar [" + calendarRequest + "]: " +
                        ((errorCode != null && errorCode.length() > 0) ? " error code: " + errorCode : "") +
                        ((errorText != null && errorText.length() > 0) ? " error text: " + errorText : "")
View Full Code Here

Examples of sos.xml.SOSXMLXPath.selectSingleNodeValue()

            calendarResponse = spooler.execute_xml(calendarRequest);
            this.getLogger().debug6("..response received: " + calendarResponse);
           
            SOSXMLXPath response = new SOSXMLXPath(new StringBuffer(calendarResponse));
            String errorCode = response.selectSingleNodeValue("//ERROR/@code");
            String errorText = response.selectSingleNodeValue("//ERROR/@text");
            if ( (errorCode != null && errorCode.length() > 0) || (errorText != null && errorText.length() > 0) ) {
                throw new Exception("error occurred requesting calendar [" + calendarRequest + "]: " +
                        ((errorCode != null && errorCode.length() > 0) ? " error code: " + errorCode : "") +
                        ((errorText != null && errorText.length() > 0) ? " error text: " + errorText : "")
                         );
View Full Code Here

Examples of sos.xml.SOSXMLXPath.selectSingleNodeValue()

              String what = "job_chains,job_chain_orders";
              what += ",payload";
                currentStatusAnswer = spooler.execute_xml("<show_state what='"+what+"'/>");
                currentStatusXPath = new SOSXMLXPath(new StringBuffer(currentStatusAnswer));
                //spooler_log.debug6("Job Scheduler status response: " + currentStatusAnswer);
                String errorCode = currentStatusXPath.selectSingleNodeValue("/spooler/answer/ERROR/@code");
                String errorText = currentStatusXPath.selectSingleNodeValue("/spooler/answer/ERROR/@text");
                if ( (errorCode != null && errorCode.length() > 0) || (errorText != null && errorText.length() > 0)) {
                    throw new Exception("Job Scheduler reports error in status response: " + errorCode + " " + errorText);
                }
            } catch (Exception ex) {
View Full Code Here

Examples of sos.xml.SOSXMLXPath.selectSingleNodeValue()

              what += ",payload";
                currentStatusAnswer = spooler.execute_xml("<show_state what='"+what+"'/>");
                currentStatusXPath = new SOSXMLXPath(new StringBuffer(currentStatusAnswer));
                //spooler_log.debug6("Job Scheduler status response: " + currentStatusAnswer);
                String errorCode = currentStatusXPath.selectSingleNodeValue("/spooler/answer/ERROR/@code");
                String errorText = currentStatusXPath.selectSingleNodeValue("/spooler/answer/ERROR/@text");
                if ( (errorCode != null && errorCode.length() > 0) || (errorText != null && errorText.length() > 0)) {
                    throw new Exception("Job Scheduler reports error in status response: " + errorCode + " " + errorText);
                }
            } catch (Exception ex) {
                throw new Exception("could not process Job Scheduler status response: " + ex.getMessage());
View Full Code Here

Examples of sos.xml.SOSXMLXPath.selectSingleNodeValue()

                                }else {
                                   answer = spooler.execute_xml("<modify_order job_chain='" + dependentJobChainPath + "' order='" + signalNodes.item(i).getAttributes().getNamedItem("id").getNodeValue() + "' state='" + next_state + "' suspended='no'/>");
                                }
                            }
                            xPath = new SOSXMLXPath(new StringBuffer(answer));
                            String errorCode = xPath.selectSingleNodeValue("/spooler/answer/ERROR/@code");
                            String errorText = xPath.selectSingleNodeValue("/spooler/answer/ERROR/@text");
                            if ( (errorCode != null && errorCode.length() > 0) || (errorText != null && errorText.length() > 0)) {
                                spooler_log.warn("Job Scheduler reports error when signalling order [" + signalNodes.item(i).getAttributes().getNamedItem("id").getNodeValue() + "] to pass through job chain [" + dependentJobChainPath + "]: " + errorCode + " " + errorText);
                            }
                        }
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.