Esempio n. 1
0
 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);
 }
Esempio n. 2
0
  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;
  }
Esempio n. 3
0
  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);
  }
Esempio n. 4
0
 public static ConfigurationContext createClientConfigurationContext(String repo)
     throws AxisFault {
   return ConfigurationContextFactory.createConfigurationContextFromFileSystem(
       repo, repo + "/conf/axis2.xml");
 }