// module from services.xml at serviceGroup level
ArrayList groupModules = serviceGroup.getModuleRefs();
for (int i = 0; i < groupModules.size(); i++) {
QName moduleName = (QName) groupModules.get(i);
ModuleDescription module = axisConfig.getModule(moduleName);
if (module != null) {
serviceGroup.engageModule(axisConfig.getModule(moduleName));
} else {
throw new DeploymentException(
Messages.getMessage(
DeploymentErrorMsgs.BAD_MODULE_FROM_SERVICE,
serviceGroup.getServiceGroupName(), moduleName.getLocalPart()));
}
}
Iterator services = serviceList.iterator();
while (services.hasNext()) {
AxisService axisService = (AxisService) services.next();
axisService.setUseDefaultChains(false);
axisService.setFileName(currentArchiveFile.getFile().getAbsolutePath());
serviceGroup.addService(axisService);
// modules from <service>
ArrayList list = axisService.getModules();
for (int i = 0; i < list.size(); i++) {
ModuleDescription module = axisConfig.getModule((QName) list.get(i));
if (module == null) {
throw new DeploymentException(
Messages.getMessage(
DeploymentErrorMsgs.BAD_MODULE_FROM_SERVICE, axisService.getName(),
((QName) list.get(i)).getLocalPart()));
}
axisService.engageModule(module, axisConfig);
}
HashMap operations = axisService.getOperations();
Collection opCol = operations.values();
for (Iterator iterator = opCol.iterator(); iterator.hasNext();) {
AxisOperation opDesc = (AxisOperation) iterator.next();
ArrayList modules = opDesc.getModuleRefs();
for (int i = 0; i < modules.size(); i++) {
QName moduleName = (QName) modules.get(i);
ModuleDescription module = axisConfig.getModule(moduleName);
if (module != null) {
opDesc.engageModule(module, axisConfig);
} else {
throw new DeploymentException(