boolean repository = false;
if (args.length > 2) repository = true;
try {
ServiceClient serviceClient;
if (repository) {
ConfigurationContextFactory fac =
new ConfigurationContextFactory();
ConfigurationContext configContext =
fac.createConfigurationContextFromFileSystem(args[2]);
serviceClient = new ServiceClient(configContext, null);
} else {
serviceClient = new ServiceClient();
}