RepositoryServiceConfiguration newRepositoryServiceConfiguration =
new RepositoryServiceConfiguration(serviceConfiguration.getDefaultRepositoryName(), repositoryEntries);
IBindingFactory bfact = BindingDirectory.getFactory(RepositoryServiceConfiguration.class);
IMarshallingContext mctx = bfact.createMarshallingContext();
mctx.marshalDocument(newRepositoryServiceConfiguration, "ISO-8859-1", null, saveStream);
saveStream.close();
writer.writeStartElement("original-repository-config");
writer.writeCharacters(config.getName());
writer.writeEndElement();