public static ConfigurationContext getNewConfigurationContext(String repository, String axis2xml) throws Exception { File file = new File(repository); if (!file.exists()) { throw new Exception("repository directory " + file.getAbsolutePath() + " does not exists"); } return ConfigurationContextFactory.createConfigurationContextFromFileSystem( file.getAbsolutePath(), axis2xml); }
public static ConfigurationContext createClientConfigurationContext() throws AxisFault { File file = getAddressingMARFile(); TestCase.assertTrue(file.exists()); ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem( "target/test-resources/integrationRepo", "target/test-resources/integrationRepo/conf/axis2.xml"); AxisModule axisModule = DeploymentEngine.buildModule(file, configContext.getAxisConfiguration()); configContext.getAxisConfiguration().addModule(axisModule); return configContext; }
public static ServiceContext createAdressedEnabledClientSide( AxisService service, String clientHome) throws AxisFault { File file = getAddressingMARFile(); TestCase.assertTrue(file.exists()); ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(clientHome, null); AxisConfiguration axisConfiguration = configContext.getAxisConfiguration(); AxisModule axisModule = DeploymentEngine.buildModule(file, axisConfiguration); axisConfiguration.addModule(axisModule); axisConfiguration.addService(service); ServiceGroupContext serviceGroupContext = configContext.createServiceGroupContext((AxisServiceGroup) service.getParent()); return serviceGroupContext.getServiceContext(service); }
public static ConfigurationContext createClientConfigurationContext(String repo) throws AxisFault { return ConfigurationContextFactory.createConfigurationContextFromFileSystem( repo, repo + "/conf/axis2.xml"); }