* a MessageProcessor with the given xml.
*/
public void addMessageProcessor(String xml) throws AxisFault {
try {
OMElement msElem = createElement(xml);
MessageProcessor messageProcessor =
MessageProcessorFactory.createMessageProcessor(msElem);
if (messageProcessor != null && messageProcessor.getName() != null) {
SynapseConfiguration synapseConfiguration = getSynapseConfiguration();
String fileName = ServiceBusUtils.generateFileName(messageProcessor.getName());
messageProcessor.init(getSynapseEnvironment());
messageProcessor.setFileName(fileName);
synapseConfiguration.addMessageProcessor(messageProcessor.getName(),
messageProcessor);
MediationPersistenceManager mp = getMediationPersistenceManager();
mp.saveItem(messageProcessor.getName(), ServiceBusConstants.ITEM_TYPE_MESSAGE_PROCESSOR);
} else {
String message = "Unable to create Message Processor ";
handleException(log, message, null);
}