// appContext.setClassLoader(new Serializer().getClassLoader());
appContext.refresh();
List<CmdLineOptionInstance> optionInstances = CmdLineOptionUtils.loadValidateAndHandleInstances(appContext, args);
CmdLineOptionInstance instance = CmdLineOptionUtils.getOptionInstanceByName("clientFactoryBeanId", optionInstances);
CatalogServiceClientFactory csClientFactory = (CatalogServiceClientFactory) appContext.getBean(instance.getValues().get(0), CatalogServiceClientFactory.class);
CatalogServiceClient csClient = csClientFactory.createCatalogService();
instance = CmdLineOptionUtils.getOptionInstanceByName("action", optionInstances);
((CatalogServiceServerAction) appContext.getBean(instance.getValues().get(0), CatalogServiceServerAction.class)).performAction(csClient);
}