try {
Element eResult = (Element)aResult.buildOutputFromObject();
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());
syncErrorMessage.setStringProperty(MessageProducer.COMMAND_NAME,getSyncErrorPublisher().getDefaultCommandName());
//TODO: change this...
// getSyncErrorPublisher().publishMessage(syncErrorMessage);
}
catch (Exception e) {
logger.fatal("Error publishing Sync-Error-Sync message!");