private void configureSecurity(ConfigurationContext configContext) throws AxisFault {
if ( wsBinding instanceof PolicySetAttachPoint ) {
PolicySetAttachPoint policiedBinding = (PolicySetAttachPoint)wsBinding;
Parameter configParam = null;
Axis2ConfigParamPolicy axis2ConfigParamPolicy = null;
for ( PolicySet policySet : policiedBinding.getPolicySets() ) {
for ( Object policy : policySet.getPolicies() ) {
if ( policy instanceof Axis2ConfigParamPolicy ) {
axis2ConfigParamPolicy = (Axis2ConfigParamPolicy)policy;
for ( String paramName : axis2ConfigParamPolicy.getParamElements().keySet() ) {
configParam = new Parameter(paramName,
axis2ConfigParamPolicy.getParamElements().get(paramName).getFirstElement());
configParam.setParameterElement(axis2ConfigParamPolicy.getParamElements().get(paramName));
configContext.getAxisConfiguration().addParameter(configParam);
}
} else if ( policy instanceof Policy ) {
Policy wsPolicy = (Policy)policy;
configContext.getAxisConfiguration().applyPolicy(wsPolicy);