Package org.jdom.output

Examples of org.jdom.output.XMLOutputter.outputString()


      eControlArea.addContent(eResult);
      syncErrorDoc.getRootElement().removeContent(eControlArea);
      syncErrorDoc.getRootElement().addContent(eControlArea);
      TextMessage syncErrorMessage = getSyncErrorPublisher().createTextMessage();
      XMLOutputter xmlOut = new XMLOutputter();
      syncErrorMessage.setText(xmlOut.outputString(syncErrorDoc));
      if (getSyncErrorPublisher().getDefaultCommandName().length() == 0 ||
        getSyncErrorPublisher().getDefaultCommandName() == null) {
        getSyncErrorPublisher().setDefaultCommandName("EnterpriseSyncErrorSync");
      }
      syncErrorMessage.setStringProperty(MessageProducer.MESSAGE_ID,msgId.toString());
View Full Code Here


    // that TemporaryQueue.

    Document responseDoc = null;
    TextMessage outMessage = createTextMessage();
    XMLOutputter xmlOut = new XMLOutputter();
    String requestBody = xmlOut.outputString(doc);
    logger.debug("Producing Request:\n" + requestBody);
    try {
      outMessage.setText(requestBody);
      outMessage.setStringProperty(MessageProducer.COMMAND_NAME, theObject.getCommandName());
      outMessage.setStringProperty(MessageProducer.MESSAGE_NAME, theObject.getCommandName());   // backward compatibility
View Full Code Here

    XMLOutputter xmlOut = new XMLOutputter();
    for (int i=0; i<lFields.size(); i++) {
      Element eField = (Element)lFields.get(i);
      buildElement(xeo, eOutput, eField, true);
      logger.debug("eOutput is now " + xmlOut.outputString(eOutput));
    }

    logger.debug("XmlLayout - Build Output From Object - Ended Processing.");

    return eOutput;
View Full Code Here

      replyControlArea.addContent((Element)aResult.buildOutputFromObject());
      localReplyDoc.getRootElement().addContent(replyControlArea);
      if (needsDataArea) {
        localReplyDoc.getRootElement().addContent(new Element(DATA_AREA));
      }
      return xmlOut.outputString(localReplyDoc);
    }
    catch (Exception e) {
      // We'll just have to return the replyDoc after we've added our error
      // to it without the Dynamic ControlArea information...
      logger.fatal("Error building error reply document.");
View Full Code Here

      sender.setOutputLayoutManager(xmlLayout);
      eSender = (Element)sender.buildOutputFromObject();
    }
    catch (Exception e) {
      logger.fatal("[buildReplyDocument] Exception occurred building an Element from the Sender object.  Exception: " + e.getMessage());
      return xmlOut.outputString(replyDoc);
    }

    // Set the datetime element (for the replier)
    Datetime dt = new Datetime();
    Element eDatetime = null;
View Full Code Here

    try {
      eDatetime = (Element)dt.buildOutputFromObject();
    }
    catch (Exception e) {
      logger.fatal("[buildReplyDocument] Exception occurred building an Element from the Datetime object.  Exception: " + e.getMessage());
      return xmlOut.outputString(replyDoc);
    }

    try {
      replyControlArea.addContent(eSender);
      replyControlArea.addContent(eDatetime);
View Full Code Here

      }
    }
    catch (Exception e) {
      logger.fatal("Error building reply document, returning Reply Document passed in");
      logger.fatal(e.getMessage(), e);
      return xmlOut.outputString(replyDoc);
    }
    return xmlOut.outputString(localReplyDoc);
  }

  protected ArrayList logErrors(String errNumber, String errMessage, Throwable e, Document inDoc) {
View Full Code Here

    catch (Exception e) {
      logger.fatal("Error building reply document, returning Reply Document passed in");
      logger.fatal(e.getMessage(), e);
      return xmlOut.outputString(replyDoc);
    }
    return xmlOut.outputString(localReplyDoc);
  }

  protected ArrayList logErrors(String errNumber, String errMessage, Throwable e, Document inDoc) {
    logger.fatal(errMessage, e);
    logger.fatal("Message sent in is: \n" + getMessageBody(inDoc));
View Full Code Here

      EnterpriseLayoutManager elm = getOutputLayoutManager("xml");
      if (elm != null) {
        Object obj = elm.buildOutputFromObject(this);
        if (obj instanceof Element) {
          XMLOutputter fmt = new XMLOutputter(Format.getPrettyFormat());
          logger.info(fmt.outputString((Element)obj));
        }
      }
    }
    catch (Exception exc) {
      logger.fatal("dumpData: Exception caught: " + exc.getMessage());
View Full Code Here

      xeo.setInputLayoutManager(inElm);

      logger.debug("re-building object from input...");
      xeo.buildObjectFromInput(eOutput);
      XMLOutputter xmlOut = new XMLOutputter();
      String objAsXmlString = xmlOut.outputString((Element)xeo.buildOutputFromObject());
      logger.debug("[toXmlString] " + className + " as an XML String: \n" + objAsXmlString);

      // To test to make sure it doesn't have any goofy characters in it...
      // If it does, an exception will be thrown here.
      XmlDocumentReader xmlReader = new XmlDocumentReader();
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.