/** * When a module gets engaged on a ServiceGroup, we have to engage it for each Service. * * @param module the newly-engaged AxisModule * @param engager * @throws AxisFault if there is a problem */ protected void onEngage(AxisModule module, AxisDescription engager) throws AxisFault { for (Iterator<AxisService> serviceIter = getServices(); serviceIter.hasNext();) { AxisService axisService = (AxisService) serviceIter.next(); axisService.engageModule(module, engager); } }
/** * When a module gets engaged on a ServiceGroup, we have to engage it for each Service. * * @param module the newly-engaged AxisModule * @param engager * @throws AxisFault if there is a problem */ protected void onEngage(AxisModule module, AxisDescription engager) throws AxisFault { for (Iterator<AxisService> serviceIter = getServices(); serviceIter.hasNext();) { AxisService axisService = (AxisService) serviceIter.next(); axisService.engageModule(module, engager); } }
/** * Engage a module for this service client. * * @param moduleName name of the module to engage * @throws AxisFault if something goes wrong */ public void engageModule(String moduleName) throws AxisFault { synchronized (this.axisConfig) { AxisModule module = axisConfig.getModule(moduleName); if (module != null) { axisService.engageModule(module); } else { throw new AxisFault("Unable to engage module : " + moduleName); } } }
/** * Engage a module for this service client. * * @param moduleName name of the module to engage * @throws AxisFault if something goes wrong */ public void engageModule(String moduleName) throws AxisFault { synchronized (this.axisConfig) { AxisModule module = axisConfig.getModule(moduleName); if (module != null) { axisService.engageModule(module); } else { throw new AxisFault("Unable to engage module : " + moduleName); } } }
protected boolean engageModules(String scenarioId, String serviceName, AxisService axisService) throws SecurityConfigException { boolean isRahasEngaged = false; SecurityScenario securityScenario = SecurityScenarioDatabase.get(scenarioId); String[] moduleNames = (String[]) securityScenario.getModules() .toArray(new String[securityScenario.getModules().size()]); // handle each module required try { for (String modName : moduleNames) { AxisModule module = axisService.getAxisConfiguration().getModule(modName); // engage at axis2 axisService.disengageModule(module); axisService.engageModule(module); if (SecurityConstants.TRUST_MODULE.equalsIgnoreCase(modName)) { isRahasEngaged = true; } } return isRahasEngaged; } catch (AxisFault e) { log.error(e); throw new SecurityConfigException("Error in engaging modules", e); } }
protected boolean engageModules(String scenarioId, String serviceName, AxisService axisService) throws SecurityConfigException { boolean isRahasEngaged = false; SecurityScenario securityScenario = SecurityScenarioDatabase.get(scenarioId); String[] moduleNames = (String[]) securityScenario.getModules() .toArray(new String[securityScenario.getModules().size()]); // handle each module required try { for (String modName : moduleNames) { AxisModule module = axisService.getAxisConfiguration().getModule(modName); // engage at axis2 axisService.disengageModule(module); axisService.engageModule(module); if (SecurityConstants.TRUST_MODULE.equalsIgnoreCase(modName)) { isRahasEngaged = true; } } return isRahasEngaged; } catch (AxisFault e) { log.error(e); throw new SecurityConfigException("Error in engaging modules", e); } }
protected boolean engageModules(String scenarioId, String serviceName, AxisService axisService) throws SecurityConfigException { boolean isRahasEngaged = false; SecurityScenario securityScenario = SecurityScenarioDatabase.get(scenarioId); String[] moduleNames = (String[]) securityScenario.getModules() .toArray(new String[securityScenario.getModules().size()]); // handle each module required try { for (String modName : moduleNames) { AxisModule module = axisService.getAxisConfiguration().getModule(modName); // engage at axis2 axisService.disengageModule(module); axisService.engageModule(module); if (SecurityConstants.TRUST_MODULE.equalsIgnoreCase(modName)) { isRahasEngaged = true; } } return isRahasEngaged; } catch (AxisFault e) { log.error(e); throw new SecurityConfigException("Error in engaging modules", e); } }
service.engageModule(axisCfg.getModule( SynapseConstants.ADDRESSING_MODULE_NAME), axisCfg); service.engageModule(axisCfg.getModule( SynapseConstants.SECURITY_MODULE_NAME), axisCfg);
service.engageModule(axisCfg.getModule( SynapseConstants.ADDRESSING_MODULE_NAME), axisCfg); service.engageModule(axisCfg.getModule( SynapseConstants.RM_MODULE_NAME), axisCfg); service.engageModule(axisCfg.getModule( SynapseConstants.SECURITY_MODULE_NAME), axisCfg);
throw new AxisFault(Messages.getMessage("modulenotavailble")); service.engageModule(axisModule);
throw new AxisFault(Messages.getMessage("modulenotavailble")); service.engageModule(axisModule);
service.engageModule(trustModule);
service.engageModule(trustModule);
service.engageModule(trustModule);
axisService.engageModule(axisModule); } catch (AxisFault e) { String msg = "Cannot engage module " + moduleId +
axisService.engageModule(module);
axisService.engageModule(module);
service.engageModule(this.configCtx.getAxisConfiguration().getModule( DBConstants.SECURITY_MODULE_NAME), this.configCtx.getAxisConfiguration());
service.engageModule(axisModule); final Policy wssPolicy = SUPropertiesHelper.getWSSPolicy(consumesExtensions, context.getClassloader(), logger);
public static OperationClient getOperationClient(BPELMessageContext partnerMessageContext, ConfigurationContext clientConfigCtx) throws AxisFault { AxisService anonymousService = AnonymousServiceFactory.getAnonymousService(partnerMessageContext.getService(), partnerMessageContext.getPort(), clientConfigCtx.getAxisConfiguration(), partnerMessageContext.getCaller()); anonymousService.engageModule(clientConfigCtx.getAxisConfiguration().getModule("UEPModule")); anonymousService.getParent().addParameter( BPELConstants.HIDDEN_SERVICE_PARAM, "true"); ServiceGroupContext sgc = new ServiceGroupContext( clientConfigCtx, (AxisServiceGroup) anonymousService.getParent()); ServiceContext serviceCtx = sgc.getServiceContext(anonymousService); // get a reference to the DYNAMIC operation of the Anonymous Axis2 service AxisOperation axisAnonymousOperation = anonymousService.getOperation( partnerMessageContext.isTwoWay() ? ServiceClient.ANON_OUT_IN_OP : ServiceClient.ANON_OUT_ONLY_OP); Options clientOptions = cloneOptions(partnerMessageContext.getInMessageContext().getOptions()); clientOptions.setExceptionToBeThrownOnSOAPFault(false); /* This value doesn't overrideend point config. */ clientOptions.setTimeOutInMilliSeconds(60000); return axisAnonymousOperation.createClient(serviceCtx, clientOptions); }