Package hermes.xml

Examples of hermes.xml.XMLTextMessage


      Message rval = hermes.createMessage();

      if (message instanceof XMLTextMessage) {
        rval = hermes.createTextMessage();

        XMLTextMessage textMessage = (XMLTextMessage) message;
        TextMessage textRval = (TextMessage) rval;

        if (BASE64_CODEC.equals(textMessage.getCodec())) {
          byte[] bytes = base64EncoderTL.get().decode(textMessage.getText().getBytes());
          textRval.setText(new String(bytes, "ASCII"));
        } else {
          textRval.setText(textMessage.getText());
        }
      } else if (message instanceof XMLMapMessage) {
        rval = hermes.createMapMessage();

        XMLMapMessage mapMessage = (XMLMapMessage) message;
View Full Code Here


      XMLMessage rval = factory.createXMLMessage();

      if (message instanceof TextMessage) {
        rval = factory.createXMLTextMessage();

        XMLTextMessage textRval = (XMLTextMessage) rval;
        TextMessage textMessage = (TextMessage) message;

        if (isBase64EncodeTextMessages()) {
          byte[] bytes = base64EncoderTL.get().encode(textMessage.getText().getBytes());
          textRval.setText(new String(bytes, "ASCII"));
          textRval.setCodec(BASE64_CODEC);
        } else {
          textRval.setText(textMessage.getText());
        }
      } else if (message instanceof MapMessage) {
        rval = factory.createXMLMapMessage();

        XMLMapMessage mapRval = (XMLMapMessage) rval;
View Full Code Here

TOP

Related Classes of hermes.xml.XMLTextMessage

Copyright © 2018 www.massapicom. 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.