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;