public void replaceXMLEventType(String xmlEventTypeName, ConfigurationEventTypeXMLDOM config)
      throws ConfigurationException {
    SchemaModel schemaModel = null;
    if (config.getSchemaResource() != null || config.getSchemaText() != null) {
      try {
        schemaModel =
            XSDSchemaMapper.loadAndMap(config.getSchemaResource(), config.getSchemaText(), 2);
      } catch (Exception ex) {
        throw new ConfigurationException(ex.getMessage(), ex);
      }
    }

    try {
      eventAdapterService.replaceXMLEventType(xmlEventTypeName, config, schemaModel);
    } catch (EventAdapterException e) {
      throw new ConfigurationException("Error updating XML event type: " + e.getMessage(), e);
    }
  }