Package hermes.xml

Examples of hermes.xml.XMLMapMessage


          textRval.setText(textMessage.getText());
        }
      } else if (message instanceof XMLMapMessage) {
        rval = hermes.createMapMessage();

        XMLMapMessage mapMessage = (XMLMapMessage) message;
        MapMessage mapRval = (MapMessage) rval;

        for (Iterator iter = mapMessage.getBodyProperty().iterator(); iter.hasNext();) {
          final Property property = (Property) iter.next();

          if (property.getValue() == null) {
            mapRval.setObject(property.getName(), null);
          } else if (property.getType().equals(String.class.getName())) {
View Full Code Here


          textRval.setText(textMessage.getText());
        }
      } else if (message instanceof MapMessage) {
        rval = factory.createXMLMapMessage();

        XMLMapMessage mapRval = (XMLMapMessage) rval;
        MapMessage mapMessage = (MapMessage) message;

        for (Enumeration iter = mapMessage.getMapNames(); iter.hasMoreElements();) {
          String propertyName = (String) iter.nextElement();
          Object propertyValue = mapMessage.getObject(propertyName);
          Property xmlProperty = factory.createProperty();

          if (propertyValue != null) {
            xmlProperty.setValue(propertyValue.toString());
            xmlProperty.setType(propertyValue.getClass().getName());
          }
          xmlProperty.setName(propertyName);

          mapRval.getBodyProperty().add(xmlProperty);
        }
      } else if (message instanceof BytesMessage) {
        rval = factory.createXMLBytesMessage();

        XMLBytesMessage bytesRval = (XMLBytesMessage) rval;
View Full Code Here

TOP

Related Classes of hermes.xml.XMLMapMessage

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.