Examples of selectSingleNodeValue()


Examples of sos.xml.SOSXMLXPath.selectSingleNodeValue()

                                   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);
                            }
                        }
                    } catch (Exception ex) {
View Full Code Here

Examples of sos.xml.SOSXMLXPath.selectSingleNodeValue()

                    command += "</params></add_order>";
                    this.getLogger().info(".. sending command to remote Job Scheduler [" + this.getEventSupervisorSchedulerHost() + ":" + this.getEventSupervisorSchedulerPort() + "]: " + command );

                    schedulerCommand.sendRequest(command);
                    SOSXMLXPath answer = new SOSXMLXPath(new StringBuffer(schedulerCommand.getResponse()));
                    String errorText = answer.selectSingleNodeValue("//ERROR/@text");
                    if (errorText != null && errorText.length() > 0) {
                        throw new Exception("could not send command to Supervisor Job Scheduler [" + this.getEventSupervisorSchedulerHost() + ":" + this.getEventSupervisorSchedulerPort() + "]: " + errorText );
                    }                           
                }
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()

   */
  public Calendar getStartOfOrder(Order order) throws Exception{
    String xml = order.xml();
    StringBuffer xmlBuf = new StringBuffer(xml);
    SOSXMLXPath xp = new SOSXMLXPath(xmlBuf);
    String startTime = xp.selectSingleNodeValue("/order/@start_time");
    if (startTime==null || startTime.length()==0) {
      throw new Exception("No start_time attribute was found for the current order");
    }
    Date dat = schedulerDateFormat.parse(startTime);
    Calendar cal = Calendar.getInstance();
View Full Code Here

Examples of sos.xml.SOSXMLXPath.selectSingleNodeValue()

                String commandRequest = this.xmlNodeToString(commandElements.item(k));
                this.getLogger()
                    .info(".. sending command to remote Job Scheduler [" + commandHost + ":" + commandPort + "]: " + commandRequest);
                schedulerCommand.sendRequest(commandRequest);
                SOSXMLXPath answer = new SOSXMLXPath(new StringBuffer(schedulerCommand.getResponse()));
                String errorText = answer.selectSingleNodeValue("//ERROR/@text");
                if (errorText != null && errorText.length() > 0) {
                  throw new Exception("could not send command to remote Job Scheduler [" + commandHost + ":" + commandPort + "]: "
                      + 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.